114 行
5.9 KiB
XML
114 行
5.9 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<OutputType>WinExe</OutputType>
|
|
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
|
|
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
|
<WindowsSdkPackageVersion>10.0.22621.39</WindowsSdkPackageVersion>
|
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
<Platforms>x64;arm64</Platforms>
|
|
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
|
|
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
|
<UseWinUI>true</UseWinUI>
|
|
<EnableMsixTooling>true</EnableMsixTooling>
|
|
<RestoreSources>
|
|
https://api.nuget.org/v3/index.json;
|
|
https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-MainLatest/nuget/v3/index.json;
|
|
</RestoreSources>
|
|
|
|
<!--
|
|
WinUI 3 doesn't need support for 'INotifyPropertyChanging', so we can disable it.
|
|
This avoids all generated code for it and provides a small performance improvement.
|
|
-->
|
|
<MvvmToolkitEnableINotifyPropertyChangingSupport>false</MvvmToolkitEnableINotifyPropertyChangingSupport>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
|
|
<!--
|
|
Temporary workaround: don't fail builds for 'IL2059' errors, like this:
|
|
"XamlTypeInfo.g.cs(495): Trim analysis warning IL2059: ComputeSharp.SwapChain.WinUI.ComputeSharp_SwapChain_WinUI_XamlTypeInfo.XamlTypeInfoProvider.
|
|
StaticInitializer_38_Nullable(): Unrecognized value passed to the parameter 'type' of method 'System.Runtime. CompilerServices.RuntimeHelpers
|
|
.RunClassConstructor(RuntimeTypeHandle)'. It's not possible to guarantee the availability of the target static constructor."
|
|
This is due to a bug in the .NET trim analyzer and in ILC, see: https://github.com/dotnet/runtime/issues/106939.
|
|
The best fix would also be to update the XAML compiler in WinAppSDK to skip generating unnecessary static constructor stubs.
|
|
-->
|
|
<TrimmerSingleWarn>false</TrimmerSingleWarn>
|
|
<WarningsNotAsErrors>$(WarningsNotAsErrors);IL2059</WarningsNotAsErrors>
|
|
</PropertyGroup>
|
|
|
|
<!-- Additional CsWinRT properties (temporary, until the .NET SDK is updated) -->
|
|
<PropertyGroup>
|
|
|
|
<!--
|
|
We're only referencing CsWinRT for the source generators, we don't need to read any WinRT metadata.
|
|
CsWinRT is in projection mode by default, so we want to disable it (or it'd need the Windows SDK).
|
|
-->
|
|
<CsWinRTGenerateProjection>false</CsWinRTGenerateProjection>
|
|
|
|
<!-- We'll never have any IIDs to patch in this library -->
|
|
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
|
|
|
|
<!-- Enable AOT warnings for types implementing projected WinRT interfaces mapped to built-in types (eg. 'INotifyPropertyChanged') -->
|
|
<CsWinRTAotWarningLevel>2</CsWinRTAotWarningLevel>
|
|
</PropertyGroup>
|
|
|
|
<!-- CsWinRT size saving options -->
|
|
<PropertyGroup>
|
|
<CsWinRTEnableDynamicObjectsSupport>false</CsWinRTEnableDynamicObjectsSupport>
|
|
<CsWinRTUseExceptionResourceKeys>true</CsWinRTUseExceptionResourceKeys>
|
|
</PropertyGroup>
|
|
|
|
<!-- NativeAOT options -->
|
|
<PropertyGroup>
|
|
<PublishAot>true</PublishAot>
|
|
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
<StackTraceSupport>false</StackTraceSupport>
|
|
<OptimizationPreference>Speed</OptimizationPreference>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<Content Include="..\ComputeSharp.SwapChain\Textures\RustyMetal.png">
|
|
<Link>Assets\Textures\RustyMetal.png</Link>
|
|
</Content>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.0" />
|
|
<PackageReference Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.2.240824-build.1155" />
|
|
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.2.240824-build.1155" />
|
|
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.1" />
|
|
</ItemGroup>
|
|
|
|
<!--
|
|
Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
|
|
Tools extension to be activated for this project even if the Windows App SDK Nuget
|
|
package has not yet been restored.
|
|
-->
|
|
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
|
|
<ProjectCapability Include="Msix" />
|
|
</ItemGroup>
|
|
|
|
<!--
|
|
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
|
|
Explorer "Package and Publish" context menu entry to be enabled for this project even if
|
|
the Windows App SDK Nuget package has not yet been restored.
|
|
-->
|
|
<PropertyGroup Condition="'$(DisableHasPackageAndPublishMenuAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
|
|
<HasPackageAndPublishMenu>true</HasPackageAndPublishMenu>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp.D2D1.WinUI\ComputeSharp.D2D1.WinUI.csproj" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp.D2D1\ComputeSharp.D2D1.csproj" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp.D2D1.SourceGenerators\ComputeSharp.D2D1.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
|
</ItemGroup>
|
|
|
|
<!-- Shared projects for the DX12/D2D1 shaders -->
|
|
<Import Project="..\ComputeSharp.SwapChain.Shaders\ComputeSharp.SwapChain.Shaders.projitems" Label="Shared" />
|
|
<Import Project="..\ComputeSharp.SwapChain.Shaders.D2D1\ComputeSharp.SwapChain.Shaders.D2D1.projitems" Label="Shared" />
|
|
</Project>
|