开发者

Load Web.Config as embedded resource inside a DLL in ASP.NET MVC

开发者 https://www.devze.com 2022-12-21 01:51 出处:网络
Following on from my earlier question around loading views from DLLs under ASP.NET MVC, I\'ve come across the issue of having Views and Controls be strongly typed. An exception is thrown indicating th

Following on from my earlier question around loading views from DLLs under ASP.NET MVC, I've come across the issue of having Views and Controls be strongly typed. An exception is thrown indicating that the type cannot be resolved.

I found this article which describes implementing a web.config section which allows that strongly typed view declaration to be parsed correctly.

How can I parse a web.config that is embedded in a class library as a resource?开发者_如何学C Would this require a custom build provider?


I think your confused?

All you have to do is create a web.config file and put the code in the article you found in the folder where you are storing your views. Thats it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号