Skip to content

Commit

Permalink
优化项目清单
Browse files Browse the repository at this point in the history
  • Loading branch information
wherewhere committed Nov 8, 2023
1 parent f463132 commit babcffa
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install .NET Core App
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{env.DOTNET_VERSION}}
dotnet-version: ${{ env.DOTNET_VERSION }}
dotnet-quality: 'preview'

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
Expand Down
42 changes: 9 additions & 33 deletions CoreAppUWP/CoreAppUWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,22 @@
<CsWinRTIncludes>CoreAppUWP.WinRT</CsWinRTIncludes>
<DefineConstants>DISABLE_XAML_GENERATED_MAIN</DefineConstants>
<EnableMsixTooling>True</EnableMsixTooling>
<LangVersion>preview</LangVersion>
<OutputType>WinExe</OutputType>
<Platforms>x86;x64;ARM64</Platforms>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<RepositoryUrl>https://github.com/wherewhere/CoreAppUWP</RepositoryUrl>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<TargetFramework>net7.0-windows10.0.22621.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<TrimMode>partial</TrimMode>
<UseWinUI>True</UseWinUI>
<VersionPrefix>0.0.1</VersionPrefix>
</PropertyGroup>

<PropertyGroup>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxBundle>Never</AppxBundle>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<AppxPackageDir>AppPackages</AppxPackageDir>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
<GenerateTestArtifacts>False</GenerateTestArtifacts>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<PackageCertificateThumbprint>0CDF4A03E9BE9DD789894BB3C7AD3DEDECD9AB25</PackageCertificateThumbprint>
</PropertyGroup>

<!--
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>

<!--
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>
<Compile Remove="AppPackages\**" />
<EmbeddedResource Remove="AppPackages\**" />
<None Remove="AppPackages\**" />
<Page Remove="AppPackages\**" />
</ItemGroup>

<ItemGroup>
Expand All @@ -57,6 +30,9 @@
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Layout" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
<PackageReference Include="MetroLog.Net6" Version="2.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
Expand Down
2 changes: 1 addition & 1 deletion CoreAppUWP/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Identity
Name="wherewhere.CoreAppUWP"
Publisher="CN=where"
Version="1.0.0.0" />
Version="0.0.1.0" />

<mp:PhoneIdentity PhoneProductId="5821cf42-963a-4994-8c75-73a3420f4726" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
61 changes: 61 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<Project>
<PropertyGroup>
<Authors>wherewhere</Authors>
<Copyright>Copyright © 2017 - 2023 wherewhere. All Rights Reserved.</Copyright>
<Description>UWP running on .NET Core App</Description>
<LangVersion>preview</LangVersion>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>True</PublishRepositoryUrl>
<RepositoryUrl>https://github.com/wherewhere/CoreAppUWP</RepositoryUrl>
</PropertyGroup>

<PropertyGroup>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxBundle>Never</AppxBundle>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<AppxPackageDir>AppPackages</AppxPackageDir>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxPackageSigningTimestampServerUrl>http://timestamp.digicert.com</AppxPackageSigningTimestampServerUrl>
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>

<!--
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>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcore5.0'">
<NugetTargetMoniker>.NETCore,Version=v5.0</NugetTargetMoniker>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
<TargetPlatformMinVersion>10.0</TargetPlatformMinVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.15138.0'">
<DefineConstants>$(DefineConstants);UAP10_0_15138_0</DefineConstants>
<TargetPlatformMinVersion>10.0.15138.0</TargetPlatformMinVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'
or '$(TargetFramework)' == 'uap10.0.15138.0'">
<CopyLocalLockFileAssemblies>False</CopyLocalLockFileAssemblies>
<DefaultLanguage>en-US</DefaultLanguage>
<DefineConstants>$(DefineConstants);NETCORE;NETCORE_5_0;NETFX_CORE;WINDOWS_UWP;UAP10_0</DefineConstants>
<LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
<NugetTargetMoniker>UAP,Version=v10.0</NugetTargetMoniker>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
</PropertyGroup>
</Project>
20 changes: 20 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project>
<!--
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>

<ItemGroup Condition="'$(TargetFramework)' == 'netcore5.0'">
<PackageReference Include="Microsoft.NETCore" Version="5.0.2" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility" Version="1.0.2" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'uap10.0'
or '$(TargetFramework)' == 'uap10.0.15138.0'">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>
</Project>

0 comments on commit babcffa

Please sign in to comment.