无法从程序集“ServiceStack.Interfaces..."加载类型“ServiceStack.IUrlFilter" [英] Could not load type 'ServiceStack.IUrlFilter' from assembly 'ServiceStack.Interfaces...'

查看:51
本文介绍了无法从程序集“ServiceStack.Interfaces..."加载类型“ServiceStack.IUrlFilter"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 VS2013 和 ServiceStack 4.0.54 只是想让 ServiceStack ASP.NET MVC5 空模板新项目工作.好像是撞车了

ViewBag.Title = "首页";

在 Index.cshtml 中,错误显示在标题中.还需要配置什么才能运行.

谢谢

我的错——抱歉,我在 COM 互操作的程序集中注册了另一个版本的 ServiceStack.Interfaces.dll

它现在可以工作了——谢谢——但它让我想到了我真正的问题——是否有一个模板可以为 ServiceStack ASP.Net Empty 等操作生成元数据——而不是ASP.NET Empty".网ASP.NET 是一个免费的 Web 框架,用于使用 HTML、CSS 和 JavaScript 构建出色的网站和 Web 应用程序."底部是 ServiceStack Hello World.默认页面

我想使用 MVC 或 AngularJS 模板,但可以访问元数据/操作.本质上是一个准系统项目.

再次感谢

我得到了元数据谢谢!

解决方案

听起来你有像

我希望您有一些项目引用了旧版本的 ServiceStack.Interfaces 而没有 IUrlFilter.如果您找不到它是哪个项目,请从您的解决方案 NuGet /packages 文件夹中删除所有旧的(即非 v4.0.54)包并重建以查看哪些项目已损坏.

您可以通过关闭您的解决方案、删除整个 NuGet /packages 文件夹、重新打开您的解决方案并重新构建来验证所有项目是否已升级,如果仍有,则应再次下载所有 NuGet 包早于 v4.0.54 的 ServiceStack 包,那么您仍有引用旧版本的项目仍需要升级.

I am using VS2013 with ServiceStack 4.0.54 just trying to get the ServiceStack ASP.NET MVC5 Empty Template new project to work. It seems to crash at the line

ViewBag.Title = "Home Page";

in Index.cshtml with the error shown in the title. What else needs to be configured to get this run.

Thanks

My fault -- sorry I had another version of ServiceStack.Interfaces.dll registered in the assembly for my COM interop

It works now -- Thanks -- but it leads me to I guess my real issue -- is there a template that generates the metadata for the operations like the ServiceStack ASP.Net Empty -- as opposed to the "ASP.NET ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript." with the ServiceStack Hello World at the bottom." default page

I want to use the MVC or AngularJS template but with the metadata/operations accessible. Essentially an barebones project.

Thanks again

I got to the metadata Thanks!

解决方案

It sounds like you have dirty dlls as IUrlFilter is defined in ServiceStack.Interfaces which I've just verified using dotPeek is indeed in v4.0.54 of ServiceStack.Interfaces:

I expect you have some projects referencing an older version of ServiceStack.Interfaces without IUrlFilter. If you can't find which project it is, delete all old (i.e. non v4.0.54) packages from your solutions NuGet /packages folder and rebuild to see which projects are broken.

You can verify all projects have been upgraded by closing your solution, deleting the entire NuGet /packages folder, re-open your solution and rebuild which should download all NuGet packages again, if there are still ServiceStack packages older than v4.0.54 then you have still have projects referencing older versions that still need to be upgraded.

这篇关于无法从程序集“ServiceStack.Interfaces..."加载类型“ServiceStack.IUrlFilter"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆