1

I have created a tool that generates a solution containing multiple projects. The problem is when I open this solution up in VS the configuration build option is not set (i.e if you build the solution the projects don't get built - they are skipped). The user has to go in and manually check the check boxes in the configuration dialog in order to have these projects build with the solution.

I am unclear as to how to automatically set this value. Where can this be set?

2 Answers 2

2

In your solution file, you need to add a section something like

GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {Project_Guid}.Debug|x64.Build.0 = Debug|x64
EndGlobalSection

Where Project_Guid is the unique ID for your project ( not the Project Type ID ). This tells the solution which Project configurations to build for each Solution configuration. In this case, build the Project Debug|x64 configuration for the Solution's Debug|x64 configuration.

Sign up to request clarification or add additional context in comments.

Comments

0

Thanks Andrew. It turns out my guids where all lowercase (generated by Guid.NewGuid()). This appears to confuse VS. Changing the Guid generation to Guid.NewGuid().ToString().ToUpper() fixes the problem

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.