ctaggart / SourceLink

Source Code On Demand
MIT License
356 stars 55 forks source link

SourceLink not working without Just My Code Disabled #325

Closed HristoHentov closed 6 years ago

HristoHentov commented 6 years ago

As the title suggests, I am facing some issues getting SourceLink to work when "Just My Code" is enabled.

The setup is the following :

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <FileVersion>1.0.12</FileVersion>
    <Version>1.0.12</Version>
    <AssemblyVersion>1.0.12</AssemblyVersion>
    <SourceLinkUrl>https://bitbucket.company.com/projects/mk/repos/sourcelinktest/raw/*?at={commit}</SourceLinkUrl>
    <DebugType>portable</DebugType>
    <ci>true</ci>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" />
    <DotNetCliToolReference Include="dotnet-sourcelink" Version="2.8.0" />
  </ItemGroup>
</Project>

If I DISABLE Just my code, SourceLinking works fine, but if I leave it on it stops working. No errors, no nothing. It simply does not try to download the source.

I had a similliar project, hosted publicly on bitbucket (not behind a company domain), that worked fine even when Just My Code was enabled. The difference there is no property and it is on .NET framework instead of .NET Standard. Also it is with v. 2.5.0 of SourceLink.Create.CommandLine

ctaggart commented 6 years ago

That is going to be a Visual Studio debugger issue. Which VS version? If "Just My Code" is enabled, should it debug into code that isn't yours?