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

Adding the appropriate SourceLink Nuget causes build to fail #193

Closed
lhersman opened this issue Oct 17, 2018 · 10 comments
Closed

Adding the appropriate SourceLink Nuget causes build to fail #193

lhersman opened this issue Oct 17, 2018 · 10 comments
Labels

Comments

@lhersman
Copy link

lhersman commented Oct 17, 2018

I've been following the documentation on this repo 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 (Pro), 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.

@lhersman lhersman changed the title Add the appropriate SourceLink Nuget cause build to fail. Adding the appropriate SourceLink Nuget cause build to fail. Oct 17, 2018
@lhersman lhersman changed the title Adding the appropriate SourceLink Nuget cause build to fail. Adding the appropriate SourceLink Nuget causes build to fail Oct 17, 2018
@tmat
Copy link
Member

tmat commented Oct 17, 2018

Could you try to run msbuild MyProj.vbproj /bl:log.binlog and share the log?

@lhersman
Copy link
Author

Could you try to run msbuild MyProj.vbproj /bl:log.binlog and share the log?

Pretty big log, if you want the whole thing let me know. Here's the last bit with the error, looks the same:

Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Profession al\MSBuild\15.0\bin\Roslyn vbc : error BC2001: file 'C:\Users\USER\AppData\Local\Temp\.NETStandard' could not be found [C:\Projects\TheApp\TheProject\TheProject\TheProject.vbproj] vbc : error BC2001: file 'C:\Projects\TheApp\TheProject\TheProject\Version=v2.0.AssemblyAttributes.vb ' could not be found [C:\Projects\TheApp\TheProject\TheProject\TheProject.vbproj] Done Building Project "C:\Projects\TheApp\TheProject\TheProject\TheProject.vbproj" (default targets) -- FAILED.

@tmat
Copy link
Member

tmat commented Oct 17, 2018

Yes, the whole file is needed for investigation. Thanks.

@lhersman
Copy link
Author

Yes, the whole file is needed for investigation. Thanks.

Gotcha, here it is:

BuildLog.txt

@tmat
Copy link
Member

tmat commented Oct 18, 2018

Sorry, I meant the file log.binlog. It contains information about all properties and tasks executed during the build. If you don't want to share it publicly feel free to send me link to OneDrive or Google Drive to my email: tomat@microsoft.com

@lhersman
Copy link
Author

Sorry, I meant the file log.binlog. It contains information about all properties and tasks executed during the build. If you don't want to share it publicly feel free to send me link to OneDrive or Google Drive to my email: tomat@microsoft.com

Ah, I see. Emailed the file to you with the subject "Sourcelink Issue #193 binlog". Thanks!

@tmat
Copy link
Member

tmat commented Oct 18, 2018

This is a bug in VB compiler: dotnet/roslyn#30586

The workaround is to remove

<EmbedUntrackedSources>true</EmbedUntrackedSources>

That is, not use the SourceLink feature that embeds untracked files automatically.

@tmat tmat added the external label Oct 18, 2018
@lhersman
Copy link
Author

lhersman commented Oct 18, 2018

This is a bug in VB compiler: dotnet/roslyn#30586

The workaround is to remove

<EmbedUntrackedSources>true</EmbedUntrackedSources>

That is, not use the SourceLink feature that embeds untracked files automatically.

Thanks tmat, removing <EmbedUntrackedSources> fixed the issue and SourceLink now works!

@tmat
Copy link
Member

tmat commented Oct 18, 2018

Glad to hear that. Thanks for reporting the issue.

@tmat tmat closed this as completed Oct 18, 2018
@tmat
Copy link
Member

tmat commented Jan 28, 2019

The compiler issue has been fixed: dotnet/roslyn#32015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants