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

Add MSBuild support for controlling --verbosity, --configuration, --platform and project file arguments to slngen.exe #609

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

jdrobison
Copy link
Member

This change gives project authors greater control over the parameters passed to slngen.exe by the SlnGen task:

slngen.exe Parameter MSBuild property/item Default value
--verbosity SlnGenVerbosity (property) Normal
--configuration SlnGenConfiguration (property) Unspecified
--platform SlnGenPlatform (property) Unspecified
Projects in solution SlnGenProjects (item) The project being built

Here's an example of project authoring using the new MSBuild properties and items:

<PropertyGroup Label="SlnGen configuration properties">
  <SlnGenLaunchVisualStudio>false</SlnGenLaunchVisualStudio>
  <SlnGenSolutionFileFullPath>$(MSBuildProjectDirectory)\$(MSBuildProjectName).sln</SlnGenSolutionFileFullPath>
  <SlnGenFolders>true</SlnGenFolders>
  <SlnGenVerbosity>Minimal</SlnGenVerbosity>
  <SlnGenPlatform>AnyCPU</SlnGenPlatform>
  <SlnGenConfiguration>Debug;Release</SlnGenConfiguration>
</PropertyGroup>
<ItemGroup Label="SlnGen configuration items">
  <SlnGenProjects Include="**\*.csproj" />
  <SlnGenProjects Include="..\..\..\UnitTests\**\File*.csproj" />
</ItemGroup>

…latform and project file arguments to slngen.exe
@jdrobison
Copy link
Member Author

jdrobison commented Oct 2, 2024

Does a completed PR automatically result in publishing an updated NuGet package, or is there a separate process for that? If the former, what is the typical latency between PR completion and the NuGet package update?

Also, what is the process for updating https://microsoft.github.io/slngen ?

@mruxmohan4, @AndyGerlicher

@mruxmohan4
Copy link
Contributor

There is a separate process which requires approval for package updates; however, there should be minimal latency between PR completion and package updates (should be in effect same day as PR completion).

@jdrobison
Copy link
Member Author

There is a separate process which requires approval for package updates; however, there should be minimal latency between PR completion and package updates (should be in effect same day as PR completion).

Ah, is that the process that's documented in RELEASE.md?

@mruxmohan4
Copy link
Contributor

Yes, I will add a note that repo maintainers are responsible for those package pushes.
Just reviewed the issue and changes - MSBuild properties/items seem appropriate for this use case.
Thank you for your contribution.

Regarding https://microsoft.github.io/slngen/, I will create a separate PR to update documentation (along with the changes made here). Generally, those changes are made here: https://github.com/microsoft/slngen/tree/main/docs

@mruxmohan4 mruxmohan4 merged commit d26bbad into microsoft:main Oct 4, 2024
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.

2 participants