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'
<Project>
<Import Project="BranchInfo.props" />
+ <Import Project="src\test\Assets\TestProjects\MNADeprecationWorkaround.props" />
</Project>
\ No newline at end of file
"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": {
<ItemGroup>
<Project Include="$(MSBuildThisFileDirectory)src.builds" />
<Project Include="$(MSBuildThisFileDirectory)pkg/dir.proj" />
- <Project Include="$(MSBuildThisFileDirectory)sharedFramework/sharedFramework.proj" />
<Project Include="$(MSBuildThisFileDirectory)pkg/projects/sharedfx.builds" />
</ItemGroup>
<Target Name="GenerateInstallers"
DependsOnTargets="
+ GetInstallerProperties;
GenerateDeb;
GenerateRpm;
GenerateMsi;
<Target Name="GenerateZip"
Condition="'$(OSGroup)' == 'Windows_NT'">
<ZipFileCreateFromDirectory
- SourceDirectory="$(SharedFrameworkLayoutDir)"
+ SourceDirectory="$(SharedFrameworkArchiveSourceDir)"
DestinationArchive="$(CompressedArchiveFile)"
OverwriteDestination="true" />
</Target>
<!-- Location to place the installer, in bin. -->
<InstallerFileNameWithoutExtension>$(InstallerName)-$(InstallerBuildPart)</InstallerFileNameWithoutExtension>
- <InstallerFile>$(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(InstallerExtension)</InstallerFile>
+ <InstallerFile Condition="'$(InstallerFile)' == ''">$(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(InstallerExtension)</InstallerFile>
<CompressedArchiveFile>$(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(CompressedFileExtension)</CompressedArchiveFile>
</PropertyGroup>
+
+ <!-- By default, a shared framework only has files in shared/, so archive that. -->
+ <PropertyGroup>
+ <SharedFrameworkArchiveSourceDir Condition="'$(SharedFrameworkArchiveSourceDir)' == ''">$(SharedFrameworkLayoutDir)shared/</SharedFrameworkArchiveSourceDir>
+ </PropertyGroup>
+
+ <!-- Use existing infra for non-Windows shared frameworks for now. -->
+ <PropertyGroup Condition="'$(GenerateSharedFramework)' == 'true'">
+ <GeneratePkg>false</GeneratePkg>
+ <BuildDebPackage>false</BuildDebPackage>
+ <BuildRpmPackage>false</BuildRpmPackage>
+ </PropertyGroup>
</Target>
+ <!--
+ By default, shared frameworks are generated based on the package. This can be overridden by the
+ project, and in the future, the runtime pack is likely to be used to assemble the sfx.
+ -->
+ <Target Name="GetSharedFrameworkPackageReferences"
+ DependsOnTargets="GetPackageIdentity"
+ Returns="@(_PackageIdentity)" />
+
</Project>
Projects="$(SharedFrameworkPkgprojFile)"
Targets="GetPackageIdentity"
RemoveProperties="Configuration">
- <Output TaskParameter="TargetOutputs" ItemName="PackageReference" />
+ <Output TaskParameter="TargetOutputs" ItemName="SfxIdentity" />
</MSBuild>
<PropertyGroup>
- <PublishDir>$(SharedFrameworkLayoutDir)%(PackageReference.Identity)/%(PackageReference.Version)/</PublishDir>
+ <SfxIdentity>%(SfxIdentity.Identity)</SfxIdentity>
+ <SfxVersion>%(SfxIdentity.Version)</SfxVersion>
+ <PublishDir>$(SharedFrameworkLayoutDir)shared/$(SfxIdentity)/$(SfxVersion)/</PublishDir>
</PropertyGroup>
+
+ <MSBuild
+ Projects="$(SharedFrameworkPkgprojFile)"
+ Targets="GetSharedFrameworkPackageReferences"
+ RemoveProperties="Configuration">
+ <Output TaskParameter="TargetOutputs" ItemName="PackageReference" />
+ </MSBuild>
</Target>
<!--
Overwrite="true" />
</Target>
+ <!--
+ NETCoreApp (and only NETCoreApp) carries the host and host resolver in the shared framework,
+ which lives outside the shared/ directory. These were included in publish through package
+ references and the files must be moved.
+ -->
+ <Target Name="MoveSharedFrameworkHost"
+ Condition="'$(SfxIdentity)' == 'Microsoft.NETCore.App'"
+ AfterTargets="Publish">
+ <!-- Use the muxer we intended to consume (either restored a shipped version or the one we built) -->
+ <Move SourceFiles="$(PublishDir)dotnet$(ExeSuffix)" DestinationFolder="$(SharedFrameworkLayoutDir)" />
+
+ <!-- Use the FXR Resolver we intended to consume (either restored a shipped version or the one we built) -->
+ <Move SourceFiles="$(PublishDir)$(LibPrefix)hostfxr$(LibSuffix)" DestinationFolder="$(SharedFrameworkLayoutDir)\host\fxr\$(HostResolverVersion)" />
+
+ <!-- Ensure the host is executable. See https://github.com/NuGet/Home/issues/4424 -->
+ <Exec Command="chmod u+x $(SharedFrameworkLayoutDir)dotnet$(ExeSuffix)"
+ Condition="'$(OSGroup)' != 'Windows_NT'" />
+ </Target>
+
<!-- Clean up artifacts that dotnet-publish generates which we don't need -->
<Target Name="DeleteUnnecessaryPublishOutputs" AfterTargets="Publish">
<ItemGroup>
<ToDelete Include="$(PublishDir)$(LibPrefix)comhost$(LibSuffix)" />
<ToDelete Include="$(PublishDir)$(LibPrefix)hostfxr$(LibSuffix)" />
<ToDelete Include="$(PublishDir)$(LibPrefix)ijwhost$(LibSuffix)" />
+ <!--
+ On Windows, LibSuffix is .dll (for dynamic libraries), but for this particular file, we also
+ build a .lib (static library). Make sure neither is included.
+
+ We only build this library on Windows, so other static library formats don't need to be
+ handled yet.
+ -->
+ <ToDelete Include="$(PublishDir)$(LibPrefix)ijwhost.lib" />
</ItemGroup>
<Delete Files="@(ToDelete)" />
</Target>
+ <!-- Preserve symbol files for compressed symbol archive. -->
+ <Target Name="CopySymbolsToPublishFolder"
+ Condition="'$(SfxIdentity)' == 'Microsoft.NETCore.App'"
+ AfterTargets="Publish">
+ <PropertyGroup>
+ <!--
+ Microsoft.NETCore.App is the name of the shared framework, but the internal package is
+ the one doing the crossgen.
+ -->
+ <CrossgennedPackageId>Microsoft.NETCore.App.Internal</CrossgennedPackageId>
+ <CrossgennedPackageSymbolDir>$(PackageSymbolsBinDir)$(CrossgennedPackageId)/</CrossgennedPackageSymbolDir>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <SharedFrameworkSymbols Include="$(CrossgennedPackageSymbolDir)**/*.pdb" />
+ <SharedFrameworkSymbols Include="$(CrossgennedPackageSymbolDir)**/*$(SymbolFileExtension)" />
+
+ <SharedFrameworkSymbols
+ Include="$(CrossgennedPackageSymbolDir)**/*$(CrossGenSymbolExtension)"
+ Condition="'$(CrossGenSymbolExtension)' != ''" />
+ </ItemGroup>
+
+ <RemoveDir
+ Directories="$(SharedFrameworkPublishSymbolsDir)"
+ Condition="Exists('$(SharedFrameworkPublishSymbolsDir)')" />
+
+ <MakeDir Directories="$(SharedFrameworkPublishSymbolsDir)" />
+
+ <Copy SourceFiles="@(SharedFrameworkSymbols)" DestinationFolder="$(SharedFrameworkPublishSymbolsDir)" />
+ </Target>
+
<Target Name="GenerateRuntimeGraph"
Condition="'$(GenerateRuntimeGraph)' == 'true'"
AfterTargets="Publish">
<RuntimeGraphGeneratorRuntime Condition="'$(RuntimeGraphGeneratorRuntime)'==''">linux</RuntimeGraphGeneratorRuntime>
</PropertyGroup>
+ <!--
+ Packages to trim from Microsoft.NETCore.App.deps.json for parity with earlier sfx releases.
+ To be removed once the sfx is constructed from Runtime Packs, which don't have deps.
+ -->
+ <ItemGroup>
+ <TrimPkgsFromDeps Include="runtime.$(PackageTargetRid).microsoft.netcore.dotnethost" />
+ <TrimPkgsFromDeps Include="runtime.$(PackageTargetRid).microsoft.netcore.dotnetapphost" />
+ <TrimPkgsFromDeps Include="runtime.$(PackageTargetRid).microsoft.netcore.dotnethostresolver" />
+ <TrimPkgsFromDeps Include="microsoft.netcore.dotnethost" />
+ <TrimPkgsFromDeps Include="microsoft.netcore.dotnetapphost" />
+ <TrimPkgsFromDeps Include="microsoft.netcore.dotnethostresolver" />
+ </ItemGroup>
+
<ProcessSharedFrameworkDeps AssetsFilePath="$(SharedFrameworkAssetsFile)"
DepsFilePath="$(SharedFrameworkDepsFile)"
+ PackagesToRemove="@(TrimPkgsFromDeps)"
Runtime="$(RuntimeGraphGeneratorRuntime)"
BuildToolsTaskDir="$(BuildToolsTaskDir)" />
</Target>
--- /dev/null
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <?include "..\Variables.wxi" ?>
+ <Fragment>
+ <!-- Set registry keys to allow WER to generate correct dumps. -->
+ <Component Id="BreadcrumbStoreFolder" Directory="BreadcrumbStore" Guid="{DA957490-EA59-42B9-B9D6-3E80F6FB0ED0}">
+ <CreateFolder Directory="BreadcrumbStore">
+ <Permission
+ User="Everyone"
+ CreateChild="no"
+ CreateFile="yes"
+ Delete="no"
+ DeleteChild="no"
+ Read="yes"
+ ReadAttributes="yes"
+ ReadExtendedAttributes="yes"
+ ReadPermission="yes"
+ Traverse="yes" />
+ <Permission
+ User="SYSTEM"
+ GenericAll="yes" />
+ <Permission
+ User="Administrators"
+ GenericAll="yes" />
+ </CreateFolder>
+ </Component>
+
+ <DirectoryRef Id="TARGETDIR">
+ <Directory Id="CommonAppDataFolder">
+ <Directory Id="MicrosoftCommonAppData" Name="Microsoft">
+ <Directory Id="NetFrameworkCommonAppData" Name="NetFramework">
+ <Directory Id="BreadcrumbStore" Name="BreadcrumbStore" />
+ </Directory>
+ </Directory>
+ </Directory>
+ </DirectoryRef>
+ </Fragment>
+</Wix>
<Feature Id="MainFeature" Title="Main Feature" Level="1">
<ComponentGroupRef Id="InstallFiles" />
<ComponentGroupRef Id="AuthoredRegistryKeys"/>
+
+ <?ifdef WerRelatedKeys ?>
+ <ComponentGroupRef Id="WerRelatedKeys"/>
+ <?endif?>
+
+ <?ifdef BreadcrumbStoreFolder ?>
+ <ComponentRef Id="BreadcrumbStoreFolder"/>
+ <?endif?>
</Feature>
</Product>
--- /dev/null
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <?include "..\Variables.wxi" ?>
+ <Fragment>
+ <!-- Set registry keys to allow WER to genereate correct dumps-->
+ <ComponentGroup Id="WerRelatedKeys">
+ <Component Directory="TARGETDIR">
+ <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules">
+ <RegistryValue
+ Action="write"
+ Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.NugetVersion)\mscordaccore.dll"
+ Type="integer"
+ Value="0"
+ KeyPath="yes"/>
+ </RegistryKey>
+ </Component>
+
+ <Component Directory="TARGETDIR">
+ <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\KnownManagedDebuggingDlls">
+ <RegistryValue
+ Action="write"
+ Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.NugetVersion)\mscordaccore.dll"
+ Type="integer"
+ Value="0"
+ KeyPath="yes"/>
+ </RegistryKey>
+ </Component>
+
+ <Component Directory="TARGETDIR">
+ <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\KnownFunctionTableDlls">
+ <RegistryValue
+ Action="write"
+ Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.NugetVersion)\mscordaccore.dll"
+ Type="integer"
+ Value="0"
+ KeyPath="yes"/>
+ </RegistryKey>
+ </Component>
+
+ <Component Directory="TARGETDIR">
+ <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\MiniDumpAuxiliaryDlls">
+ <RegistryValue
+ Action="write"
+ Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.NugetVersion)\coreclr.dll"
+ Type="string"
+ Value="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.NugetVersion)\mscordaccore.dll"
+ KeyPath="yes"/>
+ </RegistryKey>
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
<ItemGroup Condition="'$(GenerateSharedFramework)' == 'true'">
<DirectoryToHarvest
- Include="$(SharedFrameworkLayoutDir)"
+ Include="$(SharedFrameworkLayoutDir)shared/"
Name="install-shared-framework"
SubstituteVar="SharedFrameworkSrc"
ComponentGroupName="InstallFiles"
<WixSrcFile Include="$(MSBuildThisFileDirectory)sharedFramework/registrykeys.wxs" />
</ItemGroup>
+ <ItemGroup Condition="'$(IncludeWerRelatedKeys)' == 'true'">
+ <WixSrcFile Include="$(MSBuildThisFileDirectory)sharedFramework/werrelatedkeys.wxs" />
+ <CandleVariables Include="WerRelatedKeys" Value="true" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(IncludeBreadcrumbStoreFolder)' == 'true'">
+ <WixSrcFile Include="$(MSBuildThisFileDirectory)sharedFramework/breadcrumbstorefolder.wxs" />
+ <CandleVariables Include="BreadcrumbStoreFolder" Value="true" />
+ </ItemGroup>
+
<ItemGroup>
<WixSrcFile Include="$(MSBuildThisFileDirectory)provider.wxs" />
</ItemGroup>
GetWixBuildConfiguration;
GetUpgradeCode;
GenerateMsiVersionString">
+ <ItemGroup>
+ <CandleVariables Include="%(DirectoryToHarvest.SubstituteVar)" Value="%(DirectoryToHarvest.Identity)" />
+ </ItemGroup>
+
<PropertyGroup>
<_wixArgs></_wixArgs>
<_wixArgs>$(_wixArgs) -nologo</_wixArgs>
<_wixArgs>$(_wixArgs) -dTargetArchitecture="$(TargetArchitecture)"</_wixArgs>
<_wixArgs>$(_wixArgs) -dUpgradeCode="$(UpgradeCode)"</_wixArgs>
<_wixArgs>$(_wixArgs) -dDependencyKeyName="$(InstallerName.Replace('-', '_'))"</_wixArgs>
- <_wixArgs>$(_wixArgs) @(DirectoryToHarvest -> '-d%(SubstituteVar)="%(Identity)', ' ')" </_wixArgs>
+ <_wixArgs>$(_wixArgs) @(CandleVariables -> '-d%(Identity)="%(Value)"', ' ')</_wixArgs>
<_wixArgs>$(_wixArgs) @(WixSrcFile -> '"%(Identity)"', ' ')</_wixArgs>
<_wixArgs>$(_wixArgs) @(DirectoryToHarvest -> '"%(WixSourceFile)"', ' ')</_wixArgs>
<InstallerName>$(HostFxrInstallerFile)</InstallerName>
<UpgradeCode>$(HostFxrUpgradeCode)</UpgradeCode>
</WixOutputs>
- <!-- shared framework has extra arguments so it needs to be in a separate group -->
- <WixOutputs2 Include="$(WixObjRoot)sharedframework">
- <InputDir>$(SharedFrameworkPublishRoot)</InputDir>
- <BrandName>$(SharedFrameworkBrandName)</BrandName>
- <InstallerName>$(SharedFrameworkInstallerFile)</InstallerName>
- </WixOutputs2>
</ItemGroup>
<RemoveDir Directories="$(WixObjRoot)" />
<MakeDir Directories="$(WixObjRoot);@(WixOutputs);@(WixOutputs2)" />
- <GenerateGuidFromName Name="$(SharedFrameworkInstallerFile)">
- <Output TaskParameter="GeneratedGuid" PropertyName="SharedFxUpgradeCode" />
- </GenerateGuidFromName>
-
<PropertyGroup>
<ArchParams>"$(MsiArch)" "$(TargetArchitecture)"</ArchParams>
<CommonParams>$(MsiVersionString) $(SharedFrameworkNugetVersion) $(ArchParams)</CommonParams>
- <SharedFxParams>$(MsiVersionString) $(SharedFrameworkName) $(SharedFrameworkNugetVersion) $(SharedFxUpgradeCode) $(ArchParams)</SharedFxParams>
</PropertyGroup>
<Exec Command="powershell -NoProfile -NoLogo $(WindowsScriptRoot)%(WixOutputs.Filename)\generatemsi.ps1 %(WixOutputs.InputDir) %(WixOutputs.InstallerName) $(WixToolsDir) '%(WixOutputs.BrandName)' $(CommonParams) %(WixOutputs.Identity) %(WixOutputs.UpgradeCode)" />
- <!-- shared framework -->
- <Exec Command="powershell -NoProfile -NoLogo $(WindowsScriptRoot)%(WixOutputs2.Filename)\generatemsi.ps1 %(WixOutputs2.InputDir) %(WixOutputs2.InstallerName) $(WixToolsDir) '%(WixOutputs2.BrandName)' $(SharedFxParams) %(WixOutputs2.Identity)" />
</Target>
<Target Name="GenerateBundles"
+++ /dev/null
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-
-param(
- [Parameter(Mandatory=$true)][string]$SharedFrameworkPublishRoot,
- [Parameter(Mandatory=$true)][string]$SharedFrameworkMSIOutput,
- [Parameter(Mandatory=$true)][string]$WixRoot,
- [Parameter(Mandatory=$true)][string]$ProductMoniker,
- [Parameter(Mandatory=$true)][string]$DotnetMSIVersion,
- [Parameter(Mandatory=$true)][string]$SharedFrameworkNugetName,
- [Parameter(Mandatory=$true)][string]$SharedFrameworkNugetVersion,
- [Parameter(Mandatory=$true)][string]$SharedFrameworkUpgradeCode,
- [Parameter(Mandatory=$true)][string]$Architecture,
- [Parameter(Mandatory=$true)][string]$TargetArchitecture,
- [Parameter(Mandatory=$true)][string]$WixObjRoot
-)
-
-$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..
-
- .\heat.exe dir `"$SharedFrameworkPublishRoot`" `
- -nologo `
- -template fragment `
- -sreg -gg `
- -var var.SharedFrameworkSource `
- -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\sharedframework"
- $SharedFrameworkComponentVersion = $SharedFrameworkNugetVersion.Replace('-', '_');
-
- .\candle.exe -nologo `
- -out "$WixObjRoot\" `
- -dSharedFrameworkSource="$SharedFrameworkPublishRoot" `
- -dMicrosoftEula="$PackagingRoot\windows\eula.rtf" `
- -dProductMoniker="$ProductMoniker" `
- -dFrameworkName="$SharedFrameworkNugetName" `
- -dFrameworkDisplayVersion="$SharedFrameworkNugetVersion" `
- -dFrameworkComponentVersion="$SharedFrameworkComponentVersion" `
- -dFrameworkUpgradeCode="$SharedFrameworkUpgradeCode" `
- -dTargetArchitecture="$TargetArchitecture" `
- -dBuildVersion="$DotnetMSIVersion" `
- -arch $Architecture `
- -ext WixDependencyExtension.dll `
- "$AuthWsxRoot\sharedframework.wxs" `
- "$AuthWsxRoot\provider.wxs" `
- "$AuthWsxRoot\registrykeys.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..
- $CabCache = Join-Path $WixRoot "cabcache"
-
- .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
- -cultures:en-us `
- "$WixObjRoot\sharedframework.wixobj" `
- "$WixObjRoot\provider.wixobj" `
- "$WixObjRoot\registrykeys.wixobj" `
- "$InstallFilesWixobj" `
- -out $SharedFrameworkMSIOutput | Out-Host
-
- if($LastExitCode -ne 0)
- {
- $result = $false
- Write-Host "Light failed with exit code $LastExitCode."
- }
-
- popd
- return $result
-}
-
-if(!(Test-Path $SharedFrameworkPublishRoot))
-{
- throw "$SharedHostPublishRoot not found"
-}
-
-if(!(Test-Path $WixObjRoot))
-{
- throw "$WixObjRoot not found"
-}
-
-Write-Host "Creating dotnet shared framework MSI at $SharedFrameworkMSIOutput"
-
-if([string]::IsNullOrEmpty($WixRoot))
-{
- Exit -1
-}
-
-if(-Not (RunHeat))
-{
- Exit -1
-}
-
-if(-Not (RunCandle))
-{
- Exit -1
-}
-
-if(-Not (RunLight))
-{
- Exit -1
-}
-
-if(!(Test-Path $SharedFrameworkMSIOutput))
-{
- throw "Unable to create the dotnet shared framework msi."
- Exit -1
-}
-
-Write-Host -ForegroundColor Green "Successfully created shared framework MSI - $SharedFrameworkMSIOutput"
-
-exit $LastExitCode
+++ /dev/null
-<?xml version="1.0"?>
-<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">
- <dep:Provides Key="$(var.DependencyKey)" />
- </Component>
- </Fragment>
-</Wix>
+++ /dev/null
-<?xml version="1.0"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <?include "Variables.wxi" ?>
- <Fragment>
- <ComponentGroup Id="AuthoredRegistryKeys">
- <Component Id="SetupRegistry_x86" Directory="TARGETDIR" Win64="no">
- <RegistryKey Root="HKLM" Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.Platform)\sharedfx\$(var.FrameworkName)">
- <RegistryValue Action="write" Name="$(var.FrameworkDisplayVersion)" Type="integer" Value="1" KeyPath="yes"/>
- </RegistryKey>
- </Component>
- </ComponentGroup>
-
- <!-- Set registry keys to allow WER to genereate correct dumps-->
- <ComponentGroup Id="WerRelatedKeys">
- <Component Directory="TARGETDIR">
- <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules">
- <RegistryValue Action="write" Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.FrameworkDisplayVersion)\mscordaccore.dll" Type="integer" Value="0" KeyPath="yes"/>
- </RegistryKey>
- </Component>
-
- <Component Directory="TARGETDIR">
- <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\KnownManagedDebuggingDlls">
- <RegistryValue Action="write" Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.FrameworkDisplayVersion)\mscordaccore.dll" Type="integer" Value="0" KeyPath="yes"/>
- </RegistryKey>
- </Component>
-
- <Component Directory="TARGETDIR">
- <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\KnownFunctionTableDlls">
- <RegistryValue Action="write" Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.FrameworkDisplayVersion)\mscordaccore.dll" Type="integer" Value="0" KeyPath="yes"/>
- </RegistryKey>
- </Component>
-
- <Component Directory="TARGETDIR">
- <RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion\MiniDumpAuxiliaryDlls">
- <RegistryValue Action="write" Name="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.FrameworkDisplayVersion)\coreclr.dll" Type="string" Value="[DOTNETHOME]shared\$(var.FrameworkName)\$(var.FrameworkDisplayVersion)\mscordaccore.dll" KeyPath="yes"/>
- </RegistryKey>
- </Component>
- </ComponentGroup>
- </Fragment>
-</Wix>
-
-
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
- <?include "Variables.wxi" ?>
- <Product Id="*" Name="$(var.ProductName)" Language="$(var.ProductLanguage)" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
- <Package Compressed="yes" InstallScope="perMachine" InstallerVersion="200" />
-
- <MajorUpgrade DowngradeErrorMessage="$(var.DowngradeErrorMessage)" Schedule="afterInstallInitialize"/>
-
- <MediaTemplate CompressionLevel="high" EmbedCab="yes"/>
-
- <Feature Id="MainFeature" Title="Main Feature" Level="1">
- <ComponentGroupRef Id="InstallFiles" />
- <ComponentGroupRef Id="AuthoredRegistryKeys"/>
- <ComponentGroupRef Id="WerRelatedKeys"/>
- <Component Id="BreadcrumbStoreFolder" Directory="BreadcrumbStore" Guid="{DA957490-EA59-42B9-B9D6-3E80F6FB0ED0}">
- <CreateFolder Directory="BreadcrumbStore">
- <Permission
- User="Everyone"
- CreateChild="no"
- CreateFile="yes"
- Delete="no"
- DeleteChild="no"
- Read="yes"
- ReadAttributes="yes"
- ReadExtendedAttributes="yes"
- ReadPermission="yes"
- Traverse="yes" />
- <Permission
- User="SYSTEM"
- GenericAll="yes" />
- <Permission
- User="Administrators"
- GenericAll="yes" />
- </CreateFolder>
- </Component>
- </Feature>
- <Feature Id="Provider" Absent="disallow" AllowAdvertise="no" Description="Used for Ref Counting" Display="hidden" Level="1" InstallDefault="local" Title="RefCounting" TypicalDefault="install">
- <ComponentRef Id="$(var.DependencyKeyId)" />
- </Feature>
-
- <Property Id="MSIFASTINSTALL" Value="7" />
-
- <WixVariable Id="WixUILicenseRtf" Value="$(var.MicrosoftEula)" />
-
- <Property Id="WIXUI_INSTALLDIR" Value="DOTNETHOME"/>
- <UIRef Id="WixUI_InstallDir" />
-
- <CustomActionRef Id="WixBroadcastEnvironmentChange" />
- </Product>
- <Fragment>
- <Directory Id="TARGETDIR" Name="SourceDir">
- <Directory Id="$(var.Program_Files)">
- <Directory Id="DOTNETHOME" Name="dotnet" />
- </Directory>
- <Directory Id="CommonAppDataFolder">
- <Directory Id="MicrosoftCommonAppData" Name="Microsoft">
- <Directory Id="NetFrameworkCommonAppData" Name="NetFramework">
- <Directory Id="BreadcrumbStore" Name="BreadcrumbStore" />
- </Directory>
- </Directory>
- </Directory>
- </Directory>
- </Fragment>
-</Wix>
"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": [ ]
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
+ <PropertyGroup>
+ <PreventImplementationReference Condition="'$(PackageTargetRuntime)' != ''">true</PreventImplementationReference>
+ <BuildTargetPath>build/$(NETCoreAppFramework)</BuildTargetPath>
+ <PlatformManifestTargetPath>$(BuildTargetPath)</PlatformManifestTargetPath>
+ <FileVersionPropsTargetPath>$(BuildTargetPath)</FileVersionPropsTargetPath>
+ </PropertyGroup>
+
+ <!-- Identity / Reference package content -->
+ <ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
+ <!-- reference RID specific packages to generate lineup -->
+ <ProjectReference Include="@(RuntimeProject)" />
+
+ <!-- references the host packages -->
+ <Dependency Include="Microsoft.NETCore.DotNetHostPolicy">
+ <Version>$(HostPolicyVersion)</Version>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
+ </Dependency>
+ </ItemGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ExcludeDepprojReference>true</ExcludeDepprojReference>
+ </PropertyGroup>
+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
- <PreventImplementationReference Condition="'$(PackageTargetRuntime)' != ''">true</PreventImplementationReference>
- <BuildTargetPath>build/$(NETCoreAppFramework)</BuildTargetPath>
- <PlatformManifestTargetPath>$(BuildTargetPath)</PlatformManifestTargetPath>
- <FileVersionPropsTargetPath>$(BuildTargetPath)</FileVersionPropsTargetPath>
+ <!-- Exclude runtime.json from the package. -->
+ <IncludeRuntimeJson>false</IncludeRuntimeJson>
+ <IsLineupPackage>false</IsLineupPackage>
- <GenerateRuntimeGraph>true</GenerateRuntimeGraph>
+ <!-- Prevent old baseline dependencies. -->
+ <ExcludeLineupReference>true</ExcludeLineupReference>
- <!-- NETCoreApp sfx is still built by old tooling. Switchover is pending validation. -->
- <GenerateSharedFramework>false</GenerateSharedFramework>
- </PropertyGroup>
+ <BuildRuntimePackages>false</BuildRuntimePackages>
- <!-- Identity / Reference package content -->
- <ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
- <!-- reference RID specific packages to generate lineup -->
- <ProjectReference Include="@(RuntimeProject)" />
+ <GenerateSharedFramework>true</GenerateSharedFramework>
+ <GenerateRuntimeGraph>true</GenerateRuntimeGraph>
+
+ <!--
+ Make sure the installer file is generated with the name from /dir.props. This allows the
+ existing infra to bundle it without any changes.
+ -->
+ <InstallerFile>$(SharedFrameworkInstallerFile)</InstallerFile>
- <!-- references the host packages -->
- <Dependency Include="Microsoft.NETCore.DotNetHostPolicy">
- <Version>$(HostPolicyVersion)</Version>
- <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
- </Dependency>
+ <!-- Lay out the sfx in the legacy location for old packaging to keep working for now. -->
+ <SharedFrameworkLayoutDir>$(SharedFrameworkPublishDir)</SharedFrameworkLayoutDir>
- <File Include="$(MSBuildProjectName).targets">
- <TargetPath>$(BuildTargetPath)</TargetPath>
- </File>
+ <!-- These components are installed by the root shared framework, but not others. -->
+ <IncludeWerRelatedKeys>true</IncludeWerRelatedKeys>
+ <IncludeBreadcrumbStoreFolder>true</IncludeBreadcrumbStoreFolder>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Dependency Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsPackageVersion)" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+
+ <!--
+ Use the internal package to generate the shared framework. Allows the shared framework to
+ continue to have the correct name without other workarounds.
+ -->
+ <Target Name="GetSharedFrameworkPackageReferences"
+ Returns="@(SharedFrameworkPackageReference)">
+ <ItemGroup>
+ <SharedFrameworkPackageReference Include="Microsoft.NETCore.App.Internal" Version="$(Version)" />
+ <SharedFrameworkPackageReference Include="Microsoft.NETCore.DotNetHost" Version="$(HostVersion)" />
+ </ItemGroup>
+ </Target>
</Project>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
- <Target Name="EnsureNETCoreAppRuntime"
- Condition="'$(RuntimeIdentifier)' != '' AND '$(EnsureNETCoreAppRuntime)' != 'false'"
- AfterTargets="RunResolvePackageDependencies">
- <ItemGroup>
- <_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)" />
- </ItemGroup>
-
- <Error Condition="'@(_ridSpecificNetCoreAppPackageDependencies)' == ''"
- Text="Project is targeting runtime '$(RuntimeIdentifier)' but did not resolve any runtime-specific packages for the '$(MSBuildThisFileName)' package. This runtime may not be supported by .NET Core." />
- </Target>
-</Project>
\ No newline at end of file
</PropertyGroup>
<!-- Redistribute package content from other nuget packages. -->
- <ItemGroup Condition="'$(FrameworkPackType)' != 'apphost'">
+ <ItemGroup Condition="'$(FrameworkPackType)' != 'apphost' AND '$(ExcludeDepprojReference)' != 'true'">
<ProjectReference Include="..\src\netcoreapp.depproj">
<AdditionalProperties Condition="'$(PackageTargetRuntime)' != ''">NuGetRuntimeIdentifier=$(PackageTargetRuntime)</AdditionalProperties>
</ProjectReference>
+++ /dev/null
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- </PropertyGroup>
-
-</Project>
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
- <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
- <CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
- <CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
- <NoWarn>2008;8021</NoWarn>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Microsoft.NETCore.DotNetHostResolver" Version="$(HostResolverVersion)" />
- <PackageReference Include="Microsoft.NETCore.DotNetHost" Version="$(HostVersion)" />
- </ItemGroup>
-
-</Project>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-
- <UsingTask TaskName="ChangeEntryPointLibraryName" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
- <UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
- <UsingTask TaskName="ProcessSharedFrameworkDeps" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
-
- <PropertyGroup>
- <BuildTargets>
- PublishSharedFrameworkAndSharedHost;
- GenerateRuntimeGraph;
- CopyHostArtifactsToSharedFramework;
- GenerateVersionFile;
- </BuildTargets>
- </PropertyGroup>
-
- <PropertyGroup>
- <CommonProjectArgs>$(MSBuildPassThroughPropertyList) /p:TargetFramework=$(NETCoreAppFramework) /p:RuntimeIdentifier=$(PackageTargetRid)</CommonProjectArgs>
-
- <!-- SFP is short for SharedFrameworkPublish. Using an abreviation to prevent long path issues. -->
- <SharedFrameworkIntermediatePackagesDir>$(IntermediateOutputRootPath)SFP.packages\</SharedFrameworkIntermediatePackagesDir>
- <SharedFrameworkNameAndVersionRoot>$(SharedFrameworkPublishDir)shared\$(SharedFrameworkName)\$(SharedFrameworkNugetVersion)</SharedFrameworkNameAndVersionRoot>
- </PropertyGroup>
-
- <Target Name="Build" DependsOnTargets="$(BuildTargets)" />
-
- <Target Name="PublishSharedFrameworkAndSharedHost"
- DependsOnTargets="RestoreLockedCoreHost">
-
- <PropertyGroup>
- <SharedFrameworkSourceRoot>$(MSBuildThisFileDirectory)framework</SharedFrameworkSourceRoot>
- <CommonSharedFrameworkArgs>$(CommonProjectArgs) /p:RuntimeFrameworkVersion=$(SharedFrameworkNugetVersion)</CommonSharedFrameworkArgs>
- </PropertyGroup>
-
- <RemoveDir Directories="$(SharedFrameworkNameAndVersionRoot)" />
-
- <!-- Specify a separate 'packages' directory in case we are building an already built version of Microsoft.NETCore.App and the $(PackagesDir)
- already contains the same version as we are building. (ex. building source-build for `2.0.0` when `2.0.0` has already shipped.
- -->
- <Exec Command="$(DotnetRestoreCommandNoPackages) --source $(PackageOutputPath) --packages $(SharedFrameworkIntermediatePackagesDir) $(CommonSharedFrameworkArgs)"
- WorkingDirectory="$(SharedFrameworkSourceRoot)" />
-
- <!-- We publish to a sub folder of the PublishRoot so tools like heat and zip can generate folder structures easier. -->
- <Exec Command="$(DotnetToolCommand) publish --no-restore --output $(SharedFrameworkNameAndVersionRoot) $(CommonSharedFrameworkArgs)"
- WorkingDirectory="$(SharedFrameworkSourceRoot)" />
-
- <!-- Clean deps.json -->
- <ChangeEntryPointLibraryName DepsFile="$(SharedFrameworkNameAndVersionRoot)/framework.deps.json" />
-
- <!-- Clean up artifacts that dotnet-publish generates which we don't need -->
- <ItemGroup>
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\framework" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\framework.exe" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\framework.dll" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\framework.pdb" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\framework.runtimeconfig.json" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\apphost$(ExeSuffix)" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\$(LibPrefix)hostfxr$(LibSuffix)" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\$(LibPrefix)comhost$(LibSuffix)" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\$(LibPrefix)ijwhost$(LibSuffix)" />
- <ToDelete Include="$(SharedFrameworkNameAndVersionRoot)\ijwhost.lib" />
- </ItemGroup>
-
- <Message Text="To delete: @(ToDelete)" />
- <Delete Files="@(ToDelete)" />
-
- <!-- Rename deps file -->
- <Move SourceFiles="$(SharedFrameworkNameAndVersionRoot)\framework.deps.json"
- DestinationFiles="$(SharedFrameworkNameAndVersionRoot)\$(SharedFrameworkName).deps.json" />
-
- <!-- Use the muxer we intended to consume (either restored a shipped version or the one we built) -->
- <!-- Ensure the host is executable. See https://github.com/NuGet/Home/issues/4424 -->
- <Exec Command="chmod u+x $(CoreHostLockedDir)dotnet$(ExeSuffix)"
- Condition="'$(OSGroup)' != 'Windows_NT'" />
- <Copy SourceFiles="$(CoreHostLockedDir)dotnet$(ExeSuffix)" DestinationFolder="$(SharedFrameworkPublishDir)" />
-
- <!-- Use the FXR Resolver we intended to consume (either restored a shipped version or the one we built) -->
- <Copy SourceFiles="$(CoreHostLockedDir)$(LibPrefix)hostfxr$(LibSuffix)" DestinationFolder="$(SharedFrameworkPublishDir)\host\fxr\$(HostResolverVersion)" />
-
- <!-- Copy symbols to publish folder -->
- <ItemGroup>
- <SharedFrameworkSymbols Include="$(PackageSymbolsBinDir)Microsoft.NETCore.App/**/*.pdb" />
- <SharedFrameworkSymbols Include="$(PackageSymbolsBinDir)Microsoft.NETCore.App/**/*$(SymbolFileExtension)" />
- <SharedFrameworkSymbols Include="$(PackageSymbolsBinDir)Microsoft.NETCore.App/**/*$(CrossGenSymbolExtension)"
- Condition="'$(CrossGenSymbolExtension)' != ''" />
- </ItemGroup>
- <RemoveDir Directories="$(SharedFrameworkPublishSymbolsDir)"
- Condition="Exists('$(SharedFrameworkPublishSymbolsDir)')" />
- <MakeDir Directories="$(SharedFrameworkPublishSymbolsDir)" />
- <Copy SourceFiles="@(SharedFrameworkSymbols)" DestinationFolder="$(SharedFrameworkPublishSymbolsDir)" />
- </Target>
-
- <Target Name="GenerateVersionFile"
- DependsOnTargets="GetLatestCommitHash">
-
- <!-- Generate .version file -->
- <ItemGroup>
- <VersionLines Include="$(LatestCommit)" />
- <VersionLines Include="$(SharedFrameworkNugetVersion)" />
- </ItemGroup>
-
- <WriteLinesToFile
- File="$(SharedFrameworkNameAndVersionRoot)\.version"
- Lines="@(VersionLines)"
- Overwrite="true" />
- </Target>
-
- <!-- TODO: Why do we need to have this is M.N.App references the expected version? However,
- I have noticed that without this, M.N.App publish results in having an older (1.1.x)
- hostpolicy binary.
- -->
- <Target Name="CopyHostArtifactsToSharedFramework">
- <ItemGroup>
- <!-- Hostpolicy should be the latest and not the locked version as it is supposed to evolve for -->
- <!-- the framework and has a tight coupling with coreclr's API in the framework. -->
- <HostArtifacts Include="$(CoreHostOutputDir)\$(HostPolicyBaseName)" />
- </ItemGroup>
- <Copy SourceFiles="@(HostArtifacts)" DestinationFolder="$(SharedFrameworkNameAndVersionRoot)" />
- </Target>
-
- <Target Name="GenerateRuntimeGraph">
- <PropertyGroup>
- <SharedFrameworkAssetsFile>$(IntermediateOutputRootPath)/framework/project.assets.json</SharedFrameworkAssetsFile>
- <SharedFrameworkDepsFile>$(SharedFrameworkNameAndVersionRoot)\$(SharedFrameworkName).deps.json</SharedFrameworkDepsFile>
- <RuntimeGraphGeneratorRuntime Condition="'$(OSGroup)'=='Windows_NT'">win</RuntimeGraphGeneratorRuntime>
- <RuntimeGraphGeneratorRuntime Condition="'$(OSGroup)'=='OSX'">osx</RuntimeGraphGeneratorRuntime>
- <RuntimeGraphGeneratorRuntime Condition="'$(OSGroup)'=='FreeBSD'">freebsd</RuntimeGraphGeneratorRuntime>
- <RuntimeGraphGeneratorRuntime Condition="'$(RuntimeGraphGeneratorRuntime)'==''">linux</RuntimeGraphGeneratorRuntime>
- </PropertyGroup>
-
- <ItemGroup>
- <TrimPkgsFromDeps Include="runtime.$(PackageTargetRid).microsoft.netcore.dotnetapphost" />
- <TrimPkgsFromDeps Include="runtime.$(PackageTargetRid).microsoft.netcore.dotnethostresolver" />
- <TrimPkgsFromDeps Include="microsoft.netcore.dotnetapphost" />
- <TrimPkgsFromDeps Include="microsoft.netcore.dotnethostresolver" />
- </ItemGroup>
-
- <ProcessSharedFrameworkDeps AssetsFilePath="$(SharedFrameworkAssetsFile)"
- DepsFilePath="$(SharedFrameworkDepsFile)"
- PackagesToRemove="@(TrimPkgsFromDeps)"
- Runtime="$(RuntimeGraphGeneratorRuntime)"
- BuildToolsTaskDir="$(BuildToolsTaskDir)" />
- </Target>
-
- <Target Name="RestoreLockedCoreHost">
- <PropertyGroup>
- <LockedHostSourceRoot>$(MSBuildThisFileDirectory)lockedhost</LockedHostSourceRoot>
- <CommonLockedHostArgs>$(CommonProjectArgs) /p:HostResolverVersion=$(HostResolverVersion) /p:HostVersion=$(HostVersion)</CommonLockedHostArgs>
- </PropertyGroup>
-
- <RemoveDir Directories="$(CoreHostLockedDir)" />
-
- <!-- Specify a separate 'packages' directory in case we are building an already built version of Microsoft.NETCore.DotNetHost and the $(PackagesDir)
- already contains the same version as we are building. (ex. building source-build for `2.0.0` when `2.0.0` has already shipped.
- -->
- <Exec Command="$(DotnetRestoreCommandNoPackages) --source $(PackageOutputPath) --packages $(SharedFrameworkIntermediatePackagesDir) $(CommonLockedHostArgs)"
- WorkingDirectory="$(LockedHostSourceRoot)" />
-
- <Exec Command="$(DotnetToolCommand) publish --no-restore --output $(CoreHostLockedDir) $(CommonLockedHostArgs)"
- WorkingDirectory="$(LockedHostSourceRoot)" />
- </Target>
-
-</Project>
--- /dev/null
+<Project>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
+ <Import Project="$(MSBuildThisFileDirectory)MNADeprecationWorkaround.props" />
+</Project>
--- /dev/null
+<Project>
+
+ <!--
+ Starting with 3.0, Microsoft.NETCore.App (MNA) is a dummy package, no longer providing any build
+ or runtime assets. For compatibility with existing tests, Microsoft.NETCore.App.Internal (MNAI)
+ now exists as an internal compatibility package. It contains the assets MNA used to have.
+
+ Inject the MNAI package with an opportunity to disable for non-3.0 projects.
+ -->
+ <PropertyGroup>
+ <UseMicrosoftNETCoreAppInternalWorkaround Condition="'$(UseMicrosoftNETCoreAppInternalWorkaround)' == ''">true</UseMicrosoftNETCoreAppInternalWorkaround>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(UseMicrosoftNETCoreAppInternalWorkaround)' == 'true'">
+ <PackageReference Include="Microsoft.NETCore.App.Internal" Version="$(MNAVersion)" />
+ </ItemGroup>
+
+</Project>
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
+
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
+
+ <!--
+ Work around "dotnet store" relying on Microsoft.NETCore.App. See MNADeprecationWorkaround.props.
+
+ Explicit Sdk.targets import is required to override this.
+ -->
+
+ <!-- BEGIN copy: Taken and modified from 'Tools\dotnetcli\sdk\2.1.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets' -->
+
+ <Target Name="_RestoreCrossgen"
+ DependsOnTargets="PrepforRestoreForComposeStore;
+ _SetupStageForCrossgen;"
+ Condition="$(SkipOptimization) != 'true' ">
+ <!-- Was:
+ <MSBuild Projects="$(MSBuildProjectFullPath)"
+ Targets="Restore"
+ Properties="RestoreGraphProjectInput=$(MSBuildProjectFullPath);
+ DisableImplicitFrameworkReferences=true;
+ RestoreOutputPath=$(_CrossProjFileDir);
+ StorePackageName=$(MicrosoftNETPlatformLibrary);
+ StorePackageVersion=$(RuntimeFrameworkVersion);"/>
+ -->
+ <MSBuild Projects="$(MSBuildProjectFullPath)"
+ Targets="Restore"
+ Properties="RestoreGraphProjectInput=$(MSBuildProjectFullPath);
+ DisableImplicitFrameworkReferences=true;
+ RestoreOutputPath=$(_CrossProjFileDir);
+ StorePackageName=Microsoft.NETCore.App.Internal;
+ StorePackageVersion=$(RuntimeFrameworkVersion);"/>
+
+ <ResolvePublishAssemblies ProjectPath="$(MSBuildProjectFullPath)"
+ AssetsFilePath="$(_CrossProjAssetsFile)"
+ TargetFramework="$(_TFM)"
+ RuntimeIdentifier="$(RuntimeIdentifier)"
+ PlatformLibraryName="$(MicrosoftNETPlatformLibrary)"
+ ExcludeFromPublishPackageReferences="@(_ExcludeFromPublishPackageReference)"
+ IsSelfContained="$(SelfContained)"
+ PreserveStoreLayout="false">
+
+ <Output TaskParameter="AssembliesToPublish" ItemName="CrossgenResolvedAssembliesToPublish" />
+ </ResolvePublishAssemblies>
+
+ <!-- Copy managed files to a flat temp directory for passing it as ref for crossgen -->
+ <Copy SourceFiles = "@(CrossgenResolvedAssembliesToPublish)"
+ DestinationFolder="$(_NetCoreRefDir)"
+ OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
+ Retries="$(CopyRetryCount)"
+ RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
+ UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
+ UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
+
+ <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
+ </Copy>
+ </Target>
+
+ <!-- END copy -->
+
</Project>
--- /dev/null
+<Project>
+
+ <!-- This project isn't 3.0, don't use workaround. -->
+ <PropertyGroup>
+ <UseMicrosoftNETCoreAppInternalWorkaround>false</UseMicrosoftNETCoreAppInternalWorkaround>
+ </PropertyGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
+
+</Project>
--- /dev/null
+<Project>
+
+ <!-- This project isn't 3.0, don't use workaround. -->
+ <PropertyGroup>
+ <UseMicrosoftNETCoreAppInternalWorkaround>false</UseMicrosoftNETCoreAppInternalWorkaround>
+ </PropertyGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
+
+</Project>