[英]Why does the deployment package from my buildserver have additional assemblies?
I've got an asp.net mvc deployment package that I'm trying to build with team city. 我有一个asp.net mvc部署包,我正在尝试用团队城市构建。 The package builds without any problems, but the bin folder contains file that are not needed (and cause the site to fail when present).
包构建没有任何问题,但bin文件夹包含不需要的文件(并导致站点在存在时失败)。
If I build the same package from visual studio the additional files are not present. 如果我从visual studio构建相同的包,则不存在其他文件。
The additional files are: 其他文件是:
Microsoft.VisualBasic.Activities.Compiler.dll
mscorlib.dll
normidna.nlp
normnfc.nlp
normnfd.nlp
normnfkc.nlp
normnfkd.nlp
System.Data.dll
System.Data.OracleClient.dll
System.EnterpriseServices.dll
System.EnterpriseServices.Wrapper.dll
System.Transactions.dll
What can I do to prevent these additional assemblies and .nlp files from being included in the package? 我该怎么做才能防止这些附加程序集和.nlp文件包含在程序包中?
UPDATE UPDATE
After a bit more digging through log files I've found that the _CopyFilesMarkedCopyLocal
build task is copying the files into the bin directory. 在对日志文件进行了一些挖掘之后,我发现
_CopyFilesMarkedCopyLocal
构建任务正在将文件复制到bin目录中。 The odd thing is that the assemblies are not marked as copy local. 奇怪的是,程序集未标记为本地副本。
After a bunch more digging around I noticed that the build server had the .Net framework on, but not the framework SDK. 经过一番挖掘后,我注意到构建服务器上有.Net框架,但没有框架SDK。 After installing the SDK on the build server the additional assemblies were no longer added.
在构建服务器上安装SDK后,不再添加其他程序集。
I experienced the same issue on a build server that only had 4.5.1 sdk
installed. 我在
only had 4.5.1 sdk
安装only had 4.5.1 sdk
的构建服务器上遇到了同样的问题。
Add the p:FrameworkPathOverride
parameter to msbuild
. 将
p:FrameworkPathOverride
参数添加到msbuild
。 For example: 例如:
msbuild /p:FrameworkPathOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1"
最简单的解决方案是将我的本地C:\\ Program Files(x86)\\ Reference Assemblies \\ Microsoft \\ Framework.NETFramework复制到构建服务器
On a build server running Windows Server 2012 R2 I experienced a similar problem - the following task was copying unwanted files to the output directory: 在运行Windows Server 2012 R2的构建服务器上,我遇到了类似的问题 - 以下任务是将不需要的文件复制到输出目录:
[06:47:07]_CopyFilesMarkedCopyLocal
[06:47:07]Copy
[...]
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" to "bin\Release\mscorlib.dll".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normidna.nlp" to "bin\Release\normidna.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfc.nlp" to "bin\Release\normnfc.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfd.nlp" to "bin\Release\normnfd.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfkc.nlp" to "bin\Release\normnfkc.nlp".
[06:47:07]Copying file from "C:\Windows\Microsoft.NET\Framework\v4.0.30319\normnfkd.nlp" to "bin\Release\normnfkd.nlp".
Similar to the answer of @ilivewithian a package was missing: Microsoft .NET Framework 4.5.2 Developer Pack for Windows Vista SP2, Windows 7 SP1, Windows 8, Windows 8.1, Windows Server 2008 SP2 Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2 . 与@ilivewithian的答案类似,缺少一个软件包: 适用于Windows Vista SP2,Windows 7 SP1,Windows 8,Windows 8.1,Windows Server 2008 SP2,Windows Server 2008 R2 SP1,Windows Server 2012的Microsoft .NET Framework 4.5.2开发人员软件包 Windows Server 2012 R2 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.