Skip to content

Commit

Permalink
Bug,解决.NET通过SupportedOSPlatformVersion兼容XP后提示不是有效Win32程序
Browse files Browse the repository at this point in the history
  • Loading branch information
mingkuang-Chuyu committed May 5, 2024
1 parent bd8ccc8 commit 57e4e61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NuGet/build/net8.0-windows7.0/YY-Thunks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<YY_Thunks_File Condition="'$(YY_Thunks_File)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetPlatformMinVersion), 5.1))">x86\YY_Thunks_for_WinXP.obj</YY_Thunks_File>
<YY_Thunks_File Condition="'$(YY_Thunks_File)' == ''">x86\YY_Thunks_for_Win2K.obj</YY_Thunks_File>
</PropertyGroup>
<PropertyGroup Condition="'$(LinkerSubsystem)'=='WINDOWS' or '$(LinkerSubsystem)'=='CONSOLE'">
<LinkerSubsystem Condition="'$(YY_Thunks_File)'=='x64\YY_Thunks_for_WinXP.obj'">$(LinkerSubsystem),5.02</LinkerSubsystem>
<!--微软的链接器无法设置 5.0,一般人应该也不需要兼容Windows 2K,先统一设置为Windows XP吧。-->
<LinkerSubsystem Condition="'$(YY_Thunks_File)'=='x86\YY_Thunks_for_WinXP.obj' or '$(YY_Thunks_File)'=='x86\YY_Thunks_for_Win2K.obj'">$(LinkerSubsystem),5.01</LinkerSubsystem>
</PropertyGroup>
<ItemGroup Condition="'$(YY_Thunks_File)' != ''">
<LinkerArg Include="$(MSBuildThisFileDirectory)..\native\objs\$(YY_Thunks_File)" />
</ItemGroup>
Expand Down

0 comments on commit 57e4e61

Please sign in to comment.