Skip to content

Restore Microsoft.DotNet.TemplateLocator NuGet packaging on main#54394

Merged
marcpopMSFT merged 1 commit into
mainfrom
copilot/port-change-to-main-54329
May 27, 2026
Merged

Restore Microsoft.DotNet.TemplateLocator NuGet packaging on main#54394
marcpopMSFT merged 1 commit into
mainfrom
copilot/port-change-to-main-54329

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor

Microsoft.DotNet.TemplateLocator stopped producing a NuGet package after pack-related project settings were removed in a prior branch prep change. This PR ports the release/10.0.1xx fix to main so TemplateLocator package publication behavior is restored.

  • Packability restored

    • Reintroduces IsPackable for the project.
    • Adds source-build guard to keep pack disabled during DotNetBuild pass 1 (avoids incomplete multi-TFM package outputs in that phase).
  • Project-reference outputs restored in package

    • Reattaches CopyProjectReferencesToPackage to TargetsForTfmSpecificBuildOutput.
    • Restores packaging of managed ProjectReference copy-local outputs into BuildOutputInPackage.
  • Representative project-file change

    <IsPackable>true</IsPackable>
    <IsPackable Condition="'$(DotNetBuild)' == 'true' and '$(DotNetBuildPass)' != '2'">false</IsPackable>
    <TargetsForTfmSpecificBuildOutput>
      $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage
    </TargetsForTfmSpecificBuildOutput>
    
    <Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
      <ItemGroup>
        <BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
      </ItemGroup>
    </Target>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores NuGet packaging behavior for Microsoft.DotNet.TemplateLocator on main after prior project settings changes stopped producing the package.

Changes:

  • Re-enables packing via IsPackable, while disabling pack during DotNetBuild pass 1 to avoid incomplete multi-TFM outputs.
  • Ensures project-reference copy-local outputs are included in the NuGet package by adding a TFM-specific packaging target.

Agent-Logs-Url: https://github.com/dotnet/sdk/sessions/3bfa1b39-6c77-44b5-af97-01cbea1f1638

Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
@marcpopMSFT marcpopMSFT force-pushed the copilot/port-change-to-main-54329 branch from f2f1c85 to f79ddea Compare May 22, 2026 18:31
@marcpopMSFT

Copy link
Copy Markdown
Member

/ba-g unrelated test timeout

@marcpopMSFT marcpopMSFT merged commit 7dda1b1 into main May 27, 2026
23 of 25 checks passed
@marcpopMSFT marcpopMSFT deleted the copilot/port-change-to-main-54329 branch May 27, 2026 18:19
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone May 28, 2026
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.

4 participants