简体   繁体   English

为什么我的buildserver中的部署包有其他程序集?

[英]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的构建服务器上遇到了同样的问题。

Fix 固定

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.

相关问题 为什么我的.NET Standard 2.0(多目标)项目对其中一个依赖程序集发出警告? - Why does my .NET Standard 2.0 (multi-targetting) project has a warning on one of the dependent assemblies? 为什么有些组件必须从Assembly Manager加载,而另一些组件却可以通过NuGet轻松添加? - Why do some assemblies have to be loaded from the Assembly Manager and others can simply be added through NuGet? 为什么Object.Equals()在从不同的程序集中实例化时,对于相同的匿名类型返回false? - Why does Object.Equals() return false for identical anonymous types when they're instantiated from different assemblies? 热部署.net程序集 - Hot deployment of .net assemblies VS 2017中的生成包不打包引用的程序集 - Package on build in VS 2017 does not pack referenced assemblies 签名的程序集阻止我的服务启动 - Signed assemblies prevent my service from starting 其他程序集Media Center插件 - Additional Assemblies Media Center Plugin 为什么不同版本的Silverlight程序集具有相同的版本号? - Why do different versions of Silverlight assemblies have the same version number? 为什么 CLR 集成程序集具有随机版本号 - Why CLR integration assemblies have a random version number 为什么我必须对本地程序集使用完全合格的程序集名称? - Why I have to use fully qualified assembly name for local assemblies?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM