none
devenv build from VS 2015 command prompt crashes without any messages in logs RRS feed

  • Question

  • I have a Solution with about 90 projects which we had so far been building with Visual Studio 2012. I am trying to migrate it to Visual Studio 2015. But I have run into some strange build issues, looking for some help on that.

    From Visual Studio 2015 client, the projects get compiled successfully. But when I try "devenv" build from command prompt, the build exits after some time. The build seems to be crashing. It does not show any error, nor does it report the count of passed or failed builds. I also tried this from "devenv command prompt" under Visual Studio 2015 installation, there also I got the same problem.

    Secondly from the command prompt, "Debug" devenv build passes but "Release" build fails. However both /Debug and /Release configuration builds pass from Solution Explorer.

    Can someone please help me identify what could be causing this, or how to debug further. Also please help me understand why a build fired from command prompt is behaving differently from the build in Solution Explorer.
    Tuesday, June 4, 2019 6:14 AM

Answers

  • Hi pmairh,

    Welcome to MSDN forum.

    For your first issue: What does the command which causes the crash looks like?  

    For your second issue: Since the Debug builds well but not Release, what's the difference between their build parameters except Platform?

    >>why a build fired from command prompt is behaving differently from the build in Solution Explorer

    There are many possibilities could cause this situation. The cause could be lack of some necessary parameters, or can't properly find one referenced assembly, etc.

    It's hard to locate it since I can't reproduce the same issue on my side. Here are my suggestion may help solve it:

    1.Update your VS2015 to latest version

    2.Check this issue, install this patch and check if it helps

    3. Open Developer Command Prompt for VS2015, and type your command there instead of using other command prompt

    4.If you've already used the Developer Command Prompt to run devenv build but no help, I recommend you use msbuild command to build the projects.

    Actually in recent years, msbuild is the tool we choose to build solutions and projects outside VS IDE. 

    e.g: To build a solution: msbuild path/xxx.sln

    To build a project in debug mode in X64: msbuild path/xxx.xxproj /p:Configuration=Debug;Platform=X64

    And always using msbuild to build projects can get same result like building in VS(Since VS2015, msbuild is a good choice for building)

    Hope all above helps. Any feedback would be expected!

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 4, 2019 8:29 AM

All replies

  • Hi pmairh,

    Welcome to MSDN forum.

    For your first issue: What does the command which causes the crash looks like?  

    For your second issue: Since the Debug builds well but not Release, what's the difference between their build parameters except Platform?

    >>why a build fired from command prompt is behaving differently from the build in Solution Explorer

    There are many possibilities could cause this situation. The cause could be lack of some necessary parameters, or can't properly find one referenced assembly, etc.

    It's hard to locate it since I can't reproduce the same issue on my side. Here are my suggestion may help solve it:

    1.Update your VS2015 to latest version

    2.Check this issue, install this patch and check if it helps

    3. Open Developer Command Prompt for VS2015, and type your command there instead of using other command prompt

    4.If you've already used the Developer Command Prompt to run devenv build but no help, I recommend you use msbuild command to build the projects.

    Actually in recent years, msbuild is the tool we choose to build solutions and projects outside VS IDE. 

    e.g: To build a solution: msbuild path/xxx.sln

    To build a project in debug mode in X64: msbuild path/xxx.xxproj /p:Configuration=Debug;Platform=X64

    And always using msbuild to build projects can get same result like building in VS(Since VS2015, msbuild is a good choice for building)

    Hope all above helps. Any feedback would be expected!

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 4, 2019 8:29 AM
  • Hi Lance,

    Thanks for the quick response. I had already tried suggestions in point 1 & 3

       >>For your first issue: What does the command which causes the crash looks like?
    My command looks like this - "C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/devenv" "SolutionFileName.sln" /BUILD nl_Release

    >>For your second issue: Since the Debug builds well but not Release, what's the difference between their build parameters except Platform?

    I compared the attributes - there is not much difference between the two, except for Debug path and Output type.


    >> 4.If you've already used the Developer Command Prompt to run devenv build but no help, I recommend you use msbuild command to build the projects.

    I tried building using MSBuild as you suggested and the build goes through successfully. So this may work as an acceptable workaround.

    Regards,

    Prabodh

    Wednesday, June 5, 2019 9:25 AM
  • Glad to know MSBuild command helps.

    Actually, for VS2015, VS2017, VS2019 we all recommend using msbuild to build projects. (It can even build projects without VS installed)

    Msbuild.exe if the core of the vs build system. And it's quite powerful. We can use it to build projects and publish them, this what devenv can't do for us.

    And since your issue is resolved by using msbuild command. Could you please help mark my reply as accepted answer if it's helpful for you :) . So that other members with similar issue can easily find it!

    Have a nice day!

     


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Wednesday, June 5, 2019 9:34 AM
  • Yes, it was helpful :).. Thanks!
    Thursday, June 6, 2019 5:08 AM