Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WinRT.Host and WinRT.Host.Shim to Nuget #582

Merged
merged 18 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from 6 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: 3 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ set cswinrt_exe=%cswinrt_bin_dir%cswinrt.exe
set netstandard2_runtime=%~dp0WinRT.Runtime\bin\%cswinrt_configuration%\netstandard2.0\WinRT.Runtime.dll
set net5_runtime=%~dp0WinRT.Runtime\bin\%cswinrt_configuration%\net5.0\WinRT.Runtime.dll
set source_generator=%~dp0Authoring\WinRT.SourceGenerator\bin\%cswinrt_configuration%\netstandard2.0\WinRT.SourceGenerator.dll
set winrt_host_%cswinrt_platform%=%~dp0_build\%cswinrt_platform%\%cswinrt_configuration%\WinRT.Host\bin\WinRT.Host.dll
set winrt_shim=%~dp0WinRT.Host.Shim\bin\%cswinrt_configuration%\net5.0\WinRT.Host.Shim.dll
echo Creating nuget package
call :exec .nuget\nuget pack nuget/Microsoft.Windows.CsWinRT.nuspec -Properties cswinrt_exe=%cswinrt_exe%;netstandard2_runtime=%netstandard2_runtime%;net5_runtime=%net5_runtime%;source_generator=%source_generator%;cswinrt_nuget_version=%cswinrt_version_string% -OutputDirectory %cswinrt_bin_dir% -NonInteractive -Verbosity Detailed -NoPackageAnalysis
call :exec .nuget\nuget pack nuget/Microsoft.Windows.CsWinRT.nuspec -Properties cswinrt_exe=%cswinrt_exe%;netstandard2_runtime=%netstandard2_runtime%;net5_runtime=%net5_runtime%;source_generator=%source_generator%;cswinrt_nuget_version=%cswinrt_version_string%;winrt_host_x86=%winrt_host_x86%;winrt_host_x64=%winrt_host_x64%;winrt_host_amd=%winrt_host_amd%;winrt_host_arm64=%winrt_host_arm64%;winrt_shim=%winrt_shim% -OutputDirectory %cswinrt_bin_dir% -NonInteractive -Verbosity Detailed -NoPackageAnalysis
j0shuams marked this conversation as resolved.
Show resolved Hide resolved
goto :eof

:exec
Expand Down
5 changes: 5 additions & 0 deletions nuget/Microsoft.Windows.CsWinRT.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@
<file src="readme.txt"/>
<file src="$net5_runtime$" target="lib\net5.0\"/>
<file src="$source_generator$" target="analyzers\dotnet\cs\"/>
<file src="$winrt_host_x64$" target ="native/x64"/>
<file src="$winrt_host_x86$" target ="native/x86"/>
<file src="$winrt_host_arm$" target ="native/arm"/>
<file src="$winrt_host_arm64$" target ="native/arm64"/>
<file src="$winrt_shim$" target ="lib\net5.0\"/>
</files>
</package>
6 changes: 6 additions & 0 deletions nuget/Microsoft.Windows.CsWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ $(CsWinRTFilters)
<Message Text="$(CsWinRTCommand)" Importance="$(CsWinRTMessageImportance)" />
<Exec Command="$(CsWinRTCommand)" />
</Target>

<Target Name="RemoveShimDll" Condition="'$(CsWinRTComponent)'!='true'">
j0shuams marked this conversation as resolved.
Show resolved Hide resolved
<ItemGroup>
<Reference Remove="lib/net5.0/WinRT.Host.Shim.dll"/>
</ItemGroup>
</Target>

<Target Name="CsWinRTIncludeProjection" BeforeTargets="BeforeCompile" DependsOnTargets="CsWinRTGenerateProjection" Condition="$(CsWinRTEnabled)">
<ItemGroup>
Expand Down