Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MSBuild properties to update solution file name and enable folder creation #557

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

mruxmohan4
Copy link
Contributor

@mruxmohan4 mruxmohan4 commented Nov 16, 2023

As discussed in #503, use the SlnGenFolders and SlnGenProjectName MSBuild properties to customize solution file names and enable folder creation in solutions.

This avoids the need for developers to both a) type --folder true and b) use the default dirs.proj (which appears in VS solution explorer as well):

Build started 11/15/2023 7:12:30 PM.
Searching "C:\src\test\slngen-custom\Custom" for projects
Generating solution for project "C:\src\test\slngen-custom\Custom\dirs.proj"
Loading project references...
Loaded 1 project(s) in 971ms
Generating Visual Studio solution "C:\src\test\slngen-custom\Custom\MyAwesomeComponent.sln" ...
Launching Visual Studio...

Success
    0 Warning(s)
    0 Error(s)

Example dirs.proj with the properties set:

<Project Sdk="Microsoft.Build.Traversal">
  <PropertyGroup>
    <SlnGenFolders>true</SlnGenFolders>
    <SlnGenProjectName>MyAwesomeComponent</SlnGenProjectName>
  </PropertyGroup>
  <ItemGroup>
    <!-- Build all projects recursively -->
    <ProjectReference Include="**/*.*proj" />
  </ItemGroup>
</Project>

@mruxmohan4 mruxmohan4 merged commit 3ba13c2 into microsoft:main Nov 27, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants