问题描述
我正在将我们的 TeamCity 项目从 VS2012 升级到 VS2015,但在编译 MVC 应用程序时遇到了问题.
I am working on upgrading our TeamCity projects from VS2012 to VS2015 and I am running into an issue compiling our MVC application.
旧的 MSBuild (v4.0.30319.34209) 在 obj 目录中生成一个名为 MyApplication.Web.Mvc.dll.licenses
的文件,这显然是构建所必需的,但我们不知道是什么文件实际用于.
Old MSBuild (v4.0.30319.34209) generates a file in the obj directory called MyApplication.Web.Mvc.dll.licenses
which apparently is required for building, but we have no idea what the file is actually used for.
新的 MSBuild (v14.0.23107.0) 不会创建此 MyApplication.Web.Mvc.dll.licenses
文件,因此构建失败并出现以下错误:
New MSBuild (v14.0.23107.0) does not create this MyApplication.Web.Mvc.dll.licenses
file, so the build fails with the following error:
CSC error CS1566: Error reading resource 'MyApplication.Web.Mvc.dll.licenses'
-- 'Could not find file 'C:BuildAgentwork58ddf5f1234d8c8aapplicationMyApplicationMyApplication.Web.MvcobjReleaseMyApplication.Web.Mvc.dll.licenses'.'
我一直在机器上通过 cmd 手动运行构建,并且每当使用旧的 msbuild(而不是新的 msbuild)运行构建时,都会创建 dll.licenses
文件.
I have been running the builds manually via cmd on the machine, and the dll.licenses
file gets created whenever running the build using the old msbuild, just not the new one.
文件是在运行 VS2015 的开发机器上创建的,而不是在 Teamcity 构建服务器上创建的.所以在我看来,其他东西已经过时了?
The file gets created on the development machines running VS2015, but not on the Teamcity build server. So it seems to me that something else is out of date?
推荐答案
经过一番谷歌搜索,我偶然发现了 MSDN 上的这个线程.
After a bit more googling, I stumbled upon this thread on MSDN.
此处建议的解决方案是安装 Windows 10 SDK.我们使用默认安装选项在运行 Windows Server 2012 R2 的 TeamCity 构建服务器上执行此操作,重新启动后,我们的构建再次运行.
The solution suggested here is to install the Windows 10 SDK. We did this on our TeamCity build server running Windows Server 2012 R2 using the default installation options, and after a reboot, our build was working again.
希望这会有所帮助:)
这篇关于obj 目录中的 *.dll.licenses 文件不是使用 TeamCity 中的 msbuild 创建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!