Today I turned on precompilation on our razor views.
We're using referenced assemblies for pretty much everything, including the mvc dlls and System.Web.WebPages.
At first I was getting an error that the versions of System.Web.WebPages didn't match when building locally so I added an entry to the Web.Config
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
This fixed the problem which leads me to assume that the compiler is ignoring the reference hint path and the <SpecificVersion>
stuff?
With this in the web.config our local builds work fine (we happen to have all the dlls in the GAC also).
Running our build script on the build server throwns the error that:
{OurPath}\web.config (44): Could not load file or assembly 'System.Web.WebPages,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of
its dependencies. The system cannot find the file specified.
What's happening here? I can see that System.Web.WebPages dll is in the bin of the compiled output so why can't the build server find it? Perhaps there's a dependency I don't know about?
Secondly, why does the hint path in the proj file seem to have no impact on the assembly being used, even when SpecificVersion is set to true?