We got a lot of intranet websites that share the same design. Therefore we've put the master pages, stylesheet, images and javascripts in a shared assembly.
The content is loaded by using:
HostingEnvironment.RegisterVirtualPathProvider(new VirtualFilesProvider());
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new WebFormViewEngineWithOurVirtualPathProvider());
The problem is that Visual Studio cannot find the images or masterpage and therefore gives us a lot of warnings + that we cannot select the masterpage when creating new view pages.
Can that be fixed in any way?
Note: Everything works fine when running the websites.
If VisualStudio cannot find the physical file then it will show warnings. There is really no solution to this.
An alternative approach is to use a post build / pre deploy script to copy shared files between projects. An added benefit is a faster site, a embedded resource virtual path provider is slow.