Reputation: 140983
The Build Server is producing this error :
The type 'System.Object' is defined in an assembly that is not referenced.
You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
The Web.Config contains that configuration:
<system.web>
<compilation debug="true" targetFramework="4.5.2">
<assemblies>
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5.2"/>
</system.web>
I have also changed the MsBuild Argument to
/p:TargetFrameworkVersion=v4.5.2
This has not helped. Still the same error. I also see multiple warning warning on the Build Server:
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (990):
The reference assemblies for framework ".NETFramework,Version=v4.5.2" were not found.
To resolve this, install the SDK or Targeting Pack for this framework version or
retarget your application to a version of the framework for which you have the SDK
or Targeting Pack installed. Note that assemblies will be resolved from the Global
Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore
your assembly may not be correctly targeted for the framework you intend.
How can I make the Build Server (Visual Studio Online) build this .Net 4.5.2 project ?
I also have a lot of warning message of this type:
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (990):
The reference assemblies for framework ".NETFramework,Version=v4.5.2" were not found.
To resolve this, install the SDK or Targeting Pack for this framework version or retarget
your application to a version of the framework for which you have the SDK or Targeting
Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC)
and will be used in place of reference assemblies. Therefore your assembly may not be
correctly targeted for the framework you intend.
Upvotes: 2
Views: 3253
Reputation: 140983
Visual Studio Online (VSO) does not support the latest .Net Framework. I got an intern discussion with the VSO team and this is planned in a near future. The short term solution is to compile with a previous .Net framework until VSO release this new feature.
Upvotes: 2