Skip to content

Commit

Permalink
Migrate to single project MSIX packaging
Browse files Browse the repository at this point in the history
Replace Windows Application Packaging Project with Microsoft.Windows.SDK.BuildTools.MSIX
  • Loading branch information
daniel-lerch committed Dec 8, 2024
1 parent f8fe8ef commit 58a17d0
Show file tree
Hide file tree
Showing 39 changed files with 103 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ publish/
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
#*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
Expand Down
29 changes: 6 additions & 23 deletions Vocup.sln
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setup", "setup", "{2EC721A1
setup\vocup.iss = setup\vocup.iss
EndProjectSection
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Vocup.Packaging", "src\Vocup.Packaging\Vocup.Packaging.wapproj", "{B6986B1F-50BC-4E36-87B4-1C195B15F953}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DB3F9D1B-E719-4A4B-8953-5FB027887083}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vocup.UnitTests", "tests\Vocup.UnitTests\Vocup.UnitTests.csproj", "{AEB8CB75-2A9D-4DE1-B4F8-B529FFA21240}"
Expand All @@ -63,38 +61,24 @@ Global
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|ARM64.ActiveCfg = Debug|ARM64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|ARM64.Build.0 = Debug|ARM64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|ARM64.Deploy.0 = Debug|ARM64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|x64.ActiveCfg = Debug|x64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|x64.Build.0 = Debug|x64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|x64.Deploy.0 = Debug|x64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|x86.ActiveCfg = Debug|x86
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|x86.Build.0 = Debug|x86
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Debug|x86.Deploy.0 = Debug|x86
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|Any CPU.Build.0 = Release|Any CPU
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|ARM64.ActiveCfg = Release|ARM64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|ARM64.Build.0 = Release|ARM64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|ARM64.Deploy.0 = Release|ARM64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|x64.ActiveCfg = Release|x64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|x64.Build.0 = Release|x64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|x64.Deploy.0 = Release|x64
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|x86.ActiveCfg = Release|x86
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|x86.Build.0 = Release|x86
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|ARM64.ActiveCfg = Debug|ARM64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|ARM64.Build.0 = Debug|ARM64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|ARM64.Deploy.0 = Debug|ARM64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|x64.ActiveCfg = Debug|x64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|x64.Build.0 = Debug|x64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|x64.Deploy.0 = Debug|x64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|x86.ActiveCfg = Debug|x86
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|x86.Build.0 = Debug|x86
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Debug|x86.Deploy.0 = Debug|x86
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|ARM64.ActiveCfg = Release|ARM64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|ARM64.Build.0 = Release|ARM64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|ARM64.Deploy.0 = Release|ARM64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|x64.ActiveCfg = Release|x64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|x64.Build.0 = Release|x64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|x64.Deploy.0 = Release|x64
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|x86.ActiveCfg = Release|x86
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|x86.Build.0 = Release|x86
{B6986B1F-50BC-4E36-87B4-1C195B15F953}.Release|x86.Deploy.0 = Release|x86
{004AE06A-96F3-4B2E-9AF4-524835814A36}.Release|x86.Deploy.0 = Release|x86
{AEB8CB75-2A9D-4DE1-B4F8-B529FFA21240}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEB8CB75-2A9D-4DE1-B4F8-B529FFA21240}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEB8CB75-2A9D-4DE1-B4F8-B529FFA21240}.Debug|ARM64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -149,7 +133,6 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{004AE06A-96F3-4B2E-9AF4-524835814A36} = {C15174B9-657C-4871-BD70-E367286C3A48}
{B6986B1F-50BC-4E36-87B4-1C195B15F953} = {C15174B9-657C-4871-BD70-E367286C3A48}
{AEB8CB75-2A9D-4DE1-B4F8-B529FFA21240} = {DB3F9D1B-E719-4A4B-8953-5FB027887083}
{3A27DC34-46FB-44FB-B169-C3AAC746AC9B} = {C15174B9-657C-4871-BD70-E367286C3A48}
{B6B9C56D-7384-4D6B-B822-FB70E5D6ACCA} = {C15174B9-657C-4871-BD70-E367286C3A48}
Expand Down
105 changes: 0 additions & 105 deletions src/Vocup.Packaging/Vocup.Packaging.wapproj

This file was deleted.

File renamed without changes
File renamed without changes.
14 changes: 14 additions & 0 deletions src/Vocup.WinForms/Properties/PublishProfiles/win-arm64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>ARM64</Platform>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
</PropertyGroup>
</Project>
14 changes: 14 additions & 0 deletions src/Vocup.WinForms/Properties/PublishProfiles/win-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
</PropertyGroup>
</Project>
14 changes: 14 additions & 0 deletions src/Vocup.WinForms/Properties/PublishProfiles/win-x86.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
</PropertyGroup>
</Project>
10 changes: 10 additions & 0 deletions src/Vocup.WinForms/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"profiles": {
"Vocup.WinForms (Package)": {
"commandName": "MsixPackage"
},
"Vocup.WinForms (Unpackaged)": {
"commandName": "Project"
}
}
}
46 changes: 42 additions & 4 deletions src/Vocup.WinForms/Vocup.WinForms.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
<AssemblyName>Vocup</AssemblyName>
<RootNamespace>Vocup</RootNamespace>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
<Platforms>AnyCPU;x86;x64;ARM64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<EnableMsixTooling>true</EnableMsixTooling>
<!-- For ARM64 builds not to fail, satellite assemblies must be configured https://github.com/dotnet/sdk/issues/28419 -->
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<ApplicationIcon>icon.ico</ApplicationIcon>
Expand All @@ -20,9 +22,11 @@
<Version>2.1.0</Version>
<NeutralLanguage>en</NeutralLanguage>
</PropertyGroup>

<ItemGroup>
<Content Include="icon.ico" />
<ProjectReference Include="..\Vocup\Vocup.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Win32.Interoperability" Version="$(AvaloniaVersion)" />
Expand All @@ -31,15 +35,49 @@
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!--<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />-->
<PackageReference Include="Microsoft.Windows.SDK.BuildTools.MSIX" Version="1.1.20241024.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Force higher version because of vulnerabilities in the default version -->
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<!-- Force higher version because of vulnerabilities in the default version -->
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<!-- Force higher version because of vulnerabilities in the default version -->
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Vocup\Vocup.csproj" />
<Content Include="icon.ico" />
<Content Include="Images\LargeTile.scale-100.png" />
<Content Include="Images\LargeTile.scale-200.png" />
<Content Include="Images\LargeTile.scale-400.png" />
<Content Include="Images\SmallTile.scale-100.png" />
<Content Include="Images\SmallTile.scale-200.png" />
<Content Include="Images\SmallTile.scale-400.png" />
<Content Include="Images\SplashScreen.scale-100.png" />
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\SplashScreen.scale-400.png" />
<Content Include="Images\Square150x150Logo.scale-100.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-400.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-16.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-256.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-48.png" />
<Content Include="Images\Square44x44Logo.scale-100.png" />
<Content Include="Images\Square44x44Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.scale-400.png" />
<Content Include="Images\Square44x44Logo.targetsize-16.png" />
<Content Include="Images\Square44x44Logo.targetsize-256.png" />
<Content Include="Images\Square44x44Logo.targetsize-48.png" />
<Content Include="Images\StoreLogo.scale-100.png" />
<Content Include="Images\StoreLogo.scale-200.png" />
<Content Include="Images\StoreLogo.scale-400.png" />
<Content Include="Images\VhfLogo.png" />
<Content Include="Images\Wide310x150Logo.scale-100.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
<Content Include="Images\Wide310x150Logo.scale-400.png" />
</ItemGroup>
<ItemGroup>
<None Update="Resources\easter_egg.vhf">
Expand Down
2 changes: 0 additions & 2 deletions src/Vocup/Vocup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Vocup.Avalonia</AssemblyName>
<Platforms>AnyCPU;x86;x64;ARM64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions tests/Vocup.UnitTests/Vocup.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
Expand Down

0 comments on commit 58a17d0

Please sign in to comment.