From http://stackoverflow.com/questions/17863627/msbuild-cannot-find-a-dll-that-has-been-bindingredirectd-via-web-config
It seems that despite loading the System.Web.* binaries into the AppDomain, invoking the WebConfigurationManager complains about not being able to find the binaries
Comments: Would you happen to know how msbuild + csc.exe work together to resolve assemblies? Is there a way to tie into the same system so that they're always consistent? That is, if it the csproj can compile/build the files then RazorGenerator should be able to do so as well. Alternatively, what's the process that the ASP.NET live compilation uses for assembly resolution? That'd be closer to what RazorGenerator needs. As a last resort, could add an AppDomain static that sees if the resolver has already been added? Many thanks for looking into this and providing a quick fix.
It seems that despite loading the System.Web.* binaries into the AppDomain, invoking the WebConfigurationManager complains about not being able to find the binaries
Comments: Would you happen to know how msbuild + csc.exe work together to resolve assemblies? Is there a way to tie into the same system so that they're always consistent? That is, if it the csproj can compile/build the files then RazorGenerator should be able to do so as well. Alternatively, what's the process that the ASP.NET live compilation uses for assembly resolution? That'd be closer to what RazorGenerator needs. As a last resort, could add an AppDomain static that sees if the resolver has already been added? Many thanks for looking into this and providing a quick fix.