为什么我从bin目录用的MSBuild编译时丢失的组件? [英] Why am I missing assemblies from the bin directory when compiling with MsBuild?
问题描述
我有一个包含许多类库和一个ASP .NET网站,该网站引用这些程序集。一个解决方案
当我建立在IDE中的解决方案,该网站引用的所有组件的bin目录结束。太棒了!
当我使用的MSBuild从命令行,所有引用的程序集不会复制到bin目录。为什么呢?
我的命令行很简单:
msbuild.exe D:\\ MyProject的\\ mysolution.sln
我面临的问题是我有一个项目是依赖于库项目。为了建立我以下步骤:
msbuild.exe myproject.vbproj / T:重建
msbuild.exe myproject.vbproj / T:包装
这当然意味着我失去了我的图书馆的dll文件在bin和最重要的是在包zip文件。我发现这个完美的作品:
msbuild.exe myproject.vbproj / T:重建;包
我不知道为什么这个工作,或为什么它摆在首位没有。但是,希望有所帮助。
I have a solution which contains many class libraries and an ASP .NET website which references those assemblies.
When I build the solution from within the IDE, all assemblies referenced by the website end up in the bin directory. Great!
When I use MsBuild from the command line, all the referenced assemblies are not copied to the bin directory. Why?
My command line is simply:
msbuild.exe d:\myproject\mysolution.sln
The issue I was facing was I have a project that is dependent on a library project. In order to build I was following these steps:
msbuild.exe myproject.vbproj /T:Rebuild
msbuild.exe myproject.vbproj /T:Package
That of course meant I was missing my library's dll files in bin and most importantly in the package zip file. I found this works perfectly:
msbuild.exe myproject.vbproj /T:Rebuild;Package
I have no idea why this work or why it didn't in the first place. But hope that helps.
这篇关于为什么我从bin目录用的MSBuild编译时丢失的组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!