Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Is it possible to use Source link in private on-prem Gitlab instance?

$
0
0

I'm trying to create and push a simple .net library and want to be able to debug it using source link but from the docs is not clear if the source link works only for public repos (like github and gitlab, for example) or if it works as well for on-prem Gitlab instance.

I've tried to use it with .NET8 with s csproj like this:

<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType><TargetFramework>net8.0</TargetFramework><ImplicitUsings>enable</ImplicitUsings><Nullable>enable</Nullable><PublishRepositoryUrl>true</PublishRepositoryUrl><IncludeSymbols>true</IncludeSymbols><SymbolPackageFormat>snupkg</SymbolPackageFormat><EmbedUntrackedSources>true</EmbedUntrackedSources><SourceLinkCreate>true</SourceLinkCreate></PropertyGroup><ItemGroup><!-- compile time only dependency to make sourcelink work in gitlab --><PackageReference Include="Microsoft.SourceLink.GitLab" Version="8.0.0"><PrivateAssets>all</PrivateAssets><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets></PackageReference></ItemGroup></Project>

When I try to debug (as in, step into the code) what Visual Studio gives me is this message:enter image description here

And in the SymbolCache folder I have this:enter image description here

This tells me that what is happening is a decompilation process and source-link debug is not working.

In the publish nupkg I can see the repo info, so it seems that at least the repo linking is happening, not sure why I'm not able to do the source-link debugging.enter image description here

Can you help me understand this process?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>