MSBuildSdks icon indicating copy to clipboard operation
MSBuildSdks copied to clipboard

Add 'dotnet new' templates for NoTargets and Traversal

Open MattKotsenas opened this issue 1 year ago • 5 comments

Fixes #472

Add two new projects: Microsoft.Build.NoTargets.Templates and Microsoft.Build.Traversal.Templates that each publish a NuGet package that can be installed / used via dotnet new.

I wasn't quite sure how best to structure the project, so feedback is appreciated. Some things to consider:

  • The template projects currently live under their respective "feature" folders. It's also common to create a top-level "Templates" folder like this, however that breaks the package-per-feature pattern currently used in the repo.
    • Additionally, currently the templates folder is a child of the main project in the source tree, but they're more conceptually siblings. If there's a different arrangement that makes more sense to people let me know.
  • Currently the version for the template packages match the version of the SDK package. I think that makes sense, but if they should be versioned independently I can make that change as well.
  • The NoTargets template uses the .csproj extension. If we should use .proj, or if there's a better extension to use, please let me know.
  • I added several comments to help new users, but there may be so much that it's annoying for experienced users. Editing feedback welcome.
  • In order to keep the NoTargets template consistent with the README, I changed the TargetFrameworkVersion in the README from net462 to netstandard2.0, since that's compatible with both .NET Framework and .NET, and still supported (basically) everywhere.

MattKotsenas avatar Jan 14 '24 21:01 MattKotsenas

Friendly ping here. I fully expect this review to take a couple of rounds to get the directory layout the way maintainers want, so any help / guidance is very appreciated. Thanks!

MattKotsenas avatar Feb 26 '24 21:02 MattKotsenas

@AndyGerlicher has assumed ownership of this repo

jeffkl avatar Feb 27 '24 17:02 jeffkl

Just FYI discussing this internally with the MSBuild team. I want to make sure this aligns with their vision before we make this change. Sorry for the delay!

AndyGerlicher avatar Mar 01 '24 22:03 AndyGerlicher

Hi there! Friendly ping here. Any updates, or concerns / issues I can help address? Thanks!

MattKotsenas avatar Mar 30 '24 23:03 MattKotsenas