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

Issues while building trying to use the Test Explorer in certain solutions #42121

Closed
Gnbrkm41 opened this issue Sep 11, 2020 · 10 comments · Fixed by #44703
Closed

Issues while building trying to use the Test Explorer in certain solutions #42121

Gnbrkm41 opened this issue Sep 11, 2020 · 10 comments · Fixed by #44703
Assignees
Milestone

Comments

@Gnbrkm41
Copy link
Contributor

This is all after a clean build via ./build.cmd clr+libs. Currently on VS2019 16.8 P2.1. I've experienced this with ./build.cmd -vs System.Diagnostics.EventLog and ./build.cmd -vs System.Globalization but I remember seeing this with a few other solutions as well.

VS tries to build TestUtilities when it's asked to run tests. It looks like TestUtilities targets NetCoreAppCurrent and .NET Framework 4.6.1 at the same time, and for some reason it tries to build the .NET Framework version too (and fails)? This is the error I get:

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Runtime.CompilerServices.Unsafe\net45-Debug\System.Runtime.CompilerServices.Unsafe.dll' could not be found	TestUtilities (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Common\tests\TestUtilities\CSC	1	Active

Perhaps it should exclude the net461 unless -framework net48 is specified when launching vs via command line? Not exactly sure what the issue is. I can provide the binlog if you need it.

cc @ViktorHofer

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Sep 11, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ViktorHofer
Copy link
Member

Do you know why the .NETFramework build of CompilerServices.Unsafe fails? Also do you have a binlog inside VS?

@Gnbrkm41
Copy link
Contributor Author

Gnbrkm41 commented Sep 11, 2020

Do you know why the .NETFramework build of CompilerServices.Unsafe fails?

I didn't build the library targeting net48 - Unsure if that's a requirement for using Test explorer? The only thing I did was build clr+libs.

Also do you have a binlog inside VS?

Yes, I actually do. Any places I could share it to? I'm trying to avoid posting it on GitHub directly as it seems to contain environment variables and things.

@ViktorHofer
Copy link
Member

We don't place any secrets in public build so no worries. Feel free to upload it here.

No, there's no requirement on a root NETFramework build anymore :)

@Gnbrkm41
Copy link
Contributor Author

We don't place any secrets in public build so no worries.

But it's builds on my PC! 😊 I'm seeing some environment variables listed on the binlog so I was slightly concerned about it. But at the same time it doesn't look like I have anything sensitive on there so it's probably fine to put it here.

TestUtilities_Debug_AnyCPU_Build_2020-09-11T22_28_01.5170401+09_00.binlog.txt - Remember to remove the last .txt extension. GitHub requires files to be on the allow-list of supported extensions...

@ViktorHofer
Copy link
Member

Oh sorry, got it. Thanks for the sharing the log.

@ghost
Copy link

ghost commented Sep 11, 2020

Tagging subscribers to this area: @ViktorHofer
See info in area-owners.md if you want to be subscribed.

@Anipik Anipik added this to the 6.0.0 milestone Sep 11, 2020
@Anipik Anipik removed the untriaged New issue has not been triaged by the area owner label Sep 11, 2020
@ViktorHofer
Copy link
Member

ViktorHofer commented Sep 24, 2020

I nearly forgot about this, sorry! Reason for this break is because the CompilerServices.Unsafe project is missing from the solutions. I will submit a PR to fix this but I hope we can find a better way to solve this, probably with slnf.

@ViktorHofer ViktorHofer self-assigned this Sep 24, 2020
@Gnbrkm41
Copy link
Contributor Author

Gnbrkm41 commented Oct 2, 2020

Trying to run some of the net5.0 tests with ./build.cmd -vs Microsoft.Extensions.Logging.EventSource -rc Release -lc Debug after ./build.cmd clr+libs+libs.tests -rc Release -lc Debug -test, I'm having more errors than just that:

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Bcl.AsyncInterfaces\net461-Debug\Microsoft.Bcl.AsyncInterfaces.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Bcl.AsyncInterfaces\net461-Debug\Microsoft.Bcl.AsyncInterfaces.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.DependencyInjection.Abstractions\net461-Debug\Microsoft.Extensions.DependencyInjection.Abstractions.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.DependencyInjection.Abstractions\net461-Debug\Microsoft.Extensions.DependencyInjection.Abstractions.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.DependencyInjection\net461-Debug\Microsoft.Extensions.DependencyInjection.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.DependencyInjection\net461-Debug\Microsoft.Extensions.DependencyInjection.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Logging.Abstractions\net461-Debug\Microsoft.Extensions.Logging.Abstractions.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Logging.Abstractions\net461-Debug\Microsoft.Extensions.Logging.Abstractions.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Logging.EventSource\net461-Debug\Microsoft.Extensions.Logging.EventSource.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Logging\net461-Debug\Microsoft.Extensions.Logging.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Logging\net461-Debug\Microsoft.Extensions.Logging.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Options\net461-Debug\Microsoft.Extensions.Options.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Options\net461-Debug\Microsoft.Extensions.Options.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Primitives\net461-Debug\Microsoft.Extensions.Primitives.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Primitives\net461-Debug\Microsoft.Extensions.Primitives.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\Microsoft.Extensions.Primitives\netcoreapp3.0-Debug\Microsoft.Extensions.Primitives.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Diagnostics.DiagnosticSource\net46-Debug\System.Diagnostics.DiagnosticSource.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Diagnostics.DiagnosticSource\net46-Debug\System.Diagnostics.DiagnosticSource.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Runtime.CompilerServices.Unsafe\net45-Debug\System.Runtime.CompilerServices.Unsafe.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Runtime.CompilerServices.Unsafe\net45-Debug\System.Runtime.CompilerServices.Unsafe.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Text.Encodings.Web\net461-Debug\System.Text.Encodings.Web.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Text.Encodings.Web\net461-Debug\System.Text.Encodings.Web.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Text.Json\net461-Debug\System.Text.Json.dll' could not be found	Microsoft.Extensions.Logging.EventSource (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\src\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\System.Text.Json\net461-Debug\System.Text.Json.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active
Error	CS0006	Metadata file 'C:\Users\gotos\source\repos\runtime\artifacts\bin\TestUtilities\net461-Debug\TestUtilities.dll' could not be found	Microsoft.Extensions.Logging.EventSource.Tests (net5.0)	C:\Users\gotos\source\repos\runtime\src\libraries\Microsoft.Extensions.Logging.EventSource\tests\CSC	1	Active

Running ./build.cmd libs -f net48 prior to running the tests does make it work.

@ViktorHofer
Copy link
Member

Had to request a few features from slngen which we now use to generate solution files and keep them up-to-date which took a bit longer. Just submitted a PR that should fix the issues that you are seeing: #44703

@ghost ghost locked as resolved and limited conversation to collaborators Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants