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

后端 未结 9 1512
日久生厌
日久生厌 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:09

    I have found various references to this problem scattered around the Net - and I've just come across it myself. Apparently MSBuild on the command line isn't as good at tracing chains of dependencies as the IDE is.

    So as I understand it, if A depends on B which depends on C, The command line may not realize that A depends on C.

    The only solution I've found is to ensure that you manually set the project dependencies so that the ASP project references everything it depends on - don't expect it to be able to figure them all out on the command line. This has worked for me, although I only have 5 projects so it's not a bind to get going.

    I hope this helps.

提交回复
热议问题