Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions PowerShell.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,27 @@
<!-- Define all OS, debug configuration properties -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>portable</DebugType>
</PropertyGroup>```

<!-- Define properties for Framework dependent deployments in Packages
Packages should not use DOTNET_ROOT so we set the search to Global
-->
<PropertyGroup Condition=" '$(AppDeployment)' == 'FddPackage' ">
<AppHostDotNetSearch>Global</AppHostDotNetSearch>
</PropertyGroup>

<!-- Define all OS, release configuration properties -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<!-- Define properties for releases except for framework-dependent deployments as tools,
including archives and dotnet tools.

These tools should not be Ready-to-Run because that will make them runtime specific.
-->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' and '$(AppDeployment)' != 'FddTool' ">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
</PropertyGroup>

<!-- Define all OS, release configuration properties -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>true</Optimize>
<DebugType>portable</DebugType>
</PropertyGroup>
Expand Down
9 changes: 5 additions & 4 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,11 @@ Fix steps:
$Arguments += "/property:IsWindows=false"
}

# Framework Dependent builds do not support ReadyToRun as it needs a specific runtime to optimize for.
# The property is set in Powershell.Common.props file.
# We override the property through the build command line.
# Different deployment types build with different properties.
# We pass in the AppDeployment property to indicate which type of deployment we are doing.
# This allows the PowerShell.Common.props to set the correct properties for the build.
if(($Options.Runtime -like 'fxdependent*' -or $ForMinimalSize) -and $Options.Runtime -notmatch $optimizedFddRegex) {
$Arguments += "/property:PublishReadyToRun=false"
$Arguments += "/property:AppDeployment=FddTool"
}

$Arguments += "--configuration", $Options.Configuration
Expand All @@ -511,6 +511,7 @@ Fix steps:
} elseif ($Options.Runtime -match $optimizedFddRegex) {
$runtime = $Options.Runtime -replace 'fxdependent-', ''
$Arguments += "--runtime", $runtime
$Arguments += "/property:AppDeployment=FddPackage"
}

if ($ReleaseTag) {
Expand Down
Loading