Skip to content

Commit f032bca

Browse files
committed
删除 VC++ 依赖
1 parent 68a4fb5 commit f032bca

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

CoreAppUAP/CoreAppUAP.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@
1212
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
1313
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
1414
<TargetFramework>net8.0-windows10.0.26100.0</TargetFramework>
15-
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
15+
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
1616
<UseUwp>True</UseUwp>
1717
<VersionPrefix>0.0.1</VersionPrefix>
1818
</PropertyGroup>
1919

20+
<PropertyGroup>
21+
<AddMicrosoftVCLibsSDKReference>False</AddMicrosoftVCLibsSDKReference>
22+
<EnableAppxWindowsUniversalTargetDeviceFamilyItem>False</EnableAppxWindowsUniversalTargetDeviceFamilyItem>
23+
</PropertyGroup>
24+
2025
<ItemGroup>
2126
<PackageReference Include="CommunityToolkit.Common" Version="8.4.0" />
2227
<PackageReference Include="MetroLog.Net6" Version="2.1.0" />

CoreAppUAP/Package.appxmanifest

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
BackgroundColor="transparent">
3636
<DefaultTile WideLogo="Assets\WideTile.png"/>
3737
<SplashScreen Image="Assets\SplashScreen.png"/>
38+
<InitialRotationPreference>
39+
<Rotation Preference="landscape"/>
40+
<Rotation Preference="portrait"/>
41+
<Rotation Preference="landscapeFlipped"/>
42+
<Rotation Preference="portraitFlipped"/>
43+
</InitialRotationPreference>
3844
<LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\BadgeLogo.png"/>
3945
</VisualElements>
4046
<Extensions>

CoreAppUAP/RemoveDependencies.targets

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@
2323
{
2424
foreach (var node in dependencies.ToArray())
2525
{
26-
node.Remove();
26+
if (!node.HasElements)
27+
{
28+
node.Remove();
29+
}
2730
}
2831
}
2932
xdoc.Save(AppxManifestPath);
3033
}
31-
catch (Exception ex)
34+
catch
3235
{
33-
Log.LogError("Failed to load Appx Manifest." + ex);
36+
Log.LogError("Failed to load Appx Manifest.");
3437
_Success = false;
3538
}
3639
]]>

0 commit comments

Comments
 (0)