I got some generic razor (view engine) views in a class library that I want to load through a VirtualPathProvider
.
Everything works great unless I add .sv
or .en
to the view names (for example MyView.en.cshtml
). By doing so it seems like Visual Studio compiles the views into resource DLLs.
Can I prevent that?
Having to load resource DLL's in my VirtualPathProvide开发者_C百科r seems like a hassle. One thread might want to access Swedish views while the other want's English views.
I renamed the views to XXXXX._langCode.cshtml
(as in details._sv.cshtml
). I then renamed them back in my VirtualPathProvider
before returning them.
Works, but not really a solution to the problem.
精彩评论