的MSBuild不会复制直接引用的DLL到bin文件夹 [英] MSBuild does not copy directly referenced dlls to bin folder

查看:557
本文介绍了的MSBuild不会复制直接引用的DLL到bin文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立我的生成服务器上我与MSBuild的命令行的解决方案。
然而,MSBuild的没有任何DLL复制到bin文件夹,因此随后的目标失败。

I am trying to build my solution with MSBuild command line on my build server. However, MSBuild does not copy any dlls to the bin folder and therefore subsequent targets fail.

我的解决方案包含几个项目,其中只有一个项目都应该打包的。该项目引用在之前应该建立在同样的解决方案等项目。

My solution consists of several projects where only one project should be packaged. This project references other projects in the same solution that should be built before.

所有参考设置为<私人和GT;真< /私募> 在项目文件

All references are set to <Private>true</Private> in the project file.

下面是我的MSBuild命令:

Here is my MSBuild command:

Msbuild solution.sln /m /p:BuildInParallel=true /p:VersionNumber=1.2.3.4
"/t:Rebuild" /p:Configuration=Release /p:WebProjectOutputDir=publish\
"/p:GitVersion=abcdef (abcdef)" /p:OutDir=publish\bin\ /p:RunOctoPack=true

当我建立在Visual Studio(2012年或2013年)的bin文件夹中创建获取所有所需的DLL复制到bin文件夹的项目。之后的Visual Studio复制的DLL到bin文件夹时,MSBuild的命令工作,直到我改变任何引用的DLL。

When I build the project in Visual Studio (2012 or 2013) the bin folder gets created and all required dlls are copied to the bin folder. After Visual Studio copied the dlls to the bin folder, the MSBuild command works until I changed any of the referenced dlls.

我读到间接引用一些帖子不被复制,但对我来说,即使是直接的是不被复制。

I read some posts about indirect references not being copied, but for me, even the direct ones are not being copied.

我也试过在调用像 ResolveReferences 目标,但始终得到了目标ResolveReferences不会在项目solution.sln 存在错误。

I also tried invoking targets like ResolveReferences, but always get the error that the target ResolveReferences does not exist in the project solution.sln.

有谁知道我做错了吗?感谢您的帮助。

Does anyone know what I'm doing wrong? Thanks for the help.

推荐答案

试着将我在Solution Explorer项目,然后单击发布选项卡。然后你会看到所有的.dll文件和其他相关文件与程序列表。您可能需要单击所有在左下角显示让所有的文件显示。这里选择缺少文件,并在公布栏中选择包括,在下载集团选择必需的,并且哈希列中选择包括:

Try going to My Project in the Solution Explorer, and then click on the publish tab. You will then see a list of all .dll files and other associated files with your program. You may need to click the show all in the lower left to get all files to show. Here select the file that is missing and in publish column select Include, in Download Group select Required, and the Hash column select include

这篇关于的MSBuild不会复制直接引用的DLL到bin文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆