Why am I missing assemblies from the bin directory when compiling with MsBuild?

后端 未结 9 1297
日久生厌
日久生厌 2021-01-13 10:43

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 a

相关标签:
9条回答
  • 2021-01-13 11:19

    I think this problem only occurs when your bin directory is not the framework's default for a solution.

    I understand that msbuild uses each project set up to build it. If this is so, please go to each projects properties page and check the post build event command line arguments.

    0 讨论(0)
  • 2021-01-13 11:22

    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.

    0 讨论(0)
  • 2021-01-13 11:24

    Known problem ffor MSBuild 3.5 and msbuild 4.5. I am using Msbuild 4 found at

     c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe <yourSolutionFile>.sln
    

    It seems to solve the problem.

    0 讨论(0)
提交回复
热议问题