Produce standalone TemplateLocator package in pass 2#54560
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates build/packaging metadata so Microsoft.DotNet.TemplateLocator is built in the second source-build pass (on win-x64) and explicitly sets its NuGet package identity.
Changes:
- Set an explicit
PackageIdforMicrosoft.DotNet.TemplateLocator. - Add
Microsoft.DotNet.TemplateLocator.csprojto the pass-2ProjectToBuildlist for win-x64 product builds.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Microsoft.DotNet.TemplateLocator/Microsoft.DotNet.TemplateLocator.csproj | Adds an explicit PackageId for packing/publishing. |
| eng/Build.props | Builds TemplateLocator in DotNetBuildPass=2 alongside other dependent projects on win-x64. |
ViktorHofer
left a comment
There was a problem hiding this comment.
I assume you can't use the existing VS.Redist.Common.Net.Core.SDK.VSTemplateLocator package that we already provide to VS?
Yes, we technically could consume VS.Redist.Common.Net.Core.SDK.VSTemplateLocator, but it would be the wrong shape for C# Dev Kit. That package is a VS insertion/redist payload, not a normal library NuGet package. C# Dev Kit needs to reference TemplateLocator through standard NuGet restore/publish flows. Using the VS redist package would mean adding custom logic to extract/copy the right files from its layout, and would couple us to VS packaging details instead of the TemplateLocator package contract. |
@emaf Does this mean this package is moving to a shipping nuget.org package? |
No, we just need this to be available in any (internal) feeds. Just for context, C# Dev Kit already consumes and old version of this package that was produced by builds from the templating repo. The goal is to bring that back. |
Schedule Microsoft.DotNet.TemplateLocator as a pass-2 product build project and restore the historical NuGet package ID so official builds can pack and publish microsoft.dotnet.templateLocator again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The default SDK pack identity already matches the project name, so keep the project file simpler while still producing the standalone TemplateLocator package in pass 2. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0ca3ef8 to
d380e05
Compare
Summary
Schedule
Microsoft.DotNet.TemplateLocatoras a top-level pass-2 project in product builds so the standalone TemplateLocator NuGet package is produced alongside the VS redist layout package.Motivation
Microsoft.DotNet.TemplateLocator.csprojis packable only duringDotNetBuildPass=2, but it was only being built as a dependency of the VS redist layout project. That producedVS.Redist.Common.Net.Core.SDK.VSTemplateLocator, but did not produce the standalone TemplateLocator package.Validation
Validated on Windows x64 with a pass-2 product-style pack:
build.cmd -pack /p:DotNetBuild=true /p:DotNetBuildPass=2 /p:TargetOS=windows /p:TargetArchitecture=x64Confirmed both packages are produced:
artifacts\packages\Debug\NonShipping\Microsoft.DotNet.TemplateLocator.11.0.100-dev.nupkgartifacts\packages\Debug\NonShipping\VS.Redist.Common.Net.Core.SDK.VSTemplateLocator.11.0.100-dev.nupkgAlso ran the local publish/manifest phase before the latest cleanup and confirmed the generated asset manifest contains TemplateLocator as a
<Package>asset, not only the VS redist package.