5

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.

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

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

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.

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.

Sebastian Rosch
  • 1,033
  • 1
  • 11
  • 17
  • Try these: http://stackoverflow.com/questions/1132243/msbuild-doesnt-copy-references-dlls-if-using-project-dependencies-in-solution http://stackoverflow.com/questions/14322391/msbuild-to-copy-dynamically-generated-files-as-part-of-project-dependency – BarrieK Nov 03 '15 at 15:32
  • Thanks but the first answer deals with indirect references but for me the direct ones are not even copied so that the build fails. The second answer deals with content files of referenced projects, which is not an issue for me so far. – Sebastian Rosch Nov 04 '15 at 15:17
  • Have you a chance to resolve the issue? I'm having similar – Artyom Feb 11 '16 at 07:51

1 Answers1

0

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

pg1988
  • 59
  • 1
  • 5