Browse Source

Remove the Shared Framework WixLib in favor of the MSI installer (#59351)

Jeremy Koritzinsky 1 year ago
parent
commit
e2a857c8cc

+ 0 - 12
AspNetCore.sln

@@ -1594,8 +1594,6 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SharedFramework", "src\Inst
 EndProject
 EndProject
 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SharedFrameworkBundle", "src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj", "{D6C54D8B-043F-4877-B751-60E7390F9EC6}"
 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SharedFrameworkBundle", "src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj", "{D6C54D8B-043F-4877-B751-60E7390F9EC6}"
 EndProject
 EndProject
-Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SharedFrameworkLib", "src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj", "{5244BC49-2568-4701-80A6-EAB8950AB5FA}"
-EndProject
 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "WindowsHostingBundle", "src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj", "{6F1B115C-1903-40CB-837D-7961AB610F4E}"
 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "WindowsHostingBundle", "src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj", "{6F1B115C-1903-40CB-837D-7961AB610F4E}"
 EndProject
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites", "src\Servers\testassets\ServerComparison.TestSites\ServerComparison.TestSites.csproj", "{56DFE643-7F0F-40C8-9F7F-8EA5357781EF}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerComparison.TestSites", "src\Servers\testassets\ServerComparison.TestSites\ServerComparison.TestSites.csproj", "{56DFE643-7F0F-40C8-9F7F-8EA5357781EF}"
@@ -9749,16 +9747,6 @@ Global
 		{D6C54D8B-043F-4877-B751-60E7390F9EC6}.Release|arm64.Build.0 = Release|arm64
 		{D6C54D8B-043F-4877-B751-60E7390F9EC6}.Release|arm64.Build.0 = Release|arm64
 		{D6C54D8B-043F-4877-B751-60E7390F9EC6}.Release|x64.ActiveCfg = Release|arm64
 		{D6C54D8B-043F-4877-B751-60E7390F9EC6}.Release|x64.ActiveCfg = Release|arm64
 		{D6C54D8B-043F-4877-B751-60E7390F9EC6}.Release|x86.ActiveCfg = Release|arm64
 		{D6C54D8B-043F-4877-B751-60E7390F9EC6}.Release|x86.ActiveCfg = Release|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Debug|Any CPU.ActiveCfg = Debug|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Debug|arm64.ActiveCfg = Debug|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Debug|arm64.Build.0 = Debug|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Debug|x64.ActiveCfg = Debug|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Debug|x86.ActiveCfg = Debug|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Release|Any CPU.ActiveCfg = Release|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Release|arm64.ActiveCfg = Release|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Release|arm64.Build.0 = Release|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Release|x64.ActiveCfg = Release|arm64
-		{5244BC49-2568-4701-80A6-EAB8950AB5FA}.Release|x86.ActiveCfg = Release|arm64
 		{6F1B115C-1903-40CB-837D-7961AB610F4E}.Debug|Any CPU.ActiveCfg = Debug|arm64
 		{6F1B115C-1903-40CB-837D-7961AB610F4E}.Debug|Any CPU.ActiveCfg = Debug|arm64
 		{6F1B115C-1903-40CB-837D-7961AB610F4E}.Debug|arm64.ActiveCfg = Debug|arm64
 		{6F1B115C-1903-40CB-837D-7961AB610F4E}.Debug|arm64.ActiveCfg = Debug|arm64
 		{6F1B115C-1903-40CB-837D-7961AB610F4E}.Debug|arm64.Build.0 = Debug|arm64
 		{6F1B115C-1903-40CB-837D-7961AB610F4E}.Debug|arm64.Build.0 = Debug|arm64

+ 4 - 7
eng/Build.props

@@ -253,11 +253,9 @@
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x64" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x64" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x86" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=x86" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=arm64" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=arm64" />
-
-        <!-- Build the SharedFramework wixlib -->
-        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x64" />
-        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=x86" />
-        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=arm64" />
+        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFramework\SharedFramework.wixproj" AdditionalProperties="Platform=x64" />
+        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFramework\SharedFramework.wixproj" AdditionalProperties="Platform=x86" />
+        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFramework\SharedFramework.wixproj" AdditionalProperties="Platform=arm64" />
 
 
         <!-- Windows hosting bundle -->
         <!-- Windows hosting bundle -->
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj" AdditionalProperties="Platform=x86" />
@@ -274,8 +272,7 @@
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\TargetingPack\TargetingPack.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
         <!-- Build the SharedFramework installers -->
         <!-- Build the SharedFramework installers -->
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
         <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
-        <!-- Build the SharedFramework wixlib -->
-        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFrameworkLib\SharedFrameworkLib.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
+        <InstallerProject Include="$(RepoRoot)src\Installers\Windows\SharedFramework\SharedFramework.wixproj" AdditionalProperties="Platform=$(TargetArchitecture)" />
       </ItemGroup>
       </ItemGroup>
 
 
       <ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '2') and '$(TargetOsName)' == 'win' and '$(TargetArchitecture)' == 'x64'">
       <ItemGroup Condition="'$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '2') and '$(TargetOsName)' == 'win' and '$(TargetArchitecture)' == 'x64'">

+ 1 - 1
src/Installers/Windows/Installers.slnf

@@ -5,7 +5,7 @@
       "src\\Installers\\Windows\\AspNetCoreModule-Setup\\CustomAction\\aspnetcoreCA.vcxproj",
       "src\\Installers\\Windows\\AspNetCoreModule-Setup\\CustomAction\\aspnetcoreCA.vcxproj",
       "src\\Installers\\Windows\\AspNetCoreModule-Setup\\IIS-Setup\\iisca\\lib\\iisca.vcxproj",
       "src\\Installers\\Windows\\AspNetCoreModule-Setup\\IIS-Setup\\iisca\\lib\\iisca.vcxproj",
       "src\\Installers\\Windows\\AspNetCoreModule-Setup\\IIS-Setup\\IIS-Common\\lib\\IISSetup.CommonLib.vcxproj",
       "src\\Installers\\Windows\\AspNetCoreModule-Setup\\IIS-Setup\\IIS-Common\\lib\\IISSetup.CommonLib.vcxproj",
-      "src\\Installers\\Windows\\SharedFrameworkLib\\SharedFrameworkLib.wixproj",
+      "src\\Installers\\Windows\\SharedFramework\\SharedFramework.wixproj",
       "src\\Installers\\Windows\\SharedFrameworkBundle\\SharedFrameworkBundle.wixproj",
       "src\\Installers\\Windows\\SharedFrameworkBundle\\SharedFrameworkBundle.wixproj",
       "src\\Installers\\Windows\\WindowsHostingBundle\\WindowsHostingBundle.wixproj",
       "src\\Installers\\Windows\\WindowsHostingBundle\\WindowsHostingBundle.wixproj",
       "src\\Installers\\Windows\\SharedFramework\\SharedFramework.wixproj"
       "src\\Installers\\Windows\\SharedFramework\\SharedFramework.wixproj"

+ 5 - 7
src/Installers/Windows/SharedFrameworkBundle/Bundle.wxs

@@ -94,13 +94,11 @@
         <Variable Name="BundleNameFull" Value="$(var.BundleNameFull)"/>
         <Variable Name="BundleNameFull" Value="$(var.BundleNameFull)"/>
 
 
         <Chain>
         <Chain>
-            <?if $(var.Platform)=x86?>
-            <PackageGroupRef Id="PG_AspNetCoreSharedFramework_x86"/>
-            <?elseif $(var.Platform)=x64?>
-            <PackageGroupRef Id="PG_AspNetCoreSharedFramework_x64"/>
-            <?elseif $(var.Platform)=arm64?>
-            <PackageGroupRef Id="PG_AspNetCoreSharedFramework_arm64"/>
-            <?endif?>
+            <MsiPackage Id="SharedFxRedist" SourceFile="$(var.InstallersOutputPath)\$(var.SharedFxRedistInstaller)"
+                        Name="$(var.SharedFxRedistInstaller)"
+                        Compressed="yes"
+                        Vital="yes">
+            </MsiPackage>
         </Chain>
         </Chain>
     </Bundle>
     </Bundle>
 </Wix>
 </Wix>

+ 10 - 33
src/Installers/Windows/SharedFrameworkBundle/SharedFrameworkBundle.wixproj

@@ -33,39 +33,14 @@
     <Content Include="thm.xml" />
     <Content Include="thm.xml" />
   </ItemGroup>
   </ItemGroup>
 
 
-  <Choose>
-    <When Condition="'$(Platform)' == 'arm64'">
-      <ItemGroup>
-        <ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj" SetPlatform="Platform=arm64">
-          <Name>SharedFrameworkLib</Name>
-          <Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
-          <Private>True</Private>
-          <DoNotHarvest>True</DoNotHarvest>
-        </ProjectReference>
-      </ItemGroup>
-    </When>
-    <Otherwise>
-      <ItemGroup>
-        <ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj"
-                          SetPlatform="Platform=x86"
-                          Condition="'$(DotNetBuild)' != 'true' or '$(Platform)' == 'x86'">
-          <Name>SharedFrameworkLib</Name>
-          <Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
-          <Private>True</Private>
-          <DoNotHarvest>True</DoNotHarvest>
-        </ProjectReference>
-        <ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj"
-                          SetPlatform="Platform=x64"
-                          Condition="'$(DotNetBuild)' != 'true' or '$(Platform)' == 'x64'">
-          <Name>SharedFrameworkLib</Name>
-          <Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
-          <Private>True</Private>
-          <DoNotHarvest>True</DoNotHarvest>
-        </ProjectReference>
-      </ItemGroup>
-    </Otherwise>
-  </Choose>
-
+  <ItemGroup>
+    <ProjectReference Include="..\SharedFramework\SharedFramework.wixproj" SetPlatform="Platform=$(Platform)">
+      <Name>SharedFramework</Name>
+      <Project>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</Project>
+      <Private>True</Private>
+      <DoNotHarvest>True</DoNotHarvest>
+    </ProjectReference>
+  </ItemGroup>
 
 
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
 
 
@@ -94,6 +69,8 @@
     <DefineConstants>$(DefineConstants);BundleRegManufacturer=$(BundleRegManufacturer)</DefineConstants>
     <DefineConstants>$(DefineConstants);BundleRegManufacturer=$(BundleRegManufacturer)</DefineConstants>
     <DefineConstants>$(DefineConstants);BundleRegFamily=$(BundleRegFamily)</DefineConstants>
     <DefineConstants>$(DefineConstants);BundleRegFamily=$(BundleRegFamily)</DefineConstants>
     <DefineConstants>$(DefineConstants);BundleRegName=$(BundleRegName)</DefineConstants>
     <DefineConstants>$(DefineConstants);BundleRegName=$(BundleRegName)</DefineConstants>
+    <DefineConstants>$(DefineConstants);InstallersOutputPath=$(InstallersOutputPath)</DefineConstants>
+    <DefineConstants>$(DefineConstants);SharedFxRedistInstaller=$(RuntimeInstallerBaseName)-$(PackageVersion)-win-$(Platform).msi</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
 
 
 </Project>
 </Project>

+ 0 - 35
src/Installers/Windows/SharedFrameworkLib/Library.wxs

@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
-	<Fragment>
-        <PackageGroup Id="PG_AspNetCoreSharedFramework_$(var.Platform)">
-            <RollbackBoundary Id="RB_AspNetCoreSharedFramework_$(var.Platform)" />
-
-            <?ifdef SharedFrameworkInstallCondition?>
-            <?undef SharedFrameworkInstallCondition?>
-            <?endif?>
-            <?ifdef DotNetHome?>
-            <?undef DotNetHome?>
-            <?endif?>
-            <?if $(var.Platform)=x86?>
-            <!-- These variables could be unset at this point, which we explicitly treat as 'false' -->
-            <?define SharedFrameworkInstallCondition=(NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0") AND (NOT OPT_NO_X86 OR OPT_NO_X86="0")?>
-            <?define DotNetHome=DOTNETHOME_X86?>
-            <?elseif $(var.Platform)=x64?>
-            <?define SharedFrameworkInstallCondition=VersionNT64 AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")?>
-            <?define DotNetHome=DOTNETHOME_X64?>
-            <?elseif $(var.Platform)=arm64?>
-            <?define SharedFrameworkInstallCondition=VersionNT64 AND (NOT OPT_NO_SHAREDFX OR OPT_NO_SHAREDFX="0")?>
-            <?define DotNetHome=DOTNETHOME_ARM64?>
-            <?endif?>
-
-            <MsiPackage Id="AspNetCoreSharedFramework_$(var.Platform)"
-                        SourceFile="$(var.SharedFramework.TargetPath)"
-                        Compressed="yes"
-                        Visible="no"
-                        Vital="yes"
-                        InstallCondition="$(var.SharedFrameworkInstallCondition)">
-                <MsiProperty Name="DOTNETHOME" Value="[$(var.DotNetHome)]" />
-            </MsiPackage>
-        </PackageGroup>
-	</Fragment>
-</Wix>

+ 0 - 63
src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj

@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
-
-  <PropertyGroup>
-    <Name>AspNetCoreSharedFrameworkLib$(Platform)</Name>
-    <OutputName>$(Name)</OutputName>
-    <!-- Use the internal installer name because .wixlib files are only produced so we can hand them off to the dotnet/cli repo. -->
-    <!-- This is still marked as 'shipping' because is needs to copied to artifact outputs. -->
-    <IsShipping>true</IsShipping>
-    <OutputType>Library</OutputType>
-    <LibBindFiles>true</LibBindFiles>
-    <NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
-    <ProjectGuid>{5244BC49-2568-4701-80A6-EAB8950AB5FA}</ProjectGuid>
-    <SchemaVersion>2.0</SchemaVersion>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <WixExtension Include="WixBalExtension">
-      <HintPath>$(WixExtDir)\WixBalExtension.dll</HintPath>
-      <Name>WixBalExtension</Name>
-    </WixExtension>
-  </ItemGroup>
-
-  <ItemGroup>
-    <Compile Include="Library.wxs" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\SharedFramework\SharedFramework.wixproj">
-      <Project>{C681D730-4505-42C6-9E6C-87F757C4FB32}</Project>
-      <Name>SharedFramework</Name>
-      <Private>True</Private>
-      <DoNotHarvest>true</DoNotHarvest>
-    </ProjectReference>
-  </ItemGroup>
-
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
-
-  <PropertyGroup>
-    <PackageFileName>$(RuntimeInstallerBaseName)-internal-$(PackageVersion)-win-$(Platform)$(TargetExt)</PackageFileName>
-  </PropertyGroup>
-
-  <!-- Overwrite the wix package drop creation target to create a lit
-       package instead. -->
-  <Target Name="CreateWixPackageDrop" AfterTargets="CopyToArtifactsDirectory">
-    <ItemGroup>
-      <WixInstallerFilesToProcess Include="$(InstallersOutputPath)$(OutputName).wixlib" />
-      <WixInstallerFilesToProcess Include="$(InstallersOutputPath)$(PackageFileName)"
-        Condition=" '$(SkipCopyToArtifactsDirectory)' != 'true' " />
-    </ItemGroup>
-
-    <CreateLitCommandPackageDrop
-      LitCommandWorkingDir="$(WixCommandObjDir)"
-      OutputFolder="$(WixCommandPackagesDir)"
-      WixExtensions="@(WixExtension)"
-      Bf="true"
-      InstallerFile="%(WixInstallerFilesToProcess.Identity)"
-      WixSrcFiles="@(CompileObjOutput);@(WixObject);@(WixLibProjects);@(WixLibrary)">
-      <Output TaskParameter="OutputFile" PropertyName="_LitCommandPackageNameOutput" />
-    </CreateLitCommandPackageDrop>
-  </Target>
-</Project>

+ 1 - 1
src/Installers/Windows/WindowsHostingBundle/WindowsHostingBundle.wixproj

@@ -61,7 +61,7 @@
       <Private>True</Private>
       <Private>True</Private>
       <DoNotHarvest>true</DoNotHarvest>
       <DoNotHarvest>true</DoNotHarvest>
     </ProjectReference>
     </ProjectReference>
-    <ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj"
+    <ProjectReference Include="..\SharedFramework\SharedFramework.wixproj"
       Private="false"
       Private="false"
       ReferenceOutputAssembly="false"
       ReferenceOutputAssembly="false"
       SkipGetTargetFrameworkProperties="true" />
       SkipGetTargetFrameworkProperties="true" />

+ 0 - 1
src/Installers/Windows/Wix.targets

@@ -40,7 +40,6 @@
   </PropertyGroup>
   </PropertyGroup>
 
 
   <UsingTask TaskName="CreateLightCommandPackageDrop" AssemblyFile="$(MicrosoftDotNetBuildTasksInstallersTaskAssembly)" />
   <UsingTask TaskName="CreateLightCommandPackageDrop" AssemblyFile="$(MicrosoftDotNetBuildTasksInstallersTaskAssembly)" />
-  <UsingTask TaskName="CreateLitCommandPackageDrop" AssemblyFile="$(MicrosoftDotNetBuildTasksInstallersTaskAssembly)" />
 
 
   <Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " />
   <Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " />