Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit d7f255c

Browse files
committed
Stop forcing runtime version in tests
1 parent 06c6fca commit d7f255c

File tree

3 files changed

+3
-27
lines changed

3 files changed

+3
-27
lines changed

test/Microsoft.DotNet.ShellShim.Tests/ShellShimRepositoryTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ private static FilePath MakeHelloWorldExecutableDll(string instanceName = null)
474474

475475
TestAssetInstance testInstance = TestAssets.Get(testAppName)
476476
.CreateInstance(instanceName)
477-
.UseCurrentRuntimeFrameworkVersion()
478477
.WithRestoreFiles()
479478
.WithBuildFiles();
480479

test/Microsoft.DotNet.TestFramework/TestAssetInstance.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,23 +172,6 @@ public TestAssetInstance WithProjectChanges(Action<string, XDocument> xmlAction)
172172
return this;
173173
}
174174

175-
public TestAssetInstance UseCurrentRuntimeFrameworkVersion()
176-
{
177-
return WithProjectChanges(project =>
178-
{
179-
var ns = project.Root.Name.Namespace;
180-
181-
var propertyGroup = project.Root.Elements(ns + "PropertyGroup").LastOrDefault();
182-
if (propertyGroup == null)
183-
{
184-
propertyGroup = new XElement(ns + "PropertyGroup");
185-
project.Root.Add(propertyGroup);
186-
}
187-
188-
propertyGroup.Add(new XElement(ns + "RuntimeFrameworkVersion", CurrentRuntimeFrameworkVersion));
189-
});
190-
}
191-
192175
private static string RebasePath(string path, string oldBaseDirectory, string newBaseDirectory)
193176
{
194177
path = Path.IsPathRooted(path) ? PathUtility.GetRelativePath(PathUtility.EnsureTrailingSlash(oldBaseDirectory), path) : path;

test/dotnet.Tests/PackagedCommandTests.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,15 @@ public static IEnumerable<object[]> LibraryDependencyToolArguments
5959
}
6060

6161
[Theory]
62-
[InlineData("AppWithDirectAndToolDep", true)]
63-
[InlineData("AppWithToolDependency", false)]
64-
public void TestProjectToolIsAvailableThroughDriver(string appName, bool useCurrentFrameworkRuntimeVersion)
62+
[InlineData("AppWithDirectAndToolDep")]
63+
[InlineData("AppWithToolDependency")]
64+
public void TestProjectToolIsAvailableThroughDriver(string appName)
6565
{
6666
var testInstance = TestAssets.Get(appName)
6767
.CreateInstance()
6868
.WithSourceFiles()
6969
.WithNuGetConfig(new RepoDirectoriesProvider().TestPackages);
7070

71-
if (useCurrentFrameworkRuntimeVersion)
72-
{
73-
testInstance = testInstance.UseCurrentRuntimeFrameworkVersion();
74-
}
75-
7671
// restore again now that the project has changed
7772
new RestoreCommand()
7873
.WithWorkingDirectory(testInstance.Root)
@@ -281,7 +276,6 @@ public void TestProjectDependencyIsNotAvailableThroughDriver()
281276
var testInstance = TestAssets.Get("AppWithDirectDep")
282277
.CreateInstance()
283278
.WithSourceFiles()
284-
.UseCurrentRuntimeFrameworkVersion()
285279
.WithNuGetConfig(new RepoDirectoriesProvider().TestPackages);
286280

287281
// restore again now that the project has changed

0 commit comments

Comments
 (0)