Skip to content

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

Closed

Description

@Gnbrkm41

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

Activity

  1. added
    untriaged
    on Sep 11, 2020
  2. Dotnet-GitSync-Bot commented on Sep 11, 2020

    @Dotnet-GitSync-Bot
    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.

  3. ViktorHofer commented on Sep 11, 2020

    @ViktorHofer
    Member

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

  4. Gnbrkm41 commented on Sep 11, 2020

    @Gnbrkm41
    ContributorAuthor

    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.

  5. ViktorHofer commented on Sep 11, 2020

    @ViktorHofer
    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 :)

  6. Gnbrkm41 commented on Sep 11, 2020

    @Gnbrkm41
    ContributorAuthor

    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...

  7. ViktorHofer commented on Sep 11, 2020

    @ViktorHofer
    Member

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

  8. added this to the 6.0.0 milestone on Sep 11, 2020
  9. removed
    untriaged
    on Sep 11, 2020
  10. ViktorHofer commented on Sep 24, 2020

    @ViktorHofer
    Member

    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.

  11. self-assigned this
    on Sep 24, 2020
  12. Gnbrkm41 commented on Oct 2, 2020

    @Gnbrkm41
    ContributorAuthor

    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.

  13. ViktorHofer commented on Nov 15, 2020

    @ViktorHofer
    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

  14. ghost locked as resolved and limited conversation to collaborators on Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions