Skip to content

Commit

Permalink
Fix WindowsDesktop file list root attributes (dotnet/core-setup#5533)
Browse files Browse the repository at this point in the history
Stop automatically inheriting the .NET Core targeting pack's values.

Commit migrated from dotnet/core-setup@42bdab6
  • Loading branch information
dagood authored Mar 22, 2019
1 parent ff448dd commit d0c2cc0
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 12 deletions.
7 changes: 0 additions & 7 deletions src/installer/pkg/projects/dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
<ProjectExclusions Include="windowsdesktop\**\*.*proj" />
</ItemGroup>

<ItemGroup>
<FrameworkListRootAttributes Include="Name" Value="$(NETCoreAppFrameworkBrandName)" />
<FrameworkListRootAttributes Include="TargetFrameworkIdentifier" Value="$(NETCoreAppFrameworkIdentifier)" />
<FrameworkListRootAttributes Include="TargetFrameworkVersion" Value="$(NETCoreAppFrameworkVersion)" />
<FrameworkListRootAttributes Include="FrameworkName" Value="$(SharedFrameworkName)" />
</ItemGroup>

<PropertyGroup Condition="'$(PackageTargetRuntime)' == ''">
<SkipValidatePackage>true</SkipValidatePackage>
<IncludeRuntimeJson>true</IncludeRuntimeJson>
Expand Down
11 changes: 11 additions & 0 deletions src/installer/pkg/projects/dir.targets
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,17 @@
<FrameworkListFile>$(IntermediateOutputPath)FrameworkList.xml</FrameworkListFile>
</PropertyGroup>

<ItemGroup>
<FrameworkListRootAttributes Include="Name" Value="$(FrameworkListName)" />
<FrameworkListRootAttributes Include="TargetFrameworkIdentifier" Value="$(FrameworkListTargetFrameworkIdentifier)" />
<FrameworkListRootAttributes Include="TargetFrameworkVersion" Value="$(FrameworkListTargetFrameworkVersion)" />
<FrameworkListRootAttributes Include="FrameworkName" Value="$(FrameworkListFrameworkName)" />
</ItemGroup>

<Error
Condition="'%(FrameworkListRootAttributes.Value)' == ''"
Text="Missing value for property 'FrameworkList%(FrameworkListRootAttributes.Identity)'" />

<CreateFrameworkListFile
Files="@(File)"
TargetFile="$(FrameworkListFile)"
Expand Down
7 changes: 7 additions & 0 deletions src/installer/pkg/projects/netcoreapp/pkg/dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@

<Import Project="..\..\dir.props" />

<PropertyGroup>
<FrameworkListName>$(NETCoreAppFrameworkBrandName)</FrameworkListName>
<FrameworkListTargetFrameworkIdentifier>$(NETCoreAppFrameworkIdentifier)</FrameworkListTargetFrameworkIdentifier>
<FrameworkListTargetFrameworkVersion>$(NETCoreAppFrameworkVersion)</FrameworkListTargetFrameworkVersion>
<FrameworkListFrameworkName>$(SharedFrameworkName)</FrameworkListFrameworkName>
</PropertyGroup>

<!-- Redistribute package content from other nuget packages. -->
<ItemGroup>
<ProjectReference Include="..\src\netcoreapp.depproj">
Expand Down
8 changes: 8 additions & 0 deletions src/installer/pkg/projects/windowsdesktop/dir.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., dir.props))\dir.props" />

<PropertyGroup>
<FrameworkPackageName>Microsoft.WindowsDesktop.App</FrameworkPackageName>
</PropertyGroup>
</Project>
9 changes: 8 additions & 1 deletion src/installer/pkg/projects/windowsdesktop/pkg/dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
<ProductBrandPrefix>Microsoft Windows Desktop</ProductBrandPrefix>
</PropertyGroup>

<Import Project="..\..\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., dir.props))\dir.props" />

<PropertyGroup>
<FrameworkListName>Windows Desktop $(NETCoreAppFrameworkVersion)</FrameworkListName>
<FrameworkListTargetFrameworkIdentifier>$(NETCoreAppFrameworkIdentifier)</FrameworkListTargetFrameworkIdentifier>
<FrameworkListTargetFrameworkVersion>$(NETCoreAppFrameworkVersion)</FrameworkListTargetFrameworkVersion>
<FrameworkListFrameworkName>$(FrameworkPackageName)</FrameworkListFrameworkName>
</PropertyGroup>

<PropertyGroup>
<BuildDebPackage>false</BuildDebPackage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />

<PropertyGroup>
<FrameworkPackageName>Microsoft.WindowsDesktop.App</FrameworkPackageName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsDesktop.App">
<Version>$(MicrosoftWindowsDesktopAppPackageVersion)</Version>
Expand Down

0 comments on commit d0c2cc0

Please sign in to comment.