You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issues while building trying to use the Test Explorer in certain solutions #42121
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.
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.
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.
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.
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.
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
Activity
Dotnet-GitSync-Bot commentedon Sep 11, 2020
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 commentedon Sep 11, 2020
Do you know why the .NETFramework build of CompilerServices.Unsafe fails? Also do you have a binlog inside VS?
Gnbrkm41 commentedon Sep 11, 2020
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.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 commentedon Sep 11, 2020
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 commentedon Sep 11, 2020
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
.txtextension. GitHub requires files to be on the allow-list of supported extensions...ViktorHofer commentedon Sep 11, 2020
Oh sorry, got it. Thanks for the sharing the log.
ViktorHofer commentedon 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.
Gnbrkm41 commentedon Oct 2, 2020
Trying to run some of the net5.0 tests with
./build.cmd -vs Microsoft.Extensions.Logging.EventSource -rc Release -lc Debugafter./build.cmd clr+libs+libs.tests -rc Release -lc Debug -test, I'm having more errors than just that:Running
./build.cmd libs -f net48prior to running the tests does make it work.ViktorHofer commentedon Nov 15, 2020
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