Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,105 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CE812A43-7F69-4361-9B0B-43AA20739446}</ProjectGuid>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExportDataLibrary</RootNamespace>
<AssemblyName>ExportDataLibrary</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExportData.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyEmployees.PluginInterface\MyEmployees.PluginInterface.csproj">
<Project>{a8814208-9b34-41c9-b0d0-b31a6c11af27}</Project>
<Name>MyEmployees.PluginInterface</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<ProjectReference Include="..\MyEmployees.PluginInterface\MyEmployees.PluginInterface.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CsvHelper">
<Version>9.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.ValueTuple">
<Version>4.5.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.3.330701">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
</AppxManifest>
<None Include="MyEmployees.Package_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.2"/>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="[10.0.22621.1]">
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\PSF\PackageFiles\VFS\ProgramFilesX86\Contoso\MyEmployees\SQLite.Interop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,88 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A8814208-9B34-41C9-B0D0-B31A6C11AF27}</ProjectGuid>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyEmployees.PluginInterface</RootNamespace>
<AssemblyName>MyEmployees.PluginInterface</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IPlugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.3.330701">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
22 changes: 11 additions & 11 deletions DeveloperLabs/MyEmployees/MyEmployees.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28606.126
# Visual Studio Version 17
VisualStudioVersion = 17.2.32516.85
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyEmployees", "MyEmployees\MyEmployees.csproj", "{6C859FC9-03B3-4D7D-B83E-A276457C80F6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyEmployees", "MyEmployees\MyEmployees.csproj", "{6C859FC9-03B3-4D7D-B83E-A276457C80F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExportDataLibrary", "ExportDataLibrary\ExportDataLibrary.csproj", "{CE812A43-7F69-4361-9B0B-43AA20739446}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExportDataLibrary", "ExportDataLibrary\ExportDataLibrary.csproj", "{CE812A43-7F69-4361-9B0B-43AA20739446}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyEmployees.PluginInterface", "MyEmployees.PluginInterface\MyEmployees.PluginInterface.csproj", "{A8814208-9B34-41C9-B0D0-B31A6C11AF27}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyEmployees.PluginInterface", "MyEmployees.PluginInterface\MyEmployees.PluginInterface.csproj", "{A8814208-9B34-41C9-B0D0-B31A6C11AF27}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "MyEmployees.Package", "MyEmployees.Package\MyEmployees.Package.wapproj", "{80DB0989-9307-466B-ABA0-9F82D424CBD8}"
EndProject
Expand All @@ -25,8 +25,8 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6C859FC9-03B3-4D7D-B83E-A276457C80F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C859FC9-03B3-4D7D-B83E-A276457C80F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C859FC9-03B3-4D7D-B83E-A276457C80F6}.Debug|Any CPU.ActiveCfg = Debug|x86
{6C859FC9-03B3-4D7D-B83E-A276457C80F6}.Debug|Any CPU.Build.0 = Debug|x86
{6C859FC9-03B3-4D7D-B83E-A276457C80F6}.Debug|ARM.ActiveCfg = Debug|Any CPU
{6C859FC9-03B3-4D7D-B83E-A276457C80F6}.Debug|ARM.Build.0 = Debug|Any CPU
{6C859FC9-03B3-4D7D-B83E-A276457C80F6}.Debug|ARM64.ActiveCfg = Debug|Any CPU
Expand All @@ -51,8 +51,8 @@ Global
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|ARM.Build.0 = Debug|Any CPU
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|ARM64.Build.0 = Debug|Any CPU
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|x64.ActiveCfg = Debug|x64
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|x64.Build.0 = Debug|x64
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|x64.ActiveCfg = Debug|Any CPU
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|x64.Build.0 = Debug|Any CPU
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|x86.ActiveCfg = Debug|x86
{CE812A43-7F69-4361-9B0B-43AA20739446}.Debug|x86.Build.0 = Debug|x86
{CE812A43-7F69-4361-9B0B-43AA20739446}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -71,8 +71,8 @@ Global
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|ARM.Build.0 = Debug|Any CPU
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|ARM64.Build.0 = Debug|Any CPU
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|x64.ActiveCfg = Debug|x64
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|x64.Build.0 = Debug|x64
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|x64.ActiveCfg = Debug|Any CPU
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|x64.Build.0 = Debug|Any CPU
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|x86.ActiveCfg = Debug|x86
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Debug|x86.Build.0 = Debug|x86
{A8814208-9B34-41C9-B0D0-B31A6C11AF27}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
1 change: 1 addition & 0 deletions DeveloperLabs/MyEmployees/MyEmployees/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ private void Form1_Load(object sender, EventArgs e)
LoadConfig();
LoadData();
CheckKioskMode();
MyEmployees.Helpers.WinAppSDK.initializeWinAppRuntime();
//await CheckForUpdates();
}

Expand Down
71 changes: 71 additions & 0 deletions DeveloperLabs/MyEmployees/MyEmployees/Helpers/WinAppSDK.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Windows.ApplicationModel.WindowsAppRuntime;

namespace MyEmployees.Helpers
{
/// <summary>
/// Provides methods to get the status of the WindowsAppRuntime and attempt to initialize it if required
/// </summary>
public class WinAppSDK
{
/// <summary>
/// Attempts to get initialize WindowsAppRuntime by deploying required packages if they are not present
/// </summary>
public static void initializeWinAppRuntime()
{
if (DeploymentManager.GetStatus().Status != DeploymentStatus.Ok)
{
// Initialize does a status check, and if the status is not Ok it will attempt to get
// the WindowsAppRuntime into a good state by deploying packages. Unlike a simple
// status check, Initialize can sometimes take several seconds to deploy the packages.
// These should be run on a separate thread so as not to hang your app while the
// packages deploy.
var initializeTask = Task.Run(() => DeploymentManager.Initialize());
initializeTask.Wait();
if (initializeTask.Result.Status == DeploymentStatus.Ok)
{
MessageBox.Show("The WindowsAppRuntime was successfully initialized and is now ready for use!");
}
else
{
MessageBox.Show("Result ExtendedError: " + initializeTask.Result.ExtendedError.ToString());
// The WindowsAppRuntime is in a bad state which Initialize() did not fix.
// Do error reporting or gather information for submitting a bug.
// Gracefully exit the program or carry on without using the WindowsAppRuntime.
MessageBox.Show("Initialize() failed to ensure the WindowsAppRuntime.");
}
}
else
{
MessageBox.Show("The WindowsAppRuntime was already in an Ok status, no action taken.");
}
}

/// <summary>
/// Checks to see if the packages required for the WindowsAppRuntime are present
/// </summary>
public static void getWinAppRuntimeStatus()
{
// GetStatus() is a fast check to see if all of the packages the WindowsAppRuntime
// requires and expects are present in in an Ok state.
DeploymentResult result = DeploymentManager.GetStatus();

// Check the resulting Status.
if (result.Status == DeploymentStatus.Ok)
{
MessageBox.Show("The WindowsAppRuntime is ready for use!");
}
else
{
// A not-Ok status means it is not ready for us. The Status will indicate the
// reason it is not Ok, such as some packages need to be installed.
MessageBox.Show("The WindowsAppRuntime is not ready for use.");
}
}
}
}
Loading