Skip to content

Commit

Permalink
Fix Microsoft.Windows.Console.ConPTY package runtime identifiers #18387
Browse files Browse the repository at this point in the history
win10-* is no longer a valid rid

https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph

This package would fail to install the dependencies to the correct
location in .net 8 and later by default. win-x64 is a valid runtime id
in prior .net versions so I think this should be back compat.

Without this the package fails to do its job on newer builds unless `
<UseRidGraph>true</UseRidGraph>` and the user sets `win10-x64` as their
RID in their project file.
  • Loading branch information
mitchcapper authored Jan 6, 2025
1 parent 441709e commit c6e7f32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\..\inc\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(ConptyNativePlatform)\lib\uap10.0\conpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(MSBuildThisFileDirectory)..\..\runtimes\win-$(ConptyNativePlatform)\lib\uap10.0\conpty.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(ConptyNativePlatform)\native\conpty.dll" />
<ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-$(ConptyNativePlatform)\native\conpty.dll" />
<ReferenceCopyLocalPaths Condition="'$(ConptyRequiresx86Host)'=='true'" Include="$(MSBuildThisFileDirectory)\runtimes\x86\OpenConsole.exe">
<DestinationSubDirectory>x86\</DestinationSubDirectory>
</ReferenceCopyLocalPaths>
Expand Down
12 changes: 6 additions & 6 deletions src/winconpty/package/winconpty.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@

<file src="../../../src/inc/conpty-static.h" target="inc/conpty.h" />

<file src="../../../bin/Win32/Release/conpty.dll" target="runtimes/win10-x86/native" />
<file src="../../../bin/Win32/Release/conpty.lib" target="runtimes/win10-x86/lib/uap10.0" />
<file src="../../../bin/Win32/Release/conpty.dll" target="runtimes/win-x86/native" />
<file src="../../../bin/Win32/Release/conpty.lib" target="runtimes/win-x86/lib/uap10.0" />
<file src="../../../bin/Win32/Release/OpenConsole.exe" target="build/native/runtimes/x86" />

<file src="../../../bin/x64/Release/conpty.dll" target="runtimes/win10-x64/native" />
<file src="../../../bin/x64/Release/conpty.lib" target="runtimes/win10-x64/lib/uap10.0" />
<file src="../../../bin/x64/Release/conpty.dll" target="runtimes/win-x64/native" />
<file src="../../../bin/x64/Release/conpty.lib" target="runtimes/win-x64/lib/uap10.0" />
<file src="../../../bin/x64/Release/OpenConsole.exe" target="build/native/runtimes/x64" />

<file src="../../../bin/ARM64/Release/conpty.lib" target="runtimes/win10-arm64/lib/uap10.0" />
<file src="../../../bin/ARM64/Release/conpty.dll" target="runtimes/win10-arm64/native" />
<file src="../../../bin/ARM64/Release/conpty.lib" target="runtimes/win-arm64/lib/uap10.0" />
<file src="../../../bin/ARM64/Release/conpty.dll" target="runtimes/win-arm64/native" />
<file src="../../../bin/ARM64/Release/OpenConsole.exe" target="build/native/runtimes/arm64" />
</files>
</package>

0 comments on commit c6e7f32

Please sign in to comment.