Skip to content

Commit

Permalink
Update .NET from unsupported 4.5 to 4.8 to silence VS2022 (#12674)
Browse files Browse the repository at this point in the history
## Summary of the Pull Request
Closes #12670 
Visual Studio 2022 offered to upgrade .NET Framework from an unsupported 4.5 to a supported 4.8.  I let it do its thing (and undid a number of whitespace-only changes that aren't necessary).  The project still builds after this.  The UIA tests fail to run but I think that is preexisting and will be filing a new issue momentarily.

## PR Checklist
* [x] Closes #12670 
* [x] Tests added/passed

## Validation Steps Performed
The solution compiles in VS2022 (except for #12673).
  • Loading branch information
dmachaj authored Mar 14, 2022
1 parent a5194b0 commit bf551db
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WindowsTerminal.UIA.Tests</RootNamespace>
<AssemblyName>WindowsTerminal.UIA.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Expand All @@ -19,6 +19,7 @@
<WarningLevel>4</WarningLevel>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
Expand Down
5 changes: 4 additions & 1 deletion src/cascadia/WindowsTerminal_UIATests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
3 changes: 2 additions & 1 deletion src/host/ft_uia/Host.Tests.UIA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Conhost.UIA.Tests</RootNamespace>
<AssemblyName>Conhost.UIA.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Expand All @@ -19,6 +19,7 @@
<WarningLevel>4</WarningLevel>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
Expand Down
5 changes: 4 additions & 1 deletion src/host/ft_uia/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
2 changes: 1 addition & 1 deletion src/tools/vtapp/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
24 changes: 21 additions & 3 deletions src/tools/vtapp/VTApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>VTApp</RootNamespace>
<AssemblyName>VTApp</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
Expand Down Expand Up @@ -35,6 +35,24 @@
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -58,11 +76,11 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- Install an empty one for CSPROJ projects as they don't PGO. -->
<Target Name="MergePGOCounts" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

0 comments on commit bf551db

Please sign in to comment.