From ee86f5b2f3a9411de556c261f35fed762d7f8dac Mon Sep 17 00:00:00 2001 From: Davis Goodin Date: Tue, 23 Apr 2019 10:50:50 -0500 Subject: [PATCH] Produce mostly empty Microsoft.NETCore.App (dotnet/core-setup#5893) * Produce mostly empty Microsoft.NETCore.App Package is now empty with a platforms package dependency. Create Microsoft.NETCore.App.Insertion transport package for compatibility workarounds. This commit also moves netcoreapp sfx generation to the new infrastructure to more easily handle the migration away from Microsoft.NETCore.App. * Test workarounds for Msft.NETCore.App.Insertion If tests use MNA, use MNAI. * M.NETCore.App.Insertion => M.NETCore.App.Internal It isn't just for insertion into core-sdk, we use it in core-setup too for now. * Update dir.props: quote '/' and '\' in comment Co-Authored-By: dagood * Comment on explicit .lib exclusion Commit migrated from https://github.com/dotnet/core-setup/commit/0752a1798f8a089aa78796068a43b52ee1564aa5 --- eng/jobs/windows-build.yml | 6 - src/installer/TestProjects.props | 1 + src/installer/config.json | 6 - src/installer/dir.proj | 1 - .../packaging-tools/framework.packaging.targets | 3 +- .../pkg/packaging-tools/packaging-tools.targets | 22 ++- .../sharedFramework/sharedFramework.csproj | 85 ++++++++++- .../sharedFramework/breadcrumbstorefolder.wxs | 38 +++++ .../windows/sharedFramework/product.wxs | 8 + .../windows/sharedFramework/werrelatedkeys.wxs | 52 +++++++ .../pkg/packaging-tools/windows/wix.targets | 18 ++- .../pkg/packaging/windows/package.targets | 13 -- .../windows/sharedframework/generatemsi.ps1 | 163 -------------------- .../packaging/windows/sharedframework/provider.wxs | 9 -- .../windows/sharedframework/registrykeys.wxs | 42 ------ .../windows/sharedframework/sharedframework.wxs | 64 -------- src/installer/pkg/projects/descriptions.json | 5 + .../pkg/Microsoft.NETCore.App.Internal.pkgproj | 25 ++++ .../netcoreapp/pkg/Microsoft.NETCore.App.pkgproj | 59 +++++--- .../netcoreapp/pkg/Microsoft.NETCore.App.targets | 22 --- .../pkg/projects/netcoreapp/pkg/dir.props | 2 +- src/installer/sharedFramework/framework/Program.cs | 11 -- .../sharedFramework/framework/framework.csproj | 7 - .../sharedFramework/lockedhost/lockedhost.csproj | 16 -- src/installer/sharedFramework/sharedFramework.proj | 165 --------------------- .../test/Assets/TestProjects/Directory.Build.props | 4 + .../TestProjects/MNADeprecationWorkaround.props | 18 +++ .../TestProjects/PortableApp/PortableApp.csproj | 62 +++++++- .../StandaloneApp20/Directory.Build.props | 10 ++ .../StandaloneApp21/Directory.Build.props | 10 ++ 30 files changed, 394 insertions(+), 553 deletions(-) create mode 100644 src/installer/pkg/packaging-tools/windows/sharedFramework/breadcrumbstorefolder.wxs create mode 100644 src/installer/pkg/packaging-tools/windows/sharedFramework/werrelatedkeys.wxs delete mode 100644 src/installer/pkg/packaging/windows/sharedframework/generatemsi.ps1 delete mode 100644 src/installer/pkg/packaging/windows/sharedframework/provider.wxs delete mode 100644 src/installer/pkg/packaging/windows/sharedframework/registrykeys.wxs delete mode 100644 src/installer/pkg/packaging/windows/sharedframework/sharedframework.wxs create mode 100644 src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Internal.pkgproj delete mode 100644 src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.targets delete mode 100644 src/installer/sharedFramework/framework/Program.cs delete mode 100644 src/installer/sharedFramework/framework/framework.csproj delete mode 100644 src/installer/sharedFramework/lockedhost/lockedhost.csproj delete mode 100644 src/installer/sharedFramework/sharedFramework.proj create mode 100644 src/installer/test/Assets/TestProjects/Directory.Build.props create mode 100644 src/installer/test/Assets/TestProjects/MNADeprecationWorkaround.props create mode 100644 src/installer/test/Assets/TestProjects/StandaloneApp20/Directory.Build.props create mode 100644 src/installer/test/Assets/TestProjects/StandaloneApp21/Directory.Build.props diff --git a/eng/jobs/windows-build.yml b/eng/jobs/windows-build.yml index d9d0fdf..578a836 100644 --- a/eng/jobs/windows-build.yml +++ b/eng/jobs/windows-build.yml @@ -99,12 +99,6 @@ jobs: condition: succeeded() # Build Shared Frameworks - - script: build.cmd -sharedfx-netcoreapp - -- '$(CommonMSBuildArgs) - /bl:$(Build.SourcesDirectory)\sharedframework-netcoreapp.binlog' - displayName: Build sharedframework layout (legacy infrastructure) - condition: succeeded() - - script: build.cmd -sharedfx -- '$(CommonMSBuildArgs) /bl:$(Build.SourcesDirectory)\sharedframework.binlog' diff --git a/src/installer/TestProjects.props b/src/installer/TestProjects.props index 72f1451..f31d060 100644 --- a/src/installer/TestProjects.props +++ b/src/installer/TestProjects.props @@ -1,3 +1,4 @@ + \ No newline at end of file diff --git a/src/installer/config.json b/src/installer/config.json index 6c513ca..7707a94 100644 --- a/src/installer/config.json +++ b/src/installer/config.json @@ -214,12 +214,6 @@ "Project": "publish\\publish.proj" } }, - "sharedfx-netcoreapp": { - "description": "Build legacy netcoreapp Shared Framework project.", - "settings": { - "Project": "src\\sharedframework\\sharedframework.proj" - } - }, "sharedfx": { "description": "Build Shared Framework projects.", "settings": { diff --git a/src/installer/dir.proj b/src/installer/dir.proj index 8d32915..f845012 100644 --- a/src/installer/dir.proj +++ b/src/installer/dir.proj @@ -10,7 +10,6 @@ - diff --git a/src/installer/pkg/packaging-tools/framework.packaging.targets b/src/installer/pkg/packaging-tools/framework.packaging.targets index 339934b..08d0327 100644 --- a/src/installer/pkg/packaging-tools/framework.packaging.targets +++ b/src/installer/pkg/packaging-tools/framework.packaging.targets @@ -10,6 +10,7 @@ diff --git a/src/installer/pkg/packaging-tools/packaging-tools.targets b/src/installer/pkg/packaging-tools/packaging-tools.targets index 2cf5417..9583687 100644 --- a/src/installer/pkg/packaging-tools/packaging-tools.targets +++ b/src/installer/pkg/packaging-tools/packaging-tools.targets @@ -57,9 +57,29 @@ $(InstallerName)-$(InstallerBuildPart) - $(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(InstallerExtension) + $(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(InstallerExtension) $(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(CompressedFileExtension) + + + + $(SharedFrameworkLayoutDir)shared/ + + + + + false + false + false + + + + diff --git a/src/installer/pkg/packaging-tools/sharedFramework/sharedFramework.csproj b/src/installer/pkg/packaging-tools/sharedFramework/sharedFramework.csproj index 497c79e3..b686e4d 100644 --- a/src/installer/pkg/packaging-tools/sharedFramework/sharedFramework.csproj +++ b/src/installer/pkg/packaging-tools/sharedFramework/sharedFramework.csproj @@ -48,12 +48,21 @@ Projects="$(SharedFrameworkPkgprojFile)" Targets="GetPackageIdentity" RemoveProperties="Configuration"> - + - $(SharedFrameworkLayoutDir)%(PackageReference.Identity)/%(PackageReference.Version)/ + %(SfxIdentity.Identity) + %(SfxIdentity.Version) + $(SharedFrameworkLayoutDir)shared/$(SfxIdentity)/$(SfxVersion)/ + + + + + + + + + + + + + + + @@ -120,11 +148,50 @@ + + + + + + + Microsoft.NETCore.App.Internal + $(PackageSymbolsBinDir)$(CrossgennedPackageId)/ + + + + + + + + + + + + + + + + @@ -137,8 +204,22 @@ linux + + + + + + + + + + diff --git a/src/installer/pkg/packaging-tools/windows/sharedFramework/breadcrumbstorefolder.wxs b/src/installer/pkg/packaging-tools/windows/sharedFramework/breadcrumbstorefolder.wxs new file mode 100644 index 0000000..0063030 --- /dev/null +++ b/src/installer/pkg/packaging-tools/windows/sharedFramework/breadcrumbstorefolder.wxs @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/installer/pkg/packaging-tools/windows/sharedFramework/product.wxs b/src/installer/pkg/packaging-tools/windows/sharedFramework/product.wxs index 907ffd4..93396d5 100644 --- a/src/installer/pkg/packaging-tools/windows/sharedFramework/product.wxs +++ b/src/installer/pkg/packaging-tools/windows/sharedFramework/product.wxs @@ -16,6 +16,14 @@ + + + + + + + + diff --git a/src/installer/pkg/packaging-tools/windows/sharedFramework/werrelatedkeys.wxs b/src/installer/pkg/packaging-tools/windows/sharedFramework/werrelatedkeys.wxs new file mode 100644 index 0000000..997df3d --- /dev/null +++ b/src/installer/pkg/packaging-tools/windows/sharedFramework/werrelatedkeys.wxs @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/installer/pkg/packaging-tools/windows/wix.targets b/src/installer/pkg/packaging-tools/windows/wix.targets index fd96a7b..3640e13 100644 --- a/src/installer/pkg/packaging-tools/windows/wix.targets +++ b/src/installer/pkg/packaging-tools/windows/wix.targets @@ -34,7 +34,7 @@ + + + + + + + + + + @@ -79,6 +89,10 @@ GetWixBuildConfiguration; GetUpgradeCode; GenerateMsiVersionString"> + + + + <_wixArgs> <_wixArgs>$(_wixArgs) -nologo @@ -93,7 +107,7 @@ <_wixArgs>$(_wixArgs) -dTargetArchitecture="$(TargetArchitecture)" <_wixArgs>$(_wixArgs) -dUpgradeCode="$(UpgradeCode)" <_wixArgs>$(_wixArgs) -dDependencyKeyName="$(InstallerName.Replace('-', '_'))" - <_wixArgs>$(_wixArgs) @(DirectoryToHarvest -> '-d%(SubstituteVar)="%(Identity)', ' ')" + <_wixArgs>$(_wixArgs) @(CandleVariables -> '-d%(Identity)="%(Value)"', ' ') <_wixArgs>$(_wixArgs) @(WixSrcFile -> '"%(Identity)"', ' ') <_wixArgs>$(_wixArgs) @(DirectoryToHarvest -> '"%(WixSourceFile)"', ' ') diff --git a/src/installer/pkg/packaging/windows/package.targets b/src/installer/pkg/packaging/windows/package.targets index 7f8398d..dbd31dd 100644 --- a/src/installer/pkg/packaging/windows/package.targets +++ b/src/installer/pkg/packaging/windows/package.targets @@ -26,30 +26,17 @@ $(HostFxrInstallerFile) $(HostFxrUpgradeCode) - - - $(SharedFrameworkPublishRoot) - $(SharedFrameworkBrandName) - $(SharedFrameworkInstallerFile) - - - - - "$(MsiArch)" "$(TargetArchitecture)" $(MsiVersionString) $(SharedFrameworkNugetVersion) $(ArchParams) - $(MsiVersionString) $(SharedFrameworkName) $(SharedFrameworkNugetVersion) $(SharedFxUpgradeCode) $(ArchParams) - - - - - - - - - - diff --git a/src/installer/pkg/packaging/windows/sharedframework/registrykeys.wxs b/src/installer/pkg/packaging/windows/sharedframework/registrykeys.wxs deleted file mode 100644 index bcf20c2..0000000 --- a/src/installer/pkg/packaging/windows/sharedframework/registrykeys.wxs +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/installer/pkg/packaging/windows/sharedframework/sharedframework.wxs b/src/installer/pkg/packaging/windows/sharedframework/sharedframework.wxs deleted file mode 100644 index 2e7c14e..0000000 --- a/src/installer/pkg/packaging/windows/sharedframework/sharedframework.wxs +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/installer/pkg/projects/descriptions.json b/src/installer/pkg/projects/descriptions.json index 2461aed..a1655af 100644 --- a/src/installer/pkg/projects/descriptions.json +++ b/src/installer/pkg/projects/descriptions.json @@ -40,6 +40,11 @@ "CommonTypes": [ ] }, { + "Name": "Microsoft.NETCore.App.Internal", + "Description": "Transport package for .NET Core App runtime assets.", + "CommonTypes": [ ] + }, + { "Name": "Microsoft.NETCore.App.Ref", "Description": "A set of .NET APIs that are included in the default .NET Core application model. Contains reference assemblies, documentation, and other design-time assets.", "CommonTypes": [ ] diff --git a/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Internal.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Internal.pkgproj new file mode 100644 index 0000000..9880edc --- /dev/null +++ b/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Internal.pkgproj @@ -0,0 +1,25 @@ + + + + + + true + build/$(NETCoreAppFramework) + $(BuildTargetPath) + $(BuildTargetPath) + + + + + + + + + + $(HostPolicyVersion) + $(NETCoreAppFramework) + + + + + diff --git a/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.pkgproj index 087ffdb..c176570 100644 --- a/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.pkgproj +++ b/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.pkgproj @@ -1,34 +1,53 @@ + + true + + - true - build/$(NETCoreAppFramework) - $(BuildTargetPath) - $(BuildTargetPath) + + false + false - true + + true - - false - + false - - - - + true + true + + + $(SharedFrameworkInstallerFile) - - - $(HostPolicyVersion) - $(NETCoreAppFramework) - + + $(SharedFrameworkPublishDir) - - $(BuildTargetPath) - + + true + true + + + + + + + + + + + + diff --git a/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.targets b/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.targets deleted file mode 100644 index 48d6da6..0000000 --- a/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.targets +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - <_netCoreAppPackageDependencies - Include="@(PackageDependencies->WithMetadataValue('ParentPackage', '$(MSBuildThisFileName)/$(_Microsoft_NETCore_App_Version)'))" /> - <_activeRIDNetCoreAppPackageDependencies - Include="@(_netCoreAppPackageDependencies->WithMetadataValue('ParentTarget', '$(NuGetTargetMoniker)/$(RuntimeIdentifier)'))" /> - <_activeTFMNetCoreAppPackageDependencies - Include="@(_netCoreAppPackageDependencies->WithMetadataValue('ParentTarget', '$(NuGetTargetMoniker)'))" /> - <_ridSpecificNetCoreAppPackageDependencies - Include="@(_activeRIDNetCoreAppPackageDependencies)" - Exclude="@(_activeTFMNetCoreAppPackageDependencies)" /> - - - - - \ No newline at end of file diff --git a/src/installer/pkg/projects/netcoreapp/pkg/dir.props b/src/installer/pkg/projects/netcoreapp/pkg/dir.props index 3d64106..cd54021 100644 --- a/src/installer/pkg/projects/netcoreapp/pkg/dir.props +++ b/src/installer/pkg/projects/netcoreapp/pkg/dir.props @@ -15,7 +15,7 @@ - + NuGetRuntimeIdentifier=$(PackageTargetRuntime) diff --git a/src/installer/sharedFramework/framework/Program.cs b/src/installer/sharedFramework/framework/Program.cs deleted file mode 100644 index 4aa370b..0000000 --- a/src/installer/sharedFramework/framework/Program.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace ConsoleApplication -{ - public class Program - { - public static void Main(string[] args) - { - } - } -} \ No newline at end of file diff --git a/src/installer/sharedFramework/framework/framework.csproj b/src/installer/sharedFramework/framework/framework.csproj deleted file mode 100644 index 52e6553..0000000 --- a/src/installer/sharedFramework/framework/framework.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - Exe - - - diff --git a/src/installer/sharedFramework/lockedhost/lockedhost.csproj b/src/installer/sharedFramework/lockedhost/lockedhost.csproj deleted file mode 100644 index 3878513..0000000 --- a/src/installer/sharedFramework/lockedhost/lockedhost.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - false - true - false - false - 2008;8021 - - - - - - - - diff --git a/src/installer/sharedFramework/sharedFramework.proj b/src/installer/sharedFramework/sharedFramework.proj deleted file mode 100644 index 6782480..0000000 --- a/src/installer/sharedFramework/sharedFramework.proj +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - PublishSharedFrameworkAndSharedHost; - GenerateRuntimeGraph; - CopyHostArtifactsToSharedFramework; - GenerateVersionFile; - - - - - $(MSBuildPassThroughPropertyList) /p:TargetFramework=$(NETCoreAppFramework) /p:RuntimeIdentifier=$(PackageTargetRid) - - - $(IntermediateOutputRootPath)SFP.packages\ - $(SharedFrameworkPublishDir)shared\$(SharedFrameworkName)\$(SharedFrameworkNugetVersion) - - - - - - - - $(MSBuildThisFileDirectory)framework - $(CommonProjectArgs) /p:RuntimeFrameworkVersion=$(SharedFrameworkNugetVersion) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(IntermediateOutputRootPath)/framework/project.assets.json - $(SharedFrameworkNameAndVersionRoot)\$(SharedFrameworkName).deps.json - win - osx - freebsd - linux - - - - - - - - - - - - - - - $(MSBuildThisFileDirectory)lockedhost - $(CommonProjectArgs) /p:HostResolverVersion=$(HostResolverVersion) /p:HostVersion=$(HostVersion) - - - - - - - - - - - diff --git a/src/installer/test/Assets/TestProjects/Directory.Build.props b/src/installer/test/Assets/TestProjects/Directory.Build.props new file mode 100644 index 0000000..da5bb19 --- /dev/null +++ b/src/installer/test/Assets/TestProjects/Directory.Build.props @@ -0,0 +1,4 @@ + + + + diff --git a/src/installer/test/Assets/TestProjects/MNADeprecationWorkaround.props b/src/installer/test/Assets/TestProjects/MNADeprecationWorkaround.props new file mode 100644 index 0000000..4ed66ef --- /dev/null +++ b/src/installer/test/Assets/TestProjects/MNADeprecationWorkaround.props @@ -0,0 +1,18 @@ + + + + + true + + + + + + + diff --git a/src/installer/test/Assets/TestProjects/PortableApp/PortableApp.csproj b/src/installer/test/Assets/TestProjects/PortableApp/PortableApp.csproj index 83efdd4..b4ea72e 100644 --- a/src/installer/test/Assets/TestProjects/PortableApp/PortableApp.csproj +++ b/src/installer/test/Assets/TestProjects/PortableApp/PortableApp.csproj @@ -1,4 +1,6 @@ - + + + $(NETCoreAppFramework) @@ -10,4 +12,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/installer/test/Assets/TestProjects/StandaloneApp20/Directory.Build.props b/src/installer/test/Assets/TestProjects/StandaloneApp20/Directory.Build.props new file mode 100644 index 0000000..15b3000 --- /dev/null +++ b/src/installer/test/Assets/TestProjects/StandaloneApp20/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + false + + + + + diff --git a/src/installer/test/Assets/TestProjects/StandaloneApp21/Directory.Build.props b/src/installer/test/Assets/TestProjects/StandaloneApp21/Directory.Build.props new file mode 100644 index 0000000..15b3000 --- /dev/null +++ b/src/installer/test/Assets/TestProjects/StandaloneApp21/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + false + + + + + -- 2.7.4