Skip to content

Commit 82fa2d4

Browse files
rido-minRon Petrusha
authored and
Ron Petrusha
committed
Create MSIX package for WinForms Core app (dotnet#390)
* WinForms Core MSIX * update release urls * ignore bundle artifacts * BundLe * Remove AnyCPU * add README, fix manifest with tokens * Update README * Update wapproj to enable debugging Add debugger type * Fix README Addressing @rpetrusha feedback
1 parent 62cab30 commit 82fa2d4

File tree

65 files changed

+907
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+907
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>netcoreapp3.0</TargetFramework>
6+
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
7+
<SelfContained>true</SelfContained>
8+
<Platforms>AnyCPU;x86</Platforms>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<FrameworkReference Include="Microsoft.DesktopUI" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<ProjectReference Include="..\WindowsFormsApp1\WindowsFormsApp1.csproj" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<Folder Include="Properties\" />
21+
</ItemGroup>
22+
23+
<Target Name="__GetPublishItems" DependsOnTargets="ComputeFilesToPublish" Returns="@(_PublishItem)">
24+
<ItemGroup>
25+
<_PublishItem Include="@(ResolvedFileToPublish->'%(FullPath)')" TargetPath="%(ResolvedFileToPublish.RelativePath)" OutputGroup="__GetPublishItems" />
26+
<_PublishItem Include="$(ProjectDepsFilePath)" TargetPath="$(ProjectDepsFileName)" />
27+
<_PublishItem Include="$(ProjectRuntimeConfigFilePath)" TargetPath="$(ProjectRuntimeConfigFileName)" />
28+
</ItemGroup>
29+
</Target>
30+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Windows.Forms;
3+
4+
namespace CoreWinFormsApp1
5+
{
6+
class Program
7+
{
8+
[STAThread]
9+
static void Main()
10+
11+
{
12+
Application.EnableVisualStyles();
13+
Application.SetCompatibleTextRenderingDefault(false);
14+
Application.Run(new WindowsFormsApp1.Form1());
15+
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28010.2041
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp1", "WindowsFormsApp1\WindowsFormsApp1.csproj", "{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}"
7+
EndProject
8+
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "WindowsFormsApp1.Package", "WindowsFormsApp1.Package\WindowsFormsApp1.Package.wapproj", "{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreWinFormsApp1", "CoreWinFormsApp1\CoreWinFormsApp1.csproj", "{BF70C62C-99B5-47C5-B527-A4AD1338723E}"
11+
EndProject
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C3AFF30C-502F-4A5B-BF49-785A9F4C4089}"
13+
ProjectSection(SolutionItems) = preProject
14+
README.md = README.md
15+
EndProjectSection
16+
EndProject
17+
Global
18+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
19+
Debug|x64 = Debug|x64
20+
Debug|x86 = Debug|x86
21+
Release|x64 = Release|x64
22+
Release|x86 = Release|x86
23+
EndGlobalSection
24+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
25+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x64.ActiveCfg = Debug|Any CPU
26+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x64.Build.0 = Debug|Any CPU
27+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x86.ActiveCfg = Debug|x86
28+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x86.Build.0 = Debug|x86
29+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x64.ActiveCfg = Release|Any CPU
30+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x64.Build.0 = Release|Any CPU
31+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x86.ActiveCfg = Release|x86
32+
{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x86.Build.0 = Release|x86
33+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x64.ActiveCfg = Debug|x64
34+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x64.Build.0 = Debug|x64
35+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x64.Deploy.0 = Debug|x64
36+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x86.ActiveCfg = Debug|x86
37+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x86.Build.0 = Debug|x86
38+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x86.Deploy.0 = Debug|x86
39+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x64.ActiveCfg = Release|x64
40+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x64.Build.0 = Release|x64
41+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x64.Deploy.0 = Release|x64
42+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x86.ActiveCfg = Release|x86
43+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x86.Build.0 = Release|x86
44+
{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x86.Deploy.0 = Release|x86
45+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x64.ActiveCfg = Debug|Any CPU
46+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x64.Build.0 = Debug|Any CPU
47+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x86.ActiveCfg = Debug|x86
48+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x86.Build.0 = Debug|x86
49+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x64.ActiveCfg = Release|Any CPU
50+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x64.Build.0 = Release|Any CPU
51+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x86.ActiveCfg = Release|x86
52+
{BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x86.Build.0 = Release|x86
53+
EndGlobalSection
54+
GlobalSection(SolutionProperties) = preSolution
55+
HideSolutionNode = FALSE
56+
EndGlobalSection
57+
GlobalSection(ExtensibilityGlobals) = postSolution
58+
SolutionGuid = {E34C6E40-45E2-459E-AF10-FE4E6D3319D3}
59+
EndGlobalSection
60+
EndGlobal
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BundleArtifacts/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap">
3+
<Identity Name="WindowsFormsApp1.Package" Publisher="CN=rmpablos" Version="0.0.3.0" />
4+
<Properties>
5+
<DisplayName>WindowsFormsApp1 MSIX Sample</DisplayName>
6+
<PublisherDisplayName>rmpablos</PublisherDisplayName>
7+
<Logo>Images\StoreLogo.png</Logo>
8+
</Properties>
9+
<Dependencies>
10+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
11+
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
12+
</Dependencies>
13+
<Resources>
14+
<Resource Language="x-generate" />
15+
</Resources>
16+
<Applications>
17+
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
18+
<uap:VisualElements DisplayName="WindowsFormsApp1" Description="WindowsFormsApp1 MSIX Sample" BackgroundColor="transparent" Square150x150Logo="Images\Square150x150Logo.png" Square44x44Logo="Images\Square44x44Logo.png">
19+
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square310x310Logo="Images\LargeTile.png" Square71x71Logo="Images\SmallTile.png">
20+
</uap:DefaultTile>
21+
<uap:SplashScreen Image="Images\SplashScreen.png" />
22+
</uap:VisualElements>
23+
</Application>
24+
</Applications>
25+
<Capabilities>
26+
<Capability Name="internetClient" />
27+
<rescap:Capability Name="runFullTrust" />
28+
</Capabilities>
29+
</Package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
4+
<VisualStudioVersion>15.0</VisualStudioVersion>
5+
</PropertyGroup>
6+
<ItemGroup Label="ProjectConfigurations">
7+
<ProjectConfiguration Include="Debug|x86">
8+
<Configuration>Debug</Configuration>
9+
<Platform>x86</Platform>
10+
</ProjectConfiguration>
11+
<ProjectConfiguration Include="Release|x86">
12+
<Configuration>Release</Configuration>
13+
<Platform>x86</Platform>
14+
</ProjectConfiguration>
15+
<ProjectConfiguration Include="Debug|x64">
16+
<Configuration>Debug</Configuration>
17+
<Platform>x64</Platform>
18+
</ProjectConfiguration>
19+
<ProjectConfiguration Include="Release|x64">
20+
<Configuration>Release</Configuration>
21+
<Platform>x64</Platform>
22+
</ProjectConfiguration>
23+
<ProjectConfiguration Include="Debug|AnyCPU">
24+
<Configuration>Debug</Configuration>
25+
<Platform>AnyCPU</Platform>
26+
</ProjectConfiguration>
27+
<ProjectConfiguration Include="Release|AnyCPU">
28+
<Configuration>Release</Configuration>
29+
<Platform>AnyCPU</Platform>
30+
</ProjectConfiguration>
31+
</ItemGroup>
32+
<PropertyGroup>
33+
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
34+
</PropertyGroup>
35+
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
36+
<PropertyGroup>
37+
<ProjectGuid>fa0d80ab-4fc9-40d6-aa5f-e50044ed2c5c</ProjectGuid>
38+
<TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
39+
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
40+
<DefaultLanguage>en-US</DefaultLanguage>
41+
<PackageCertificateKeyFile>WindowsFormsApp1.Package_TemporaryKey.pfx</PackageCertificateKeyFile>
42+
<GenerateAppInstallerFile>false</GenerateAppInstallerFile>
43+
<AppxAutoIncrementPackageRevision>false</AppxAutoIncrementPackageRevision>
44+
<EntryPointProjectUniqueName>..\CoreWinFormsApp1\CoreWinFormsApp1.csproj</EntryPointProjectUniqueName>
45+
</PropertyGroup>
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
47+
<AppxBundle>Never</AppxBundle>
48+
</PropertyGroup>
49+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
50+
<AppxBundle>Never</AppxBundle>
51+
</PropertyGroup>
52+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
53+
<AppxBundle>Never</AppxBundle>
54+
</PropertyGroup>
55+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
56+
<AppxBundle>Never</AppxBundle>
57+
</PropertyGroup>
58+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
59+
<AppxBundle>Never</AppxBundle>
60+
</PropertyGroup>
61+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
62+
<AppxBundle>Never</AppxBundle>
63+
</PropertyGroup>
64+
<ItemGroup>
65+
<AppxManifest Include="Package.appxmanifest">
66+
<SubType>Designer</SubType>
67+
</AppxManifest>
68+
<None Include="WindowsFormsApp1.Package_TemporaryKey.pfx" />
69+
</ItemGroup>
70+
<ItemGroup>
71+
<Content Include="Images\*" />
72+
</ItemGroup>
73+
<ItemGroup>
74+
<ProjectReference Include="..\CoreWinFormsApp1\CoreWinFormsApp1.csproj" SkipGetTargetFrameworkProperties="true" Properties="RuntimeIdentifier=win-x86;SelfContained=true" />
75+
</ItemGroup>
76+
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
77+
<PropertyGroup>
78+
<PackageOutputGroups>@(PackageOutputGroups);__GetPublishItems</PackageOutputGroups>
79+
</PropertyGroup>
80+
<Target Name="_ValidateAppReferenceItems" />
81+
<Target Name="_FixEntryPoint" AfterTargets="_ConvertItems">
82+
<PropertyGroup>
83+
<EntryPointExe>CoreWinFormsApp1\CoreWinFormsApp1.exe</EntryPointExe>
84+
</PropertyGroup>
85+
</Target>
86+
<Target Name="PublishReferences" BeforeTargets="ExpandProjectReferences">
87+
<MSBuild Projects="@(ProjectReference->'%(FullPath)')" BuildInParallel="$(BuildInParallel)" Targets="Publish" />
88+
</Target>
89+
<PropertyGroup>
90+
<DebuggerType>CoreClr</DebuggerType>
91+
</PropertyGroup>
92+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5+
</startup>
6+
</configuration>

windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.Designer.cs

+86
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)