A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>$(NetMacOS)</TargetFramework>
<SupportedOSPlatformVersion>12.0</SupportedOSPlatformVersion>
<OutputType>Exe</OutputType>
<EnableDefaultCssItems>false</EnableDefaultCssItems>
<DefineConstants>$(DefineConstants);__MACOS__</DefineConstants>
<!-- The following property disable trimming and AOT. This allow us to load plugins at runtime. -->
<LinkMode>None</LinkMode>
<ApplicationId>com.devtoys</ApplicationId>
<RootNamespace>DevToys.MacOS</RootNamespace>
<AssemblyName>DevToys</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="$(_IsPublishing) == ''">
<PluginsInstallationFolder>$(OutputPath)\$(TargetFramework)\Plugins</PluginsInstallationFolder>
</PropertyGroup>
<!-- Notes about the values set below:
1. For macOS it's possible to sign both the app bundle (EnableCodesigning=true) and the package (*.pkg) (EnablePackageSigning=true),
and these are signed separately and with different certificates.
CodesignKey: this is the signing key used for the app bundle
PackageSigningKey: this is the signing key used for the package
2. Publishing to the App Store requires signing both the app bundle and the package.
Must be 'Apple Distribution: ...' for the app bundle. Note that apps signed like this will not execute locally.
They have to be published to the App Store and then downloaded (Apple will resign the app with a different signing identity that allows for local execution).
Must be '3rd Party Mac Developer Installer: ...' for the pkg
3. Publishing outside of the App Store (i.e. only notarizing) requires:
Must be 'Developer ID Application: ...' for the app bundle
Must be 'Developer ID Installer: ...' for the pkg
4. During development, use the 'Apple Development: ...' signing key (typically to verify that the app works when is signed and entitlements are enforced).
5. Depending on the entitlements the app needs, a specific provisioning profile (CodesignProvision) might be needed.
6. UseHardenedRuntime must be set to true when app sandbox is enabled in Info.plist.
-->
<!--
For Debug: (Note: Replace placeholder information before building)
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<CodesignKey>Apple Development: YOURNAME (*******)</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignProvision>YOUR PROFILE NAME</CodesignProvision>
</PropertyGroup>
-->
<!--
For Release: (Note: Replace placeholder information before building)
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<EnableCodeSigning>True</EnableCodeSigning>
<ProvisionType>Manual</ProvisionType>
<CreatePackage>true</CreatePackage>
<EnablePackageSigning>true</EnablePackageSigning>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignKey>Apple Development: YOURNAME (*******)</CodesignKey>
<CodesignProvision>YOUR PROFILE NAME</CodesignProvision>
<PackageSigningKey>3rd Party Mac Developer Installer: YOURNAME (*******)</PackageSigningKey>
<UseHardenedRuntime>true</UseHardenedRuntime>
</PropertyGroup>-->
<ItemGroup>
<PackageReference Include="Microsoft.TypeScript.MSBuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\DevToys.Blazor\DevToys.Blazor.csproj"/>
<ProjectReference Include="..\..\..\DevToys.Localization\DevToys.Localization.csproj"/>
</ItemGroup>
<ItemGroup>
<Content Include="$(RepoRoot)\src\app\dev\platforms\desktop\DevToys.Windows\wwwroot\index.html" Link="wwwroot\index.html"/>
<!-- Workaround for an error "The path .. would result in a file outside the App Bundle and cannot be used"
See https://stackoverflow.com/a/16939385 -->
<Content Remove="Assets.xcassets\Contents.json"/>
<BundleResource Include="Assets.xcassets\Contents.json"/>
<Content Remove="Assets.xcassets\AppIcon.appiconset\Contents.json"/>
<BundleResource Include="Assets.xcassets\AppIcon.appiconset\Contents.json"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Strings\AppMenuBar\AppMenuBar.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AppMenuBar.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Update="Strings\AppMenuBar\AppMenuBar.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AppMenuBar.resx</DependentUpon>
</Compile>
</ItemGroup>
<Target Name="_SkipCodesignVerify" BeforeTargets="_CodesignVerify" AfterTargets="_CodesignAppBundle">
<PropertyGroup>
<_RequireCodeSigning>false</_RequireCodeSigning>
</PropertyGroup>
</Target>
</Project>