Skip to content

Unable to build library test project in Visual Studio聽#40039

Closed

Description

@alefranz

Description

Hello 馃憢!

I'm trying to work on Microsoft.Extensions.Logging.Console in Visual Studio Preview.

I can build and run the tests successfully from the command line, but when I open the library project in VS with
.\build.cmd -vs Microsoft.Extensions.Logging.Console
I am unable to build the test projects due to the following error:

2>------ Build started: Project: Microsoft.Extensions.Logging.Console.Tests, Configuration: Debug Any CPU ------
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4469,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "_GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences".
2>Done building project "TestUtilities.csproj" -- FAILED.
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(4469,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "_GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences".
2>Done building project "TestUtilities.csproj" -- FAILED.

Any idea of what I could be doing wrong? Thank you!

Configuration

Visual Studio: Version 16.7.0 Preview 6.0
Windows Pro x64 Version 10.0.19041 Build 19041

master @ 065bf96

Regression?

build problem

Activity

  1. Dotnet-GitSync-Bot commented on Jul 28, 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.

  2. alefranz commented on Jul 28, 2020

    @alefranz
    ContributorAuthor
  3. added this to the 5.0.0 milestone on Jul 28, 2020
  4. safern commented on Jul 28, 2020

    @safern
    Member

    Thanks @alefranz for reporting. Something to note, you shouldn't longer need to use the -vs switch to run tests from VS as we now use a .settings file that the test explorer uses to run the tests.

    We will take a look at the issue you're hitting.

  5. alefranz commented on Jul 28, 2020

    @alefranz
    ContributorAuthor

    we now use a .settings file that the test explorer uses to run the tests.

    I don't seem to have a .settings file.

    So what is the recommended workflow?
    Should I simply set the path for the dotnet sdk, cd into the library folder and launch the sln in VS?

  6. ViktorHofer commented on Jul 28, 2020

    @ViktorHofer
    Member

    The runsettings file is created automatically during the test libraries build. As that is failing for you, you won't have it. We will look into the test build's failure. Probably a fallout from a recent change that I did.

  7. self-assigned this
    on Jul 29, 2020
  8. ghost locked as resolved and limited conversation to collaborators on Dec 8, 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