We're using Visual Studio 2010 Web deployment projects to compile web-application websites during our build. Visual Studio 2010 is not installed on our build-agents. We get an error (see below) during the build relating to the automatically-generated Foo.XmlSerializers.dll being built with a runtime newer than the currently loaded runtime and cannot be loaded by aspnet_compiler.exe.
We're targeting .NET Framework v3.5 in our project files.
Here's the error (reformatted for long lines):
"C:\BuildAgent\work\3836706d661b8a05\project\src\Foo.FrontEnd.WdpSite\
Foo.FrontEnd.WdpSite.wdproj" (Build target) (1) ->
(AspNetCompiler target) ->
ASPNETCOMPILER : error ASPCONFIG: Could not load file or assembly
'Foo.FrontEnd.Site.XmlSerializers' or one of its dependencies.
This assembly is built by a runtime newer than the currently loaded
runtime and cannot be loaded.
[C:\BuildAgent\work\3836706d661b8a05\project\src\Foo.FrontEnd.WdpSite\
Foo.FrontEnd.WdpSite.wdproj]