Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@
<PublishDir Condition="'$(RuntimeIdentifier)' != ''">$(ArtifactsDir)/LanguageServer/$(Configuration)/$(TargetFramework)/$(RuntimeIdentifier)</PublishDir>
<PublishDir Condition="'$(RuntimeIdentifier)' == ''">$(ArtifactsDir)/LanguageServer/$(Configuration)/$(TargetFramework)/neutral</PublishDir>

<!-- List of runtime identifiers that we want to publish an executable for. -->
<!-- When building a VMR vertical, we don't need to pack everything. Just pack the passed in TargetRid or BaseOS.
TargetRid and BaseOS are provided to roslyn via the build arguments passed in the VMR orchestrator's repo project.
https://github.com/dotnet/dotnet/blob/main/repo-projects/roslyn.proj. For definitions of the TargetRid
and other common properties, see https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/Unified-Build-Controls.md -->
<RuntimeIdentifiers Condition="'$(TargetRid)' != ''">$(TargetRid)</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(BaseOS)' != ''">$(BaseOS)</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetRid)' == '' and '$(BaseOS)' == ''">win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>

<!-- These indicate that the runtime/apphost packages should not be downloaded as part of build/restore -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to expand on this comment to explain why we're turning this off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do in follow up

<EnableRuntimePackDownload>false</EnableRuntimePackDownload>
<EnableAppHostPackDownload>false</EnableAppHostPackDownload>

<!-- Publish ready to run executables when we're publishing platform specific executables. -->
<PublishReadyToRun Condition="'$(RuntimeIdentifier)' != '' AND '$(Configuration)' == 'Release' ">true</PublishReadyToRun>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@
<ImportNuGetBuildTasksPackTargetsFromSdk>false</ImportNuGetBuildTasksPackTargetsFromSdk>
<_RoslynPublishReadyToRun>false</_RoslynPublishReadyToRun>
<_RoslynPublishReadyToRun Condition="'$(Configuration)' == 'Release'">true</_RoslynPublishReadyToRun>

<!--
List of runtime identifiers that we want to publish an executable for.
This cannot be set in the base project as it will cause issues when roslyn is built
as a test project for SDK insertions. The RuntimeIdentifiers property will cause the build to
attempt to download unpublished packages, which fails (until the packages eventually get published).

The test doesn't actually run pack, so we can instead skip setting the RuntimeIdentifiers property unless
we're actually trying to build packages.
-->
<!--
When building a VMR vertical, we don't need to pack everything. Just pack the passed in TargetRid or BaseOS.
TargetRid and BaseOS are provided to roslyn via the build arguments passed in the VMR orchestrator's repo project.
https://github.com/dotnet/dotnet/blob/main/repo-projects/roslyn.proj. For definitions of the TargetRid
and other common properties, see https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/Unified-Build-Controls.md
-->
<RuntimeIdentifiers Condition="'$(TargetRid)' != ''">$(TargetRid)</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(BaseOS)' != ''">$(BaseOS)</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="'$(TargetRid)' == '' and '$(BaseOS)' == ''">win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
</PropertyGroup>

<Target Name="Pack">
Expand All @@ -43,10 +24,13 @@

We also pass the RestoreUseStaticGraphEvaluation=false flag to workaround a long path issue when calling the restore target.
See https://github.com/NuGet/Home/issues/11968

We also pass the EnableRuntimePackDownload/EnableAppHostPackDownload flags to indicate we wish for this restore/pack to download
the required runtime/apphost packages as those will be needed during the pack.
-->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Restore" Properties="PublishReadyToRun=$(_RoslynPublishReadyToRun);RestoreUseStaticGraphEvaluation=false" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Restore" Properties="EnableRuntimePackDownload=true;EnableAppHostPackDownload=true;PublishReadyToRun=$(_RoslynPublishReadyToRun);RestoreUseStaticGraphEvaluation=false" />

<MSBuild Projects="@(ProjectToPublish)" Targets="Pack" BuildInParallel="true" />
<MSBuild Projects="@(ProjectToPublish)" Targets="Pack" Properties="EnableRuntimePackDownload=true;EnableAppHostPackDownload=true" BuildInParallel="true" />
</Target>

<!--
Expand Down
Loading