none
Launching devenv with different build configurations

    Question

  • This page seems to indicate that

    devenv MySolution.sln Debug

    should launch the VS IDE in the Debug build configuration for that solution.

    When I try it however it launches with whichever build configuration was used last.

    Any help would be great!

    Monday, October 03, 2016 11:39 PM

Answers

  • This page <https://msdn.microsoft.com/en-us/library/abtk353z.aspx> seems to indicate that

    devenv MySolution.sln Debug

    should launch the VS IDE in the Debug build configuration for that solution.

    I think you're misinterpreting what it says there. I think it only
    applies when you use one of the {/build|/clean|/rebuild|/deploy}
    arguments and not for loading the IDE interactively.

    Dave

    • Marked as answer by _Yann_ Wednesday, October 12, 2016 7:06 PM
    Tuesday, October 04, 2016 9:40 AM

All replies

  • This page <https://msdn.microsoft.com/en-us/library/abtk353z.aspx> seems to indicate that

    devenv MySolution.sln Debug

    should launch the VS IDE in the Debug build configuration for that solution.

    I think you're misinterpreting what it says there. I think it only
    applies when you use one of the {/build|/clean|/rebuild|/deploy}
    arguments and not for loading the IDE interactively.

    Dave

    • Marked as answer by _Yann_ Wednesday, October 12, 2016 7:06 PM
    Tuesday, October 04, 2016 9:40 AM
  • Hi _Yann_,

    >>however it launches with whichever build configuration was used last

    How do you detect that build configuration was used last? As far as I know, if we runt the command line successfully, Visual Studio will not be launched. Please refer to the following command and screenshot:

    devenv.exe  ConsoleApplication.sln /project ConsoleApplication /projectconfig "Release" /build

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Tuesday, October 04, 2016 10:11 AM
    Moderator

  • I think you're misinterpreting what it says there. I think it only
    applies when you use one of the {/build|/clean|/rebuild|/deploy}
    arguments and not for loading the IDE interactively.

    Thank you David, I was afraid that might have been the case. So there's no way to launch the IDE in a specific configuration?

    Tuesday, October 04, 2016 5:26 PM
  • Hi _Yann_,

    >>however it launches with whichever build configuration was used last

    How do you detect that build configuration was used last? As far as I know, if we runt the command line successfully, Visual Studio will not be launched. Please refer to the following command and screenshot:

    devenv.exe  ConsoleApplication.sln /project ConsoleApplication /projectconfig "Release" /build

    Hi Oscar, thanks for taking the time to reply.

    VS launches if you don't any of the {/build|/clean|/rebuild|/deploy} flags. Building would be acceptable to me but my primary goal is to get VS opened with the right build config.

    Tuesday, October 04, 2016 5:30 PM
  • >Thank you David, I was afraid that might have been the case. So there's no way to launch the IDE in a specific configuration?

    I don't know of any, but it's not something I've ever needed to do - I
    just pick the configuration from the UI when I want to change it.

    Dave

    Tuesday, October 04, 2016 7:25 PM
  • Hi _Yann_,

    Thank you for your response.

    I could repro your issue in my side.  If I build project in command line as the following screenshot:

    In the ConsoleApp application will be output to test_Dubug folder.

    If I run the command as the following screenshot:

    That Visual Studio will be launched, but it will build with the configuration that from the tool bar option specified, and this configuration is saved before VS closed. The projectconfig switch in command is not available after VS launched.

    But I think above process is reasonable, if we just launch the VS and not order VS to build the project, why the VS need to specify a configuration file. Configuration file be used when we need to build the project. So it could explain my first above screenshot.

    We could specify the build configuration only from VS UI, if the project has not been built and run the project with the second screenshot, after launching the VS then it will report error.

    And based on your code, we have not specified any one to build the project, so the configuration will not be used.

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, October 05, 2016 10:15 AM
    Moderator
  • But I think above process is reasonable, if we just launch the VS and not order VS to build the project, why the VS need to specify a configuration file. 

    On large complex solutions changing the build flavor within the IDE is not desirable because VS hangs for 10 minutes and sometimes gets into an infinite crash-restart-crash loop.

    I understand and accept this is how it has to be for now (future versions of VS will likely do better).

    Wednesday, October 12, 2016 7:06 PM
  • On large complex solutions changing the build flavor within the IDE is not desirable because VS hangs for 10 minutes and sometimes gets into an infinite crash-restart-crash loop.

    Have you reported it to MS?

    I understand and accept this is how it has to be for now (future versions of VS will likely do better).

    Have you tried your project with the VS 15 preview to see if it is
    better - rather than hoping in vain?

    Dave

    Wednesday, October 12, 2016 8:15 PM
  • Have you reported it to MS?

    Yes, we were told it would likely get better with future version of VS 2015.


    Have you tried your project with the VS 15 preview to see if it is
    better - rather than hoping in vain?

    We're hoping to do that soon. We're in the process of pushing a release out so we'd rather wait a bit.

    Thanks for your help David. :)

    Wednesday, October 12, 2016 10:59 PM
  • Hi _Yann_,

    Thanks for your response, would you please share a link about the report you have submitted to MS in this thread? I think it could help others who encountered the same issue yours. Thank you very much.

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Thursday, October 13, 2016 1:57 AM
    Moderator
  • >We're hoping to do that soon. We're in the process of pushing a release out so we'd rather wait a bit.

    I'd recommend that you do it ASAP - if there's still a problem there,
    the sooner you get back to MS and report it, the more chance there is
    it will get fixed.

    Dave

    Thursday, October 13, 2016 7:29 AM