0

I've been following this documentation to enable SourceLink in an effort to be able to debug private nuget packages hosted on our Azure DevOps account, but have run into an issue.

The mere act of installing the appropriate nuget package (Microsoft.SourceLink.Vsts.Git) causes the build to fail with the following error:

1>vbc : error BC2001: file 'C:\Users\USER\AppData\Local\Temp\.NETStandard' could not be found
1>vbc : error BC2001: file 'C:\Projects\TheApp\TheLibrary\TheLibrary\Version=v2.0.AssemblyAttributes.vb' could not be found

This makes me think I'm missing some SDK or have the wrong version of VS2017, but it all seems ok: I'm on VS2017 15.8.7, have the .NET Core SDK 2.1.403 installed and the project is a .NET Standard 2.0 library.

Removing the nuget package makes the build pass again, but obviously removes the SourceLink support as well.

1 Answer 1

1

It turns out the issue was with the VB compiler. The SourceLink guide tells you that you can optionally include a <EmbedUntrackedSources>true</EmbedUntrackedSources> in the project file, but this causes the build to fail. An issue has been created to fix this in the compiler, but for now Microsoft advised me to just not inlcude that switch. Removing it let my build pass and SourceLink now works as advertised.

Sign up to request clarification or add additional context in comments.

1 Comment

Could you share the link to the issue? I'd like to read and watch this. Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.