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

PublishRepositoryUrl is not automatically set by .NET SDK 8 #1203

Open
stijnherreman opened this issue Feb 11, 2024 · 0 comments
Open

PublishRepositoryUrl is not automatically set by .NET SDK 8 #1203

stijnherreman opened this issue Feb 11, 2024 · 0 comments

Comments

@stijnherreman
Copy link

From the README:

If your project uses .NET SDK 8+ and is hosted by the above providers it does not need to reference any Source Link packages or set any build properties.

Otherwise, you can enable Source Link experience in your project by setting a few properties and adding a PackageReference to a Source Link package specific to the provider:

<Project>
 <PropertyGroup>
    <!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
    <PublishRepositoryUrl>true</PublishRepositoryUrl>
 
    <!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
  </PropertyGroup>
  <ItemGroup>
    <!-- Add PackageReference specific for your source control provider (see below) --> 
  </ItemGroup>
</Project>

Both NuGet Package Explorer and the binlog tell me that EmbedUntrackedSources is set automatically, but PublishRepositoryUrl is not. I do see that GenerateRepositoryUrlAttribute = true is set automatically.

Without explicit PublishRepositoryUrl:
image

With explicit PublishRepositoryUrl:
image

I guess this is simply a documentation error, and not a bug in the SDK?

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

No branches or pull requests

1 participant