Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ build.cmd
To use the tool locally, you need to build it from source. Once it's built, the tool will live under:

```
/artifacts/bin/try-convert/Debug/net5.0/try-convert.exe
/artifacts/bin/try-convert/Debug/net6.0/try-convert.exe
```

Alternatively, you can look at the following directory and copy that into somewhere else on your machine:

```
mv /artifacts/bin/try-convert/Debug/net5.0/publish C:/Users/<user>/try-convert
mv /artifacts/bin/try-convert/Debug/net6.0/publish C:/Users/<user>/try-convert
```

You can invoke the tool from the publish directory as well.
Expand Down
4 changes: 2 additions & 2 deletions src/MSBuild.Conversion.Facts/MSBuildFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ public static class MSBuildFacts
public const string PackagesSubstring = @"\packages";
public const string NetStandard20 = "netstandard2.0";
public const string NetCoreApp31 = "netcoreapp3.1";
public const string Net5 = "net5.0";
public const string Net5Windows = "net5.0-windows";
public const string Net5 = "net6.0";

Choose a reason for hiding this comment

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

I don't know this code, but having a const named Net5 with value net6.0 looks misleading.

Copy link
Author

Choose a reason for hiding this comment

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

I guess time to update to .NET 8.0 now.

public const string Net5Windows = "net6.0-windows";
public const string AppConfig = "App.config";
public const string EmbeddedResourceGeneratorProperty = "Generator";
public const string SettingsSingleFileGenerator = "SettingsSingleFileGenerator";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<OutputType>Library</OutputType>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace>WpfApp1</RootNamespace>
<AssemblyName>WpfApp1</AssemblyName>
Expand Down
14 changes: 7 additions & 7 deletions tests/end-to-end/Smoke.Tests/BasicConversions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void ConvertsLegacyFSharpConsoleToNet50()
{
var projectToConvertPath = GetFSharpProjectPath("SmokeTests.LegacyFSharpConsole");
var projectBaselinePath = GetFSharpProjectPath("SmokeTests.FSharpConsoleNet5Baseline");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net5.0");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net6.0");
}

[Fact]
Expand All @@ -57,15 +57,15 @@ public void ConvertsWpfFrameworkTemplateForNet50()
{
var projectToConvertPath = GetCSharpProjectPath("SmokeTests.WpfFramework");
var projectBaselinePath = GetCSharpProjectPath("SmokeTests.WpfNet5Baseline");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net5.0-windows");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net6.0-windows");
}

[Fact]
public void ConvertsWpfVbFrameworkTemplateForNet50()
{
var projectToConvertPath = GetVisualBasicProjectPath("SmokeTests.WpfVbFramework");
var projectBaselinePath = GetVisualBasicProjectPath("SmokeTests.WpfVbNet5Baseline");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net5.0-windows");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net6.0-windows");
}

[Fact]
Expand All @@ -89,15 +89,15 @@ public void ConvertsWinformsFrameworkTemplateForNet50()
{
var projectToConvertPath = GetCSharpProjectPath("SmokeTests.WinformsFramework");
var projectBaselinePath = GetCSharpProjectPath("SmokeTests.WinformsNet5Baseline");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net5.0-windows");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net6.0-windows");
}

[Fact]
public void ConvertsWinformsFrameworkTemplateForNet50WithForceRemoveCustomImports()
{
var projectToConvertPath = GetCSharpProjectPath("SmokeTests.WinformsFramework");
var projectBaselinePath = GetCSharpProjectPath("SmokeTests.WinformsNet5Baseline");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net5.0-windows", forceRemoveCustomImports : true);
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net6.0-windows", forceRemoveCustomImports : true);
}

[Fact]
Expand All @@ -113,7 +113,7 @@ public void ConvertsLegacyMSTestVB()
{
var projectToConvertPath = GetVisualBasicProjectPath("SmokeTests.LegacyMSTestVB");
var projectBaselinePath = GetVisualBasicProjectPath("SmokeTests.MSTestVbNet5Baseline");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net5.0-windows");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net6.0-windows");
}

[Fact]
Expand All @@ -129,7 +129,7 @@ public void ConvertsLegacyWebLibraryToNet5()
{
var projectToConvertPath = GetCSharpProjectPath("SmokeTests.LegacyWebLibrary");
var projectBaselinePath = GetCSharpProjectPath("SmokeTests.WebLibraryNet5Baseline");
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net5.0", true);
AssertConversionWorks(projectToConvertPath, projectBaselinePath, "net6.0", true);
}

private void AssertConversionWorks(string projectToConvertPath, string projectBaselinePath, string targetTFM, bool forceWeb = false, bool keepTargetFramework = false, bool forceRemoveCustomImports = false)
Expand Down