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

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

Merged
merged 2 commits into from
Apr 7, 2020

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Apr 7, 2020

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
Copy link

ghost commented Apr 7, 2020

Tagging @ViktorHofer as an area owner

@ViktorHofer
Copy link
Member Author

cc @GrabYourPitchforks

@ViktorHofer
Copy link
Member Author

ViktorHofer commented Apr 7, 2020

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

@@ -284,7 +284,7 @@ static int Main (string[] args)

// 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
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
Member Author

Choose a reason for hiding this comment

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

Copy link
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
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
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
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).

Copy link
Member

@safern safern left a comment

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