Fixing a Windows 10 issue, using the Microsoft.Windows.SDK.Contracts package, this should make it possible to build on Azure too.

This commit is contained in:
Robin Krom 2019-03-19 12:36:00 +01:00
commit 1766ed6ab1
6 changed files with 11 additions and 21 deletions

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<RootNamespace>Greenshot.Addon.Win10</RootNamespace>
@ -12,19 +12,7 @@
</None>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Reference Include="Windows">
<HintPath>C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0\Windows.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<!-- Light up Windows 10 features -->
<Reference Include="Windows">
<HintPath>C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0\Windows.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@ -56,7 +44,8 @@
<PackageReference Include="Dapplo.CaliburnMicro.Configuration" Version="1.2.21" />
<PackageReference Include="Dapplo.CaliburnMicro.Translations" Version="1.2.21" />
<PackageReference Include="Dapplo.Windows.Clipboard" Version="0.8.17" />
<PackageReference Include="System.Runtime.WindowsRuntime" Version="4.6.0-preview.19073.11" />
<PackageReference Include="Microsoft.Toolkit.Forms.UI.Controls" Version="6.0.0-preview1" />
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.17763.144-preview" />
<PackageReference Include="System.Runtime.WindowsRuntime" Version="4.6.0-preview3.19128.7" />
<PackageReference Include="Microsoft.Toolkit.Forms.UI.Controls" Version="6.0.0-preview3" />
</ItemGroup>
</Project>

View file

@ -44,7 +44,6 @@ namespace Greenshot.Addon.Win10
{
return;
}
return;
// InkCanvas
inkCanvasHost = new WindowsXamlHost
{

View file

@ -104,7 +104,7 @@ namespace Greenshot.Addons.Resources
{
if (name.EndsWith(".Image"))
{
name = name + ".png";
name += ".png";
}
using (var imageStream = _resourceProvider.ResourceAsStream((type ?? GetType()).Assembly, "Resources", name))

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
@ -9,7 +9,8 @@
<ApplicationManifest>greenshot.manifest</ApplicationManifest>
<AssemblyTitle>Greenshot</AssemblyTitle>
<AssemblyName>Greenshot</AssemblyName>
<RuntimeIdentifiers>win-x86</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
@ -101,6 +102,7 @@
<PackageReference Include="Svg" Version="2.4.2" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
<PackageReference Include="System.Runtime.WindowsRuntime" Version="4.6.0-preview3.19128.7" />
</ItemGroup>
<ItemGroup>

View file

@ -68,7 +68,7 @@ namespace Greenshot
//LogSettings.ExceptionToStacktrace = exception => exception.ToStringDemystified();
#if DEBUG
// Initialize a debug logger for Dapplo packages
LogSettings.RegisterDefaultLogger<DebugLogger>(LogLevels.Verbose);
LogSettings.RegisterDefaultLogger<DebugLogger>(LogLevels.Debug);
#endif
var applicationConfig = ApplicationConfigBuilder
.Create()