Skip to content

Rename CoreFx.Private.TestUtilities and reference it in slns - #34656

Merged
ViktorHofer merged 2 commits into
dotnet:masterfrom
ViktorHofer:VSTestUtilities
Apr 7, 2020
Merged

Rename CoreFx.Private.TestUtilities and reference it in slns#34656
ViktorHofer merged 2 commits into
dotnet:masterfrom
ViktorHofer:VSTestUtilities

Conversation

@ViktorHofer

@ViktorHofer ViktorHofer commented Apr 7, 2020

Copy link
Copy Markdown
Member

This fixes the issue where VS refuses to build the test library because it has a reference to TestUtilities which isn't included in the sln. That wasn't a problem before but it seems now that we turned on project restore for everything or because we are using nuget static graph evaluation VS isn't happy about this anymore and errors.

Also I'm renaming CoreFx.Private.TestUtilities to TestUtilities as we don't want to use the corefx term anymore and don't need private in it anymore as well as we don't produce a package for that library anymore.

I didn't rename CoreFx.Private.TestUtilities.Unicode as I don't have any context about that test library but I hope @GrabYourPitchforks will do the same for it.

Fixes #31876

@ghost

ghost commented Apr 7, 2020

Copy link
Copy Markdown

Tagging @ViktorHofer as an area owner

@ViktorHofer

Copy link
Copy Markdown
Member Author

cc @GrabYourPitchforks

@ViktorHofer

ViktorHofer commented Apr 7, 2020

Copy link
Copy Markdown
Member Author

That's the script that I ran:

foreach ($slnFile in Get-ChildItem -Recurse -Path "*" -Filter *.sln)
{
    $parentDir = (get-item $slnFile.FullName).Directory.FullName
    $testsDir = Join-Path $parentDir tests
    if (Test-Path $testsDir)
    {
        dotnet sln $slnFile.FullName add -s tests Common\tests\TestUtilities\TestUtilities.csproj
    }
}

// Despite a lot of effort, couldn't get dotnet to load these assemblies from the sdk dir, so copy them to our binary dir
// File.Copy ($"{sdkdir}/Microsoft.DotNet.PlatformAbstractions.dll", AppContext.BaseDirectory, true);
File.Copy ($"{sdkdir}/CoreFx.Private.TestUtilities.dll", AppContext.BaseDirectory, true);
File.Copy ($"{sdkdir}/TestUtilities.dll", AppContext.BaseDirectory, true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, what is this program for?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a tool that converts xunit tests into a simple app that doesn't depend on the xunit runner, we use it for bringing up webassembly on netcore mono as a lot of the xunit machinery doesn't work there.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Didn't know if this was for pre-consolidation.

@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would changing the BOM marker change anything?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure, but I don't care much assuming we won't change these files again anytime soon (now that there is no target framework in them anymore).

@safern safern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Question, should we also rename: CoreFx.Private.TestUtilities.Unicode, to TestUtilities.Unicode ?

@ViktorHofer

Copy link
Copy Markdown
Member Author

I didn't rename CoreFx.Private.TestUtilities.Unicode as I don't have any context about that test library but I hope @GrabYourPitchforks will do the same for it.

@GrabYourPitchforks

Copy link
Copy Markdown
Member

Feel free to rename the Unicode project as well per Santi's suggestion. Otherwise if you don't get to it as part of this PR I'll send a separate PR for it.

@ViktorHofer

Copy link
Copy Markdown
Member Author

Failures are known infra ones.

@ViktorHofer
ViktorHofer merged commit d0dc66b into dotnet:master Apr 7, 2020
@ViktorHofer
ViktorHofer deleted the VSTestUtilities branch April 7, 2020 23:26
@ViktorHofer

Copy link
Copy Markdown
Member Author

@GrabYourPitchforks please send one, I'll be OOF rest of the week.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider renaming CoreFx.Private.TestUtilities

5 participants