Create WindowsDesktop targeting pack MSIs, fix registry entry ref counting (dotnet...
authorDavis Goodin <dagood@users.noreply.github.com>
Mon, 18 Mar 2019 22:55:20 +0000 (17:55 -0500)
committerGitHub <noreply@github.com>
Mon, 18 Mar 2019 22:55:20 +0000 (17:55 -0500)
* Create targeting pack MSIs through pkgproj

* Use generated GUIDs for MSI Provider components

Fixes ref-counting for registry keys. Registry entries could be left behind on uninstall because the static GUID with a changing registry key path broke ref counting.

* Fix GetUpgradeCode comment

Commit migrated from https://github.com/dotnet/core-setup/commit/165bba0c0e5b74cb545649c626f27c404dce2b55

20 files changed:
src/installer/pkg/dir.props
src/installer/pkg/dir.targets
src/installer/pkg/packaging/dir.props
src/installer/pkg/packaging/windows/GetWix.ps1 [deleted file]
src/installer/pkg/packaging/windows/host/provider.wxs
src/installer/pkg/packaging/windows/hostfxr/provider.wxs
src/installer/pkg/packaging/windows/package.props
src/installer/pkg/packaging/windows/package.targets
src/installer/pkg/packaging/windows/sharedframework/provider.wxs
src/installer/pkg/packaging/windows/targetingpack/generatemsi.ps1 [deleted file]
src/installer/pkg/projects/dir.props
src/installer/pkg/projects/dir.targets
src/installer/pkg/projects/packaging-tools/framework.dependency.targets [moved from src/installer/pkg/projects/framework.dependency.targets with 100% similarity]
src/installer/pkg/projects/packaging-tools/framework.packaging.targets [moved from src/installer/pkg/projects/framework.packaging.targets with 71% similarity]
src/installer/pkg/projects/packaging-tools/packaging-tools.props [new file with mode: 0644]
src/installer/pkg/projects/packaging-tools/packaging-tools.targets [new file with mode: 0644]
src/installer/pkg/projects/packaging-tools/windows/provider.wxs [moved from src/installer/pkg/packaging/windows/targetingpack/provider.wxs with 84% similarity]
src/installer/pkg/projects/packaging-tools/windows/targetingpack.wxs [moved from src/installer/pkg/packaging/windows/targetingpack/targetingpack.wxs with 100% similarity]
src/installer/pkg/projects/packaging-tools/windows/variables.wxi [moved from src/installer/pkg/packaging/windows/targetingpack/variables.wxi with 90% similarity]
src/installer/pkg/projects/windowsdesktop/pkg/dir.props

index ce85d6c..7a172a4 100644 (file)
       off to avoid producing redundant packages.
     -->
     <BuildDistroIndependentInstallers Condition="'$(BuildDistroIndependentInstallers)' == ''">true</BuildDistroIndependentInstallers>
+
+    <WixVersion>3.10.4</WixVersion>
+    <WixToolsDir>$(IntermediateOutputRootPath)WixTools.$(WixVersion)/</WixToolsDir>
+    <!-- Used in WiX targets to locate files. -->
+    <WixInstallPath>$(WixToolsDir)</WixInstallPath>
+    <WixTargetsPath>$(WixToolsDir)wix.targets</WixTargetsPath>
+    <WixObjRoot>$(IntermediateOutputRootPath)wix/</WixObjRoot>
+    <WixObjDir>$(WixObjRoot)$(MSBuildProjectName)/</WixObjDir>
+    <MsiArch>$(TargetArchitecture)</MsiArch>
+    <MicrosoftEulaFile>$(MSBuildThisFileDirectory)packaging/windows/eula.rtf</MicrosoftEulaFile>
+
+    <GenerateMSI>true</GenerateMSI>
+    <GenerateMSI Condition="'$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'arm64'">false</GenerateMSI>
+    <GenerateMSI Condition="'$(OSGroup)' != 'Windows_NT'">false</GenerateMSI>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <ProductBrandPrefix Condition="'$(ProductBrandPrefix)' == ''">Microsoft .NET Core</ProductBrandPrefix>
+    <ProductBrandSuffix>$(ProductionVersion)</ProductBrandSuffix>
+    <ProductBrandSuffix Condition="'$(ReleaseBrandSuffix)'!=''">$(ProductionVersion) $(ReleaseBrandSuffix)</ProductBrandSuffix>
+    <SharedHostBrandName>$(ProductBrandPrefix) Host - $(ProductBrandSuffix)</SharedHostBrandName>
+    <HostFxrBrandName>$(ProductBrandPrefix) Host FX Resolver - $(ProductBrandSuffix)</HostFxrBrandName>
+    <TargetingPackBrandName>$(ProductBrandPrefix) Targeting Pack - $(ProductBrandSuffix)</TargetingPackBrandName>
+    <SharedFrameworkBrandName>$(ProductBrandPrefix) Runtime - $(ProductBrandSuffix)</SharedFrameworkBrandName>
   </PropertyGroup>
 
   <ItemGroup>
index 9df96a0..28a4f20 100644 (file)
@@ -5,6 +5,12 @@
     <RuntimeIdGraphDefinitionFile>$(PackagesDir)$(PlatformPackageId.ToLowerInvariant())\$(MicrosoftNETCorePlatformsPackageVersion)\runtime.json</RuntimeIdGraphDefinitionFile>
   </PropertyGroup>
 
+  <UsingTask TaskName="DownloadFilesFromUrl" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
+  <UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
+
+  <UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
+  <UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
+
   <!-- Create deb tool package and set up the project that consumes it as a CLI tool. -->
   <Target Name="InitializeDotnetDebTool">
     <!--
              Text="FPM tool Not found, RPM packages will not be built."
              Importance="High" />
   </Target>
+
+  <!--
+    Acquire WiX tools, if not present.
+
+    Adapted from https://github.com/dotnet/core-sdk/blob/6aed0cd3614f9b740cfb3f21fdb795bab53ef7e9/src/redist/targets/GenerateMSIs.targets#L80-L102
+  -->
+  <Target Name="AcquireWix"
+          DependsOnTargets="GetAcquireWixProperties"
+          Condition="'$(GenerateMSI)' == 'true'"
+          Inputs="$(WixDownloadSentinel)"
+          Outputs="$(WixDestinationPath)">
+    <!-- Setup sentinel to take advantage of incrementality -->
+    <MakeDir Directories="$(WixToolsDir)" />
+    <WriteLinesToFile
+      File="$(WixDownloadSentinel)"
+      Lines="$(WixVersion)"
+      Overwrite="true"
+      Encoding="Unicode" />
+
+    <ItemGroup>
+      <_wixToolDownload
+        Include="WixTool"
+        Url="$(WixDownloadUrl)"
+        DestinationDir="$(WixToolsDir)" />
+    </ItemGroup>
+
+    <DownloadFilesFromUrl Items="@(_wixToolDownload)" />
+
+    <ZipFileExtractToDirectory
+      SourceArchive="$(WixDestinationPath)"
+      DestinationDirectory="$(WixToolsDir)" />
+  </Target>
+
+  <Target Name="GetAcquireWixProperties">
+    <PropertyGroup>
+      <WixDownloadFilename>wix.$(WixVersion).zip</WixDownloadFilename>
+      <WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/$(WixDownloadFilename)</WixDownloadUrl>
+      <WixDestinationPath>$(WixToolsDir)$(WixDownloadFilename)</WixDestinationPath>
+      <WixDownloadSentinel>$(WixToolsDir)WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
+    </PropertyGroup>
+  </Target>
+
+  <Target Name="GenerateMsiVersionString">
+    <GenerateMsiVersion
+      Major="$(MajorVersion)"
+      Minor="$(MinorVersion)"
+      Patch="$(PatchVersion)"
+      BuildNumberMajor="$(BuildNumberMajor)"
+      BuildNumberMinor="$(BuildNumberMajor)">
+      <Output TaskParameter="MsiVersion" PropertyName="MsiVersionString" />
+    </GenerateMsiVersion>
+  </Target>
+
 </Project>
index b69f196..6fd0dc5 100644 (file)
@@ -16,7 +16,6 @@
     <SharedHostPublishRoot>$(IntermediateOutputRootPath)sharedHost/</SharedHostPublishRoot>
     <HostFxrPublishRoot>$(IntermediateOutputRootPath)hostFxr/</HostFxrPublishRoot>
     <SharedFrameworkPublishRoot>$(IntermediateOutputRootPath)sharedFx/</SharedFrameworkPublishRoot>
-    <TargetingPackPublishRoot>$(IntermediateOutputRootPath)Microsoft.NETCore.App.Ref/layout/</TargetingPackPublishRoot>
     <CombinedPublishRoot>$(IntermediateOutputRootPath)combined-framework-host/</CombinedPublishRoot>
   </PropertyGroup>
 
     <SharedFrameworkCompressedFile>dotnet-runtime-internal-$(ProductMoniker)$(CompressedFileExtension)</SharedFrameworkCompressedFile>
     <SharedFrameworkSymbolsCompressedFile>dotnet-runtime-symbols-$(ProductMoniker)$(CompressedFileExtension)</SharedFrameworkSymbolsCompressedFile>
   </PropertyGroup>
-
-  <PropertyGroup>
-    <ProductBrandPrefix>Microsoft .NET Core</ProductBrandPrefix>
-    <ProductBrandSuffix>$(ProductionVersion)</ProductBrandSuffix>
-    <ProductBrandSuffix Condition="'$(ReleaseBrandSuffix)'!=''">$(ProductionVersion) $(ReleaseBrandSuffix)</ProductBrandSuffix>
-    <SharedHostBrandName>$(ProductBrandPrefix) Host - $(ProductBrandSuffix)</SharedHostBrandName>
-    <HostFxrBrandName>$(ProductBrandPrefix) Host FX Resolver - $(ProductBrandSuffix)</HostFxrBrandName>
-    <TargetingPackBrandName>$(ProductBrandPrefix) Targeting Pack - $(ProductBrandSuffix)</TargetingPackBrandName>
-    <SharedFrameworkBrandName>$(ProductBrandPrefix) Runtime - $(ProductBrandSuffix)</SharedFrameworkBrandName>
-  </PropertyGroup>
 </Project>
\ No newline at end of file
diff --git a/src/installer/pkg/packaging/windows/GetWix.ps1 b/src/installer/pkg/packaging/windows/GetWix.ps1
deleted file mode 100644 (file)
index 9048543..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Param(
-    [string]$WixFilename,
-    [string]$OutputDir="."
-)
-
-$uri = "https://dotnetcli.blob.core.windows.net/build/wix/" + $wixFilename
-$outFile = $OutputDir + "\" + $wixFilename
-
-if (!(Test-Path "$OutputDir"))
-{
-    mkdir "$OutputDir" | Out-Null
-}
-
-if(!(Test-Path "$outFile"))
-{
-    Write-Output "Downloading WixTools to $outFile.."
-    Write-Output $uri
-    Invoke-WebRequest -Uri $uri -OutFile $outFile
-}
\ No newline at end of file
index dab1a27..67f61e3 100644 (file)
@@ -2,7 +2,7 @@
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
   <?include "Variables.wxi" ?>
   <Fragment>
-    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no" Guid="82516259-FF21-446E-A432-1FFCA5A02296">
+    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no">
       <dep:Provides Key="$(var.DependencyKey)" />
     </Component>
   </Fragment>
index 2a6006a..9fc76d1 100644 (file)
@@ -2,7 +2,7 @@
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
   <?include "Variables.wxi" ?>
   <Fragment>
-    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no" Guid="4B2C9861-01F9-4438-886A-FBDFE82AD1F3">
+    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no">
       <dep:Provides Key="$(var.DependencyKey)" />
     </Component>
   </Fragment>
index f9f36e3..b4dd74e 100644 (file)
@@ -2,13 +2,6 @@
 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <WindowsScriptRoot>$(PackagingRoot)windows\</WindowsScriptRoot>
-    <WixVersion>3.10.4</WixVersion>
-    <GetWixScript>$(WindowsScriptRoot)GetWix.ps1</GetWixScript>
-    <WixToolsDir>$(IntermediateOutputRootPath)WixTools.$(WixVersion)</WixToolsDir>
-    <WixObjRoot>$(IntermediateOutputRootPath)wix/</WixObjRoot>
-    <MsiArch>$(TargetArchitecture)</MsiArch>
-    <GenerateMSI>true</GenerateMSI>
-    <GenerateMSI Condition="'$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'arm64'">false</GenerateMSI>
     <InsigniaCmd>$(WixToolsDir)\insignia.exe</InsigniaCmd>
   </PropertyGroup>
 </Project>
\ No newline at end of file
index caf4761..9b8c07c 100644 (file)
@@ -1,44 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <Import Project='package.props' />
-    
-    <UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
-    <UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
-    <UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
-
-    <Target Name="GenerateMsiVersionString">
-      <GenerateMsiVersion
-        Major="$(MajorVersion)"
-        Minor="$(MinorVersion)"
-        Patch="$(PatchVersion)"
-        BuildNumberMajor="$(BuildNumberMajor)"
-        BuildNumberMinor="$(BuildNumberMajor)">
-        <Output TaskParameter="MsiVersion" PropertyName="MsiVersionString" />
-      </GenerateMsiVersion>
-    </Target>
 
     <Target Name="GenerateMsis"
-            DependsOnTargets="GenerateMsiVersionString"
+            DependsOnTargets="AcquireWix;GenerateMsiVersionString"
             Condition="'$(OSGroup)' == 'Windows_NT' and '$(GenerateMSI)' == 'true'">
-      
-      <PropertyGroup>
-        <WixFilename>wix.$(WixVersion).zip</WixFilename>
-      </PropertyGroup>
-
-      <Exec Command="powershell -NoProfile -NoLogo $(GetWixScript) -WixFilename $(WixFilename) -OutputDir $(WixToolsDir)" />
-      
-      <ItemGroup>
-        <_filelist Include="$(WixToolsDir)\**" />
-      </ItemGroup>
-
-      <Message Importance="High" Text="Contents of $(WixToolsDir): @(_filelist)" />
-   
-      <Message Importance="High" Text="Extracting Wix tools from $(WixToolsDir)\$(WixFilename)..." />
-      <ZipFileExtractToDirectory Condition="!Exists('$(WixToolsDir)\candle.exe')"
-                                 SourceArchive="$(WixToolsDir)\$(WixFilename)"
-                                 DestinationDirectory="$(WixToolsDir)"
-                                 OverwriteDestination="false" />
-
       <GenerateGuidFromName Name="$(SharedHostInstallerFile)">
         <Output TaskParameter="GeneratedGuid" PropertyName="SharedHostUpgradeCode" />
       </GenerateGuidFromName>
         <Output TaskParameter="GeneratedGuid" PropertyName="HostFxrUpgradeCode" />
       </GenerateGuidFromName>
 
-      <GenerateGuidFromName Name="$(TargetingPackInstallerFile)">
-        <Output TaskParameter="GeneratedGuid" PropertyName="TargetingPackUpgradeCode" />
-      </GenerateGuidFromName>
-
       <ItemGroup>
         <WixOutputs Include="$(WixObjRoot)host">
             <InputDir>$(SharedHostPublishRoot)</InputDir>
             <InstallerName>$(HostFxrInstallerFile)</InstallerName>
             <UpgradeCode>$(HostFxrUpgradeCode)</UpgradeCode>
         </WixOutputs>
-        <WixOutputs Include="$(WixObjRoot)targetingpack">
-            <InputDir>$(TargetingPackPublishRoot)</InputDir>
-            <BrandName>$(TargetingPackBrandName)</BrandName>
-            <InstallerName>$(TargetingPackInstallerFile)</InstallerName>
-            <UpgradeCode>$(TargetingPackUpgradeCode)</UpgradeCode>
-        </WixOutputs>
         <!-- shared framework has extra arguments so it needs to be in a separate group -->
         <WixOutputs2 Include="$(WixObjRoot)sharedframework">
             <InputDir>$(SharedFrameworkPublishRoot)</InputDir>
@@ -97,7 +53,7 @@
   </Target>
 
   <Target Name="GenerateBundles"
-          DependsOnTargets="GetBundleDisplayVersion;GenerateMsiVersionString"
+          DependsOnTargets="AcquireWix;GetBundleDisplayVersion;GenerateMsiVersionString"
           Condition="'$(OSGroup)' == 'Windows_NT' and '$(GenerateMSI)' == 'true'">
      <PropertyGroup>
         <SharedFxBundleScript>$(WindowsScriptRoot)sharedframework\generatebundle.ps1</SharedFxBundleScript>
index 02932a8..9fc76d1 100644 (file)
@@ -2,7 +2,7 @@
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
   <?include "Variables.wxi" ?>
   <Fragment>
-    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no" Guid="F47B3A4D-7CEB-4F18-8464-0F6C5978E08E">
+    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no">
       <dep:Provides Key="$(var.DependencyKey)" />
     </Component>
   </Fragment>
diff --git a/src/installer/pkg/packaging/windows/targetingpack/generatemsi.ps1 b/src/installer/pkg/packaging/windows/targetingpack/generatemsi.ps1
deleted file mode 100644 (file)
index 18503ab..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-param(
-    [Parameter(Mandatory=$true)][string]$TargetingPackPublishRoot,
-    [Parameter(Mandatory=$true)][string]$TargetingPackMSIOutput,
-    [Parameter(Mandatory=$true)][string]$WixRoot,
-    [Parameter(Mandatory=$true)][string]$ProductMoniker,
-    [Parameter(Mandatory=$true)][string]$TargetingPackMSIVersion,
-    [Parameter(Mandatory=$true)][string]$TargetingPackNugetVersion,
-    [Parameter(Mandatory=$true)][string]$Architecture,
-    [Parameter(Mandatory=$true)][string]$TargetArchitecture,
-    [Parameter(Mandatory=$true)][string]$WixObjRoot,
-    [Parameter(Mandatory=$true)][string]$TargetingPackUpgradeCode
-)
-
-$RepoRoot = Convert-Path "$PSScriptRoot\..\..\..\..\.."
-$CommonScript = "$RepoRoot\tools-local\scripts\common\_common.ps1"
-
-if(-Not (Test-Path "$CommonScript"))
-{
-    Exit -1
-} 
-. "$CommonScript"
-
-$PackagingRoot = Join-Path $RepoRoot "src\pkg\packaging"
-
-$InstallFileswsx = "$WixObjRoot\install-files.wxs"
-$InstallFilesWixobj = "$WixObjRoot\install-files.wixobj"
-
-function RunHeat
-{
-    $Result = $true
-    pushd "$WixRoot"
-
-    Write-Host Running heat.. to $InstallFileswsx
-    Write-Host "Root $TargetingPackPublishRoot"
-
-    .\heat.exe dir `"$TargetingPackPublishRoot`" `
-        -nologo `
-        -template fragment `
-        -sreg -gg `
-        -var var.TargetingPackSrc `
-        -cg InstallFiles `
-        -srd `
-        -dr DOTNETHOME `
-        -out $InstallFileswsx | Out-Host
-
-    if($LastExitCode -ne 0)
-    {
-        $Result = $false
-        Write-Host "Heat failed with exit code $LastExitCode."
-    }
-
-    popd
-    return $Result
-}
-
-function RunCandle
-{
-    $Result = $true
-    pushd "$WixRoot"
-
-    Write-Host Running candle..
-    $AuthWsxRoot =  Join-Path $PackagingRoot "windows\targetingpack"
-
-    $ComponentVersion = $TargetingPackNugetVersion.Replace('-', '_');
-
-    .\candle.exe -nologo `
-        -out "$WixObjRoot\" `
-        -dTargetingPackSrc="$TargetingPackPublishRoot" `
-        -dMicrosoftEula="$PackagingRoot\windows\eula.rtf" `
-        -dProductMoniker="$ProductMoniker" `
-        -dBuildVersion="$TargetingPackMSIVersion" `
-        -dNugetVersion="$TargetingPackNugetVersion" `
-        -dComponentVersion="$ComponentVersion" `
-        -dTargetArchitecture="$TargetArchitecture" `
-        -dUpgradeCode="$TargetingPackUpgradeCode" `
-        -arch $Architecture `
-        -ext WixDependencyExtension.dll `
-        "$AuthWsxRoot\targetingpack.wxs" `
-        "$AuthWsxRoot\provider.wxs" `
-        $InstallFileswsx | Out-Host
-
-    if($LastExitCode -ne 0)
-    {
-        $Result = $false
-        Write-Host "Candle failed with exit code $LastExitCode."
-    }
-
-    popd
-    return $Result
-}
-
-function RunLight
-{
-    $Result = $true
-    pushd "$WixRoot"
-
-    Write-Host Running light..
-
-    .\light.exe -nologo `
-        -ext WixUIExtension.dll `
-        -ext WixDependencyExtension.dll `
-        -ext WixUtilExtension.dll `
-        -cultures:en-us `
-        "$WixObjRoot\targetingpack.wixobj" `
-        "$WixObjRoot\provider.wixobj" `
-        "$InstallFilesWixobj" `
-        -out $TargetingPackMSIOutput | Out-Host
-
-    if($LastExitCode -ne 0)
-    {
-        $Result = $false
-        Write-Host "Light failed with exit code $LastExitCode."
-    }
-
-    popd
-    return $Result
-}
-
-if(!(Test-Path $TargetingPackPublishRoot))
-{
-    throw "$TargetingPackPublishRoot not found"
-}
-
-if(!(Test-Path $WixObjRoot))
-{
-    throw "$WixObjRoot not found"
-}
-
-Write-Host "Creating Targeting Pack MSI at $TargetingPackMSIOutput"
-
-if([string]::IsNullOrEmpty($WixRoot))
-{
-    Exit -1
-}
-
-if(-Not (RunHeat))
-{
-    Exit -1
-}
-
-if(-Not (RunCandle))
-{
-    Exit -1
-}
-
-if(-Not (RunLight))
-{
-    Exit -1
-}
-
-if(!(Test-Path $TargetingPackMSIOutput))
-{
-    throw "Unable to create the Targeting Pack MSI."
-}
-
-Write-Host -ForegroundColor Green "Successfully created Targeting Pack MSI - $TargetingPackMSIOutput"
-
-exit $LastExitCode
index 375b5c6..5eadbd6 100644 (file)
@@ -1,17 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="..\dir.props" />
+
   <PropertyGroup>
     <PackagePlatform>AnyCPU</PackagePlatform>
     <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">obj/$(Configuration)/</IntermediateOutputPath>
     <IntermediateOutputPath Condition="'$(NuGetRuntimeIdentifier)' != ''">$(IntermediateOutputPath)$(NuGetRuntimeIdentifier)/</IntermediateOutputPath>
-
-    <!--
-      Allow packaging one build's outputs for a different RID. For example, package portable bits
-      for multiple Debian-based distros.
-    -->
-    <InstallerSourceOSPlatformConfig Condition="'$(InstallerSourceOSPlatformConfig)' == ''">$(OSPlatformConfig)</InstallerSourceOSPlatformConfig>
-    <InstallerSourceIntermediateOutputDir>$(BaseIntermediateOutputPath)$(InstallerSourceOSPlatformConfig)\$(MSBuildProjectName)\</InstallerSourceIntermediateOutputDir>
     
     <SkipPackageFileCheck>true</SkipPackageFileCheck>
     <!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. -->
@@ -26,6 +20,8 @@
     <PackProjectDependencies>true</PackProjectDependencies>
   </PropertyGroup>
 
+  <Import Project="packaging-tools\packaging-tools.props" />
+
   <!-- In *.builds projects, the current phase's name is the same as the project name. -->
   <PropertyGroup>
     <BuildPhase>$(MSBuildProjectName)</BuildPhase>
     </Otherwise>
   </Choose>
 
-  <!-- Detect framework pack suffix and apply defaults. -->
-  <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Ref'))">
-    <FrameworkPackType>targeting</FrameworkPackType>
-
-    <!--
-      Prevent 'runtime.<rid>.Microsoft.<framework>.App.Ref' packages from being built.
-
-      Not the same as HasRuntimePackages, which is used to set up ProjectReferences on the runtime
-      packages and generate assets such as the platform manifest.
-    -->
-    <BuildRuntimePackages>false</BuildRuntimePackages>
-
-    <PackageType>DotnetPlatform</PackageType>
-    <Version>$(SharedFrameworkNugetVersion)</Version>
-
-    <!-- Include the platform manifest in the data dir. -->
-    <PlatformManifestTargetPath>data/PlatformManifest.txt</PlatformManifestTargetPath>
-    <FrameworkListTargetPath>data/</FrameworkListTargetPath>
-
-    <!-- Exclude runtime.json from the package. -->
-    <IncludeRuntimeJson>false</IncludeRuntimeJson>
-    <IsLineupPackage>false</IsLineupPackage>
-
-    <!-- Remove package dependencies. -->
-    <ExcludeLineupReference>true</ExcludeLineupReference>
-    <PackProjectDependencies>false</PackProjectDependencies>
-
-    <!-- Location to lay out pack contents, and where to grab bits to create installers. -->
-    <PackLayoutDir>$(InstallerSourceIntermediateOutputDir)layout/$(FrameworkPackType)/</PackLayoutDir>
-
-    <InstallerName>$(ShortFrameworkName)-targeting-pack</InstallerName>
-  </PropertyGroup>
-
-  <PropertyGroup>
-    <VersionedInstallerName>$(InstallerName)-$(PackageNameSuffix)</VersionedInstallerName>
-    <VersionedInstallerName>$(VersionedInstallerName.ToLowerInvariant())</VersionedInstallerName>
-    <InstallerPackageRelease>1</InstallerPackageRelease>
-
-    <InstallerPackageVersion>$(ProductionVersion)</InstallerPackageVersion>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(InstallerExtension)' == '.deb'">
-    <InstallerPackageVersion Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">$(ProductionVersion)~$(VersionSuffix)</InstallerPackageVersion>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(InstallerExtension)' == '.rpm'">
-    <InstallerPackageRelease Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">0.1.$(VersionSuffix)</InstallerPackageRelease>
-    <InstallerPackageRelease>$([System.String]::Copy('$(InstallerPackageRelease)').Replace('-', '_'))</InstallerPackageRelease>
-  </PropertyGroup>
-
-  <PropertyGroup>
-    <InstallerIntermediatesDir>$(PackagesIntermediateDir)$(InstallerName)/$(InstallerPackageVersion)/</InstallerIntermediatesDir>
-
-    <InstallerBuildPart>$(ProductMoniker)</InstallerBuildPart>
-    <InstallerBuildPart Condition="'$(InstallerExtension)' == '.deb' or '$(InstallerExtension)' == '.rpm'"
-      >$(SharedFrameworkNugetVersion)-$(TargetArchitecture)</InstallerBuildPart>
-
-    <!-- Location to place the installer, in bin. -->
-    <InstallerFile>$(AssetOutputPath)$(InstallerName)-$(InstallerBuildPart)$(InstallerExtension)</InstallerFile>
-  </PropertyGroup>
-
   <PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.depproj'">
     <!-- we intentionally don't want to produce output -->
     <OutputPath>unused</OutputPath>
     <CrossGenSymbolsOutputPath>$(PackageSymbolsBinDir)/$(MSBuildProjectName)</CrossGenSymbolsOutputPath>
   </PropertyGroup>
 
-  <PropertyGroup Condition="'$(IsFrameworkPackage)' == 'true'">
-    <Version>$(SharedFrameworkNugetVersion)</Version>
-    <OmitDependencies>true</OmitDependencies>
-    <SkipValidatePackage>true</SkipValidatePackage>
-  </PropertyGroup>
-
   <!-- Add required legal files to packages -->
   <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
     <File Condition="Exists('$(PackageLicenseFile)')"
 
   <ItemGroup>
     <!--
-      Create Debian and RPM packages for targeting packs. Similar to the runtime package, we only
-      make one for all distros.
+      Create targeting pack packages/installers. Similar to the runtime package, we only make one
+      Debian or RPM package for all distros of that type.
     -->
     <InstallerPackageProject
       Include="$(MSBuildProjectFullPath)"
index 86ddb62..f389726 100644 (file)
@@ -1,12 +1,7 @@
 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="..\dir.targets" />
 
-  <!--
-    Include common targets for specific project types. These files include BuildTools target
-    overrides that shouldn't be applied to other projects.
-  -->
-  <Import Project="framework.dependency.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'"/>
-  <Import Project="framework.packaging.targets" Condition="'$(IsFrameworkPackage)' == 'true'"/>
+  <Import Project="packaging-tools\packaging-tools.targets" />
 
   <UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
   <UsingTask TaskName="GenerateFileVersionProps" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
@@ -9,10 +9,12 @@
   <Target Name="GenerateInstallers"
           DependsOnTargets="
             GenerateDeb;
-            GenerateRpm" />
+            GenerateRpm;
+            GenerateMsi" />
 
-  <Target Name="GenerateDeb" DependsOnTargets="TestDebuild;CreateDeb" />
-  <Target Name="GenerateRpm" DependsOnTargets="TestFPMTool;CreateRpm" />
+  <Target Name="GenerateDeb" DependsOnTargets="TestDebuild;CreateDeb" Condition="'$(BuildDebPackage)' == 'true'"/>
+  <Target Name="GenerateRpm" DependsOnTargets="TestFPMTool;CreateRpm" Condition="'$(BuildRpmPackage)' == 'true'"/>
+  <Target Name="GenerateMsi" DependsOnTargets="CreateMsi" Condition="'$(GenerateMSI)' == 'true'"/>
 
   <!--
     Create Debian package.
@@ -22,7 +24,7 @@
             InitializeDotnetDebTool;
             CreateInstallerLayout;
             GetDebInstallerJsonProperties"
-          Condition="'$(BuildDebPackage)' == 'true' AND '$(DebuildPresent)' == 'true'">
+          Condition="'$(DebuildPresent)' == 'true'">
     <PropertyGroup>
       <ConfigJsonFile>$(LayoutDirectory)debian_config.json</ConfigJsonFile>
       <DebIntermediatesDir>$(InstallerIntermediatesDir)out-deb</DebIntermediatesDir>
@@ -71,7 +73,7 @@
           DependsOnTargets="
             CreateInstallerLayout;
             GetRpmInstallerJsonProperties"
-          Condition="'$(BuildRpmPackage)' == 'true' AND '$(FPMPresent)' == 'true'">
+          Condition="'$(FPMPresent)' == 'true'">
     <PropertyGroup>
       <ConfigJsonFile>$(LayoutDirectory)rpm_config.json</ConfigJsonFile>
       <RpmIntermediatesDir>$(InstallerIntermediatesDir)out-rpm</RpmIntermediatesDir>
   </Target>
 
   <!--
+    Create MSI installer, using WiX tools.
+  -->
+  <Target Name="CreateMsi"
+          DependsOnTargets="RunLightLinker">
+    <Message Text="Created '$(InstallerFile)'" Importance="High" />
+  </Target>
+
+  <!--
+    If UpgradeCode isn't manually set, generate based on installer full path. Not suitable for
+    bundles.
+  -->
+  <Target Name="GetUpgradeCode"
+          Condition="'$(UpgradeCode)' == ''">
+    <GenerateGuidFromName Name="$(InstallerFile)">
+      <Output TaskParameter="GeneratedGuid" PropertyName="UpgradeCode" />
+    </GenerateGuidFromName>
+  </Target>
+
+  <Target Name="RunHeatHarvester">
+    <PropertyGroup>
+      <InstallFilesWixSourceFile>$(WixObjDir)install-files.wxs</InstallFilesWixSourceFile>
+      <InstallFilesWixObjFile>$(WixObjDir)install-files.wixobj</InstallFilesWixObjFile>
+
+      <_wixArgs></_wixArgs>
+      <_wixArgs>$(_wixArgs) dir "$(PackLayoutDir)"</_wixArgs>
+      <_wixArgs>$(_wixArgs) -nologo</_wixArgs>
+      <_wixArgs>$(_wixArgs) -template fragment</_wixArgs>
+      <_wixArgs>$(_wixArgs) -sreg</_wixArgs>
+      <_wixArgs>$(_wixArgs) -gg</_wixArgs>
+      <_wixArgs>$(_wixArgs) -var var.TargetingPackSrc</_wixArgs>
+      <_wixArgs>$(_wixArgs) -cg InstallFiles</_wixArgs>
+      <_wixArgs>$(_wixArgs) -srd</_wixArgs>
+      <_wixArgs>$(_wixArgs) -dr DOTNETHOME</_wixArgs>
+      <_wixArgs>$(_wixArgs) -out $(InstallFilesWixSourceFile)</_wixArgs>
+    </PropertyGroup>
+
+    <Message Importance="High" Text="Heat '$(MSBuildProjectName)'" />
+    <Exec Command="heat.exe $(_wixArgs)" WorkingDirectory="$(WixToolsDir)" />
+  </Target>
+
+  <Target Name="RunCandleCompiler"
+          DependsOnTargets="
+            GetUpgradeCode;
+            GenerateMsiVersionString">
+    <PropertyGroup>
+      <_wixArgs></_wixArgs>
+      <_wixArgs>$(_wixArgs) -nologo</_wixArgs>
+      <_wixArgs>$(_wixArgs) -ext WixDependencyExtension.dll</_wixArgs>
+      <_wixArgs>$(_wixArgs) -arch $(MsiArch)</_wixArgs>
+
+      <_wixArgs>$(_wixArgs) -dTargetingPackSrc="$(PackLayoutDir)" </_wixArgs>
+      <_wixArgs>$(_wixArgs) -dMicrosoftEula="$(MicrosoftEulaFile)"</_wixArgs>
+      <_wixArgs>$(_wixArgs) -dProductMoniker="$(TargetingPackBrandName)"</_wixArgs>
+      <_wixArgs>$(_wixArgs) -dBuildVersion="$(MsiVersionString)"</_wixArgs>
+      <_wixArgs>$(_wixArgs) -dNugetVersion="$(SharedFrameworkNugetVersion)"</_wixArgs>
+      <_wixArgs>$(_wixArgs) -dTargetArchitecture="$(TargetArchitecture)"</_wixArgs>
+      <_wixArgs>$(_wixArgs) -dUpgradeCode="$(UpgradeCode)"</_wixArgs>
+      <_wixArgs>$(_wixArgs) -dDependencyKeyName="$(InstallerName.Replace('-', '_'))"</_wixArgs>
+
+      <_wixArgs>$(_wixArgs) "$(MSBuildThisFileDirectory)windows/targetingpack.wxs"</_wixArgs>
+      <_wixArgs>$(_wixArgs) "$(MSBuildThisFileDirectory)windows/provider.wxs"</_wixArgs>
+      <_wixArgs>$(_wixArgs) "$(InstallFilesWixSourceFile)"</_wixArgs>
+
+      <_wixArgs>$(_wixArgs) -out "$(WixObjDir)"</_wixArgs>
+    </PropertyGroup>
+
+    <Message Importance="High" Text="Candle '$(MSBuildProjectName)'" />
+    <Exec Command="candle.exe $(_wixArgs)" WorkingDirectory="$(WixToolsDir)" />
+  </Target>
+
+  <Target Name="RunLightLinker"
+          DependsOnTargets="
+            RunHeatHarvester;
+            RunCandleCompiler">
+    <PropertyGroup>
+      <_wixArgs></_wixArgs>
+      <_wixArgs>$(_wixArgs) -nologo</_wixArgs>
+      <_wixArgs>$(_wixArgs) -ext WixUIExtension.dll</_wixArgs>
+      <_wixArgs>$(_wixArgs) -ext WixDependencyExtension.dll</_wixArgs>
+      <_wixArgs>$(_wixArgs) -ext WixUtilExtension.dll</_wixArgs>
+      <_wixArgs>$(_wixArgs) -cultures:en-us</_wixArgs>
+
+      <_wixArgs>$(_wixArgs) "$(WixObjDir)targetingpack.wixobj"</_wixArgs>
+      <_wixArgs>$(_wixArgs) "$(WixObjDir)provider.wixobj"</_wixArgs>
+      <_wixArgs>$(_wixArgs) "$(InstallFilesWixObjFile)"</_wixArgs>
+
+      <_wixArgs>$(_wixArgs) -out $(InstallerFile)</_wixArgs>
+    </PropertyGroup>
+
+    <Message Importance="High" Text="Light '$(MSBuildProjectName)'" />
+    <Exec Command="light.exe $(_wixArgs)" WorkingDirectory="$(WixToolsDir)" />
+  </Target>
+
+  <!--
     Create installer layout. Used for RPM or Debian package creation.
   -->
   <Target Name="CreateInstallerLayout"
 
   <Target Name="CopyFilesToLayout">
     <PropertyGroup>
-      <LayoutDirectory>$(InstallerIntermediatesDir)/debianLayoutDirectory/</LayoutDirectory>
+      <LayoutDirectory>$(InstallerIntermediatesDir)/layoutDirectory/</LayoutDirectory>
       <LayoutAbsolute>$(LayoutDirectory)$</LayoutAbsolute>
       <LayoutPackageRoot>$(LayoutDirectory)package_root</LayoutPackageRoot>
       <LayoutSamples>$(LayoutDirectory)samples</LayoutSamples>
   <Target Name="CreateFrameworkPackLayout"
           AfterTargets="CreatePackage"
           Condition="'$(FrameworkPackType)' != ''">
+    <!--
+      Clean up existing layout. Otherwise, unclean dev builds can lay out multiple versions side by
+      side in the layout that all get packed into installers, causing confusion.
+    -->
+    <RemoveDir Directories="$(PackLayoutDir)" />
+
     <PropertyGroup>
       <TargetingPackNupkgFile>$(PackageOutputPath)$(Id).$(PackageVersion).nupkg</TargetingPackNupkgFile>
     </PropertyGroup>
diff --git a/src/installer/pkg/projects/packaging-tools/packaging-tools.props b/src/installer/pkg/projects/packaging-tools/packaging-tools.props
new file mode 100644 (file)
index 0000000..4a5e150
--- /dev/null
@@ -0,0 +1,90 @@
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+  <PropertyGroup>
+    <!--
+      Allow packaging one build's outputs for a different RID. For example, package portable bits
+      for multiple Debian-based distros.
+    -->
+    <InstallerSourceOSPlatformConfig Condition="'$(InstallerSourceOSPlatformConfig)' == ''">$(OSPlatformConfig)</InstallerSourceOSPlatformConfig>
+    <InstallerSourceIntermediateOutputDir>$(BaseIntermediateOutputPath)$(InstallerSourceOSPlatformConfig)\$(MSBuildProjectName)\</InstallerSourceIntermediateOutputDir>
+  </PropertyGroup>
+
+  <!-- Detect framework pack suffix and apply defaults. -->
+  <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Ref'))">
+    <FrameworkPackType>targeting</FrameworkPackType>
+
+    <!--
+      Prevent 'runtime.<rid>.Microsoft.<framework>.App.Ref' packages from being built.
+
+      Not the same as HasRuntimePackages, which is used to set up ProjectReferences on the runtime
+      packages and generate assets such as the platform manifest.
+    -->
+    <BuildRuntimePackages>false</BuildRuntimePackages>
+
+    <PackageType>DotnetPlatform</PackageType>
+    <Version>$(SharedFrameworkNugetVersion)</Version>
+
+    <!-- Include the platform manifest in the data dir. -->
+    <PlatformManifestTargetPath>data/PlatformManifest.txt</PlatformManifestTargetPath>
+    <FrameworkListTargetPath>data/</FrameworkListTargetPath>
+
+    <!-- Exclude runtime.json from the package. -->
+    <IncludeRuntimeJson>false</IncludeRuntimeJson>
+    <IsLineupPackage>false</IsLineupPackage>
+
+    <!-- Remove package dependencies. -->
+    <ExcludeLineupReference>true</ExcludeLineupReference>
+    <PackProjectDependencies>false</PackProjectDependencies>
+
+    <!-- Location to lay out pack contents, and where to grab bits to create installers. -->
+    <PackLayoutDir>$(InstallerSourceIntermediateOutputDir)layout/$(FrameworkPackType)/</PackLayoutDir>
+
+    <InstallerName>$(ShortFrameworkName)-targeting-pack</InstallerName>
+  </PropertyGroup>
+
+  <!-- Only targeting pack MSIs are currently supported by this infrastructure. -->
+  <PropertyGroup Condition="'$(FrameworkPackType)' != 'targeting'">
+    <GenerateMSI>false</GenerateMSI>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <VersionedInstallerName>$(InstallerName)-$(PackageNameSuffix)</VersionedInstallerName>
+    <VersionedInstallerName>$(VersionedInstallerName.ToLowerInvariant())</VersionedInstallerName>
+    <InstallerPackageRelease>1</InstallerPackageRelease>
+
+    <InstallerPackageVersion>$(ProductionVersion)</InstallerPackageVersion>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(InstallerExtension)' == '.deb'">
+    <InstallerPackageVersion Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">$(ProductionVersion)~$(VersionSuffix)</InstallerPackageVersion>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(InstallerExtension)' == '.rpm'">
+    <InstallerPackageRelease Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">0.1.$(VersionSuffix)</InstallerPackageRelease>
+    <InstallerPackageRelease>$([System.String]::Copy('$(InstallerPackageRelease)').Replace('-', '_'))</InstallerPackageRelease>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <InstallerIntermediatesDir>$(PackagesIntermediateDir)$(InstallerName)/$(InstallerPackageVersion)/</InstallerIntermediatesDir>
+
+    <InstallerBuildPart>$(ProductMoniker)</InstallerBuildPart>
+    <InstallerBuildPart Condition="'$(InstallerExtension)' == '.deb' or '$(InstallerExtension)' == '.rpm'"
+      >$(SharedFrameworkNugetVersion)-$(TargetArchitecture)</InstallerBuildPart>
+
+    <!-- Location to place the installer, in bin. -->
+    <InstallerFileNameWithoutExtension>$(InstallerName)-$(InstallerBuildPart)</InstallerFileNameWithoutExtension>
+    <InstallerFile>$(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(InstallerExtension)</InstallerFile>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(IsFrameworkPackage)' == 'true'">
+    <Version>$(SharedFrameworkNugetVersion)</Version>
+    <OmitDependencies>true</OmitDependencies>
+    <SkipValidatePackage>true</SkipValidatePackage>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(InstallerFileNameWithoutExtension)' != '' AND '$(GenerateMSI)' == 'true'">
+    <OutputType>Package</OutputType>
+    <OutputName>$(InstallerFileNameWithoutExtension)</OutputName>
+  </PropertyGroup>
+
+</Project>
diff --git a/src/installer/pkg/projects/packaging-tools/packaging-tools.targets b/src/installer/pkg/projects/packaging-tools/packaging-tools.targets
new file mode 100644 (file)
index 0000000..8611aea
--- /dev/null
@@ -0,0 +1,10 @@
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+  <!--
+    Include common targets for specific project types. These files include BuildTools target
+    overrides that shouldn't be applied to other projects.
+  -->
+  <Import Project="framework.dependency.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
+  <Import Project="framework.packaging.targets" Condition="'$(IsFrameworkPackage)' == 'true'" />
+
+</Project>
@@ -2,7 +2,7 @@
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
   <?include "Variables.wxi" ?>
   <Fragment>
-    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no" Guid="117B1755-5027-4257-A1A9-7C37D81C3D5F">
+    <Component Id="$(var.DependencyKeyId)" Directory="TARGETDIR" Win64="no">
       <dep:Provides Key="$(var.DependencyKey)" />
     </Component>
   </Fragment>
@@ -21,6 +21,6 @@
   <?error Invalid Platform ($(var.Platform))?>
   <?endif?>
 
-  <?define DependencyKey   = "Dotnet_Core_TargetingPack_$(var.BuildVersion)_$(var.Platform)"?>
+  <?define DependencyKey   = "$(var.DependencyKeyName)_$(var.BuildVersion)_$(var.Platform)"?>
   <?define DependencyKeyId = "$(var.DependencyKey)" ?>
 </Include>
\ No newline at end of file
index 2d57366..2abc4b7 100644 (file)
@@ -3,6 +3,7 @@
   <PropertyGroup>
     <IsFrameworkPackage>true</IsFrameworkPackage>
     <ShortFrameworkName>windowsdesktop</ShortFrameworkName>
+    <ProductBrandPrefix>Microsoft Windows Desktop</ProductBrandPrefix>
   </PropertyGroup>
 
   <Import Project="..\..\dir.props" />