Skip to content

Commit

Permalink
Always use embedded except for processor which can be built without i…
Browse files Browse the repository at this point in the history
…t using property
  • Loading branch information
JohnMcPMS committed Feb 4, 2025
1 parent 07b3daf commit ca8cbf5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
<WinGetCsWinRTEmbedded>true</WinGetCsWinRTEmbedded>
<WinGetCsWinRTEmbedded Condition="'$(WinGetCsWinRTEmbedded)'==''">true</WinGetCsWinRTEmbedded>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand All @@ -31,8 +31,6 @@

<PropertyGroup Condition="'$(Configuration)'=='ReleaseStatic'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- From the name, ReleaseStatic would be a better fit for embedded. However, we will use embedded at all times except the inproc nuget package release, so it is better if it is in this configuration. -->
<WinGetCsWinRTEmbedded>false</WinGetCsWinRTEmbedded>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
<BuildOutputDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</BuildOutputDirectory>
<RootNamespace>Microsoft.WinGet.Configuration</RootNamespace>
<Configurations>Debug;Release;ReleaseStatic</Configurations>
<CsWinRTCcwLookupTableGeneratorEnabled>false</CsWinRTCcwLookupTableGeneratorEnabled>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
<WinGetCsWinRTEmbedded>true</WinGetCsWinRTEmbedded>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand All @@ -25,8 +19,6 @@

<PropertyGroup Condition="'$(Configuration)'=='ReleaseStatic'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- From the name, ReleaseStatic would be a better fit for embedded. However, we will use embedded at all times except the inproc nuget package release, so it is better if it is in this configuration. -->
<WinGetCsWinRTEmbedded>false</WinGetCsWinRTEmbedded>
</PropertyGroup>

<ItemGroup>
Expand All @@ -45,16 +37,7 @@
</PackageReference>
</ItemGroup>

<!-- This project doesn't reference CSWinRT, but specify this everywhere it will fail with NETSDK1130 and MSB3271. -->
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<ItemGroup Condition="'$(WinGetCsWinRTEmbedded)'!='true'">
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" />
</ItemGroup>

<Import Project="..\..\targets\ReferenceEmbeddedCsWinRTProject.targets" Condition="'$(WinGetCsWinRTEmbedded)'=='true'" />
<Import Project="..\..\targets\ReferenceEmbeddedCsWinRTProject.targets" />

<ItemGroup>
<ProjectReference Include="..\Microsoft.WinGet.Configuration.Engine\Microsoft.WinGet.Configuration.Engine.csproj" />
Expand Down Expand Up @@ -100,8 +83,6 @@
<Target Name="CopySharedDependencies" AfterTargets="AfterBuild" Condition="'$(Platform)' != 'ARM'">
<ItemGroup>
<ModuleSharedDependency Include="$(OutputPath)Microsoft.Management.Configuration.Processor.dll" />
<ModuleSharedDependency Include="$(OutputPath)Microsoft.Windows.SDK.NET.dll" Condition="'$(WinGetCsWinRTEmbedded)'!='true'" />
<ModuleSharedDependency Include="$(OutputPath)WinRT.Runtime.dll" Condition="'$(WinGetCsWinRTEmbedded)'!='true'" />
<ModuleSharedDependency Include="$(OutputPath)Microsoft.WinGet.SharedLib.dll" />
</ItemGroup>
<Message Importance="high" Text="Copying shared dependencies: '@(ModuleSharedDependency)'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
<DocumentationFile>$(OutputPath)\$(MSBuildProjectName).xml</DocumentationFile>
<RuntimeIdentifier>win</RuntimeIdentifier>
<Configurations>Debug;Release;ReleaseStatic</Configurations>
<CsWinRTCcwLookupTableGeneratorEnabled>false</CsWinRTCcwLookupTableGeneratorEnabled>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
<WinGetCsWinRTEmbedded>true</WinGetCsWinRTEmbedded>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand All @@ -24,8 +18,6 @@

<PropertyGroup Condition="'$(Configuration)'=='ReleaseStatic'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- From the name, ReleaseStatic would be a better fit for embedded. However, we will use embedded at all times except the inproc nuget package release, so it is better if it is in this configuration. -->
<WinGetCsWinRTEmbedded>false</WinGetCsWinRTEmbedded>
</PropertyGroup>

<ItemGroup>
Expand All @@ -44,17 +36,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- This project doesn't reference CSWinRT, but specify this everywhere it will fail with NETSDK1130 and MSB3271. -->
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>

<ItemGroup Condition="'$(WinGetCsWinRTEmbedded)'!='true'">
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.6" />
</ItemGroup>

<Import Project="..\..\targets\ReferenceEmbeddedCsWinRTProject.targets" Condition="'$(WinGetCsWinRTEmbedded)'=='true'" />
<Import Project="..\..\targets\ReferenceEmbeddedCsWinRTProject.targets" />

<ItemGroup>
<ProjectReference Include="..\..\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.csproj" />
Expand Down

0 comments on commit ca8cbf5

Please sign in to comment.