Skip to content

Commit

Permalink
Merge pull request #183 from onovotny/uwp-updates
Browse files Browse the repository at this point in the history
Updates to fix #182
  • Loading branch information
Oren Novotny committed Sep 7, 2019
2 parents f1476ba + 79ac352 commit d2cb983
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 29 deletions.
11 changes: 9 additions & 2 deletions MSBuild.Sdk.Extras.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2026
# Visual Studio Version 16
VisualStudioVersion = 16.0.29305.180
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8647C74A-083C-4EAF-B9B0-2172D4A27BFC}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -36,6 +36,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{19A683CB
Tools\MSBuild.Packaging.targets = Tools\MSBuild.Packaging.targets
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UwpClassLibrary", "Tests\UwpClassLibrary\UwpClassLibrary.csproj", "{B7617E50-4107-4C19-BDCF-012CCDB22FB0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -74,6 +76,10 @@ Global
{C2EE161F-0521-47F7-BE2D-0B55CA8B3C53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2EE161F-0521-47F7-BE2D-0B55CA8B3C53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2EE161F-0521-47F7-BE2D-0B55CA8B3C53}.Release|Any CPU.Build.0 = Release|Any CPU
{B7617E50-4107-4C19-BDCF-012CCDB22FB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7617E50-4107-4C19-BDCF-012CCDB22FB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7617E50-4107-4C19-BDCF-012CCDB22FB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7617E50-4107-4C19-BDCF-012CCDB22FB0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -87,6 +93,7 @@ Global
{96E4CC91-6E55-4650-BA58-D6D1EF138EE2} = {26026DB4-DD68-43BF-8858-15AD2016C0B2}
{C2EE161F-0521-47F7-BE2D-0B55CA8B3C53} = {26026DB4-DD68-43BF-8858-15AD2016C0B2}
{19A683CB-8C5D-480B-8D60-30F28DA40660} = {8647C74A-083C-4EAF-B9B0-2172D4A27BFC}
{B7617E50-4107-4C19-BDCF-012CCDB22FB0} = {26026DB4-DD68-43BF-8858-15AD2016C0B2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {93349570-79D8-4F89-8E78-C66401620727}
Expand Down
19 changes: 0 additions & 19 deletions Source/MSBuild.Sdk.Extras/Build/LanguageTargets/Windows.targets
Expand Up @@ -20,25 +20,6 @@
<ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true' AND '$(_SdkLanguageSourceName)' != 'VisualBasic'">UAP$(_SdkShortFrameworkVersion.Replace('.', '_'));UAP$(TargetPlatformMinVersion.Replace('.', '_'))</ImplicitFrameworkDefine>
<ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true' AND '$(_SdkLanguageSourceName)' == 'VisualBasic'">UAP$(_SdkShortFrameworkVersion.Replace('.', '_'))=-1,UAP$(TargetPlatformMinVersion.Replace('.', '_'))</ImplicitFrameworkDefine>

<!-- Decide whether to use the new version metadata, or the old one -->
<_ExtrasUseVersionedWindowsWinmdFile Condition="$([System.Version]::Parse('$(TargetPlatformVersion)')) >= $([System.Version]::Parse('10.0.16299.0'))">true</_ExtrasUseVersionedWindowsWinmdFile>

<WindowsWinmdFile Condition="'$(_ExtrasUseVersionedWindowsWinmdFile)' == 'true' AND Exists('$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\$(TargetPlatformVersion)\Windows.winmd')">$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\$(TargetPlatformVersion)\Windows.winmd</WindowsWinmdFile>
<WindowsWinmdFile Condition="'$(_ExtrasUseVersionedWindowsWinmdFile)' != 'true' AND Exists('$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\Windows.winmd')">$(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\Windows.winmd</WindowsWinmdFile>

<_ExtrasShowWindowsSdkError>false</_ExtrasShowWindowsSdkError>
<_ExtrasShowWindowsSdkError Condition="'$(DisableImplicitFrameworkReferences)' != 'true' AND '$(WindowsWinmdFile)' == '' ">true</_ExtrasShowWindowsSdkError>
</PropertyGroup>

<ItemGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true' AND '$(WindowsWinmdFile)' != '' ">
<_SdkWindowsImplicitReference Include="Windows" Private="false" HintPath="$(WindowsWinmdFile)" IsWinMDFile="true" Pack="false" />
<_SdkWindowsImplicitReference Remove="@(Reference)"/>
<Reference Include="@(_SdkWindowsImplicitReference)"/>
</ItemGroup>

<Target Name="_WarnIfWindowsSdkIsMissing" BeforeTargets="CoreCompile">
<Error Condition="'$(_ExtrasShowWindowsSdkError)' == 'true'"
Text="Required Windows SDK Version $(TargetPlatformVersion) is not installed." />
</Target>

</Project>
7 changes: 0 additions & 7 deletions Source/MSBuild.Sdk.Extras/Build/Platforms/Windows.targets
Expand Up @@ -19,8 +19,6 @@

<!-- Need to override the built-in implicit defines for win8 or it'll be NETCORE4_5 -->
<ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">WINDOWS8</ImplicitFrameworkDefine>
<WindowsWinmdFile Condition="Exists('$(MSBuildProgramFiles32)\Windows Kits\8.0\References\CommonConfiguration\Neutral\Windows.winmd')">$(MSBuildProgramFiles32)\Windows Kits\8.0\References\CommonConfiguration\Neutral\Windows.winmd</WindowsWinmdFile>
<ImplicitlyExpandTargetPlatform>false</ImplicitlyExpandTargetPlatform>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'win81'">
Expand All @@ -32,8 +30,6 @@

<!-- Need to override the built-in implicit defines for win81 or it'll be NETCORE4_5_1 -->
<ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">WINDOWS8_1</ImplicitFrameworkDefine>
<WindowsWinmdFile Condition="Exists('$(MSBuildProgramFiles32)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd')">$(MSBuildProgramFiles32)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd</WindowsWinmdFile>
<ImplicitlyExpandTargetPlatform>false</ImplicitlyExpandTargetPlatform>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'wpa' OR '$(TargetFramework)' == 'wpa81'">
Expand All @@ -59,9 +55,6 @@
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)' == ''">$([System.Version]::Parse('$(_SdkShortFrameworkVersion)')).0</TargetPlatformMinVersion>

<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">false</CopyLocalLockFileAssemblies>

<ImplicitlyExpandTargetPlatform>false</ImplicitlyExpandTargetPlatform>

</PropertyGroup>

</Project>
Expand Up @@ -8,7 +8,7 @@
Package Version property for Implicit Packages included in the props file
-->
<PropertyGroup Condition="'$(ExtrasUwpMetaPackageVersion)' == ''">
<ExtrasUwpMetaPackageVersion>6.1.9</ExtrasUwpMetaPackageVersion>
<ExtrasUwpMetaPackageVersion>6.2.9</ExtrasUwpMetaPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(ExtrasTizenMetaPackageVersion)' == ''">
Expand Down
8 changes: 8 additions & 0 deletions Tests/UwpClassLibrary/Class1.cs
@@ -0,0 +1,8 @@
using System;

namespace UwpClassLibrary
{
public class Class1
{
}
}
12 changes: 12 additions & 0 deletions Tests/UwpClassLibrary/UwpClassLibrary.csproj
@@ -0,0 +1,12 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.props" />

<PropertyGroup>
<TargetFramework>uap10.0.16299</TargetFramework>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\..\Source\MSBuild.Sdk.Extras\Sdk\Sdk.targets" />
<Import Project="..\Test.targets" />

</Project>

0 comments on commit d2cb983

Please sign in to comment.