Why is VS2008 build different from msbuild for the same solution?

I inherited a solution consisting of several projects, a combination of VB.NET and C #. It works great with the Build Solution IDE button. It is not built from the command line using "msbuild foo.sln"; the error message indicates that project A (which refers to project B) cannot find project B. Indeed, having examined the contents of the bin folder after using msbuild and comparing it with the contents after using the IDE, I can find many missing DLLs, including B.dll.

In short: project A has a link for project B, but B.DLL is only copied to the bin directory when using the IDE, but not when using msbuild. If I run msbuild after creating the IDE, it will work because the copied DLL links will be copied.

I naively believed that "msbuild foo.sln" is the same as the foo.sln IDE assembly. This does not seem to be the case. There are at least three other similar questions in Qaru, but I cannot refer to them because "new users can send only one hyperlink" (!!). I'm sorry. Here are the names of the questions so you can search for yourself:

Now here are my questions:

  • Where can I find documented exactly what Visual Studio does when you "build the solution"?
  • What are the best practices for setting up Visual Studio and a continuous integration server (such as Hudson) so that the builds of the development workstation are the same as the CI builds?

I am coming from the unix world, so feel free to send me newbies.

+3
2

, Visual Studio MSBuild , . , VS . , A, B C. A B B C. VS, A B, , MSBuild , C. , - , , VS , IDE. IDE, MSBuild UseHostCompilerIfAvailable false, Visual Studio MSBuild. ,

<PropertyGroup>
    <UseHostCompilerIfAvailable>false</UseHostCompilerIfAvailable>
</PropertyGroup>

, , .

+3

-, CI msbuild.

IDE , , msbuild, , .

0

Source: https://habr.com/ru/post/1719938/


All Articles