【问题标题】:Visual Studio Online MsBuild Fail on System.ObjectSystem.Object 上的 Visual Studio Online MsBuild 失败
【发布时间】:2014-10-12 02:11:11
【问题描述】:

构建服务器产生此错误:

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'.

Web.Config 包含该配置:

  <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>

我还将 MsBuild 参数更改为

 /p:TargetFrameworkVersion=v4.5.2

这没有帮助。还是同样的错误。 我还在构建服务器上看到多个警告警告:

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.

如何让 Build Server (Visual Studio Online) 构建这个 .Net 4.5.2 项目?

编辑

我也有很多这种类型的警告信息:

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.

【问题讨论】:

标签: .net build msbuild azure-devops


【解决方案1】:

Visual Studio Online (VSO) 不支持最新的 .Net Framework。我与 VSO 团队进行了一次实习讨论,这计划在不久的将来进行。短期解决方案是使用以前的 .Net 框架进行编译,直到 VSO 发布此新功能。

【讨论】:

  • 这里有同样的问题,找不到太多关于这个的信息。有更新吗?
  • 这对我来说已经工作了大约 2 个月。我猜他们在后端更新了一些东西。
猜你喜欢
  • 2014-10-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-08-18
  • 1970-01-01
相关资源
最近更新 更多