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:
And in the SymbolCache folder I have this:
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.
Can you help me understand this process?