Skip to content

Commit

Permalink
Remove live runtime dependencies (#8138)
Browse files Browse the repository at this point in the history
* Remove live runtime dependencies

... use the shared framework that comes with the
SDK instead.

We determined that a live runtime doesn't provide
much benefit anymore and in contrast often
causes pain when flowing dependencies to
dotnet/sdk.

* Remove internal runtime args

---------

Co-authored-by: Matt Mitchell (.NET) <mmitche@microsoft.com>
  • Loading branch information
ViktorHofer and mmitche authored Jun 19, 2024
1 parent 7bee91d commit 5a1e982
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 76 deletions.
7 changes: 0 additions & 7 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(BuildingInsideVisualStudio)' != 'true'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)" />
</ItemGroup>

<ItemGroup>
<None Include="$(RepoRoot)LICENSE.txt" PackagePath="LICENSE.txt" Pack="true" />
<None Include="$(RepoRoot)THIRD-PARTY-NOTICES.txt" PackagePath="THIRD-PARTY-NOTICES.txt" Pack="true" />
Expand Down
25 changes: 1 addition & 24 deletions azure-pipelines-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ variables:
value: false
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: Templating-SDLValidation-Params

- ${{ if ne(variables['System.TeamProject'], 'public') }}:
# Variable replaced by enable-internal-runtimes.yml
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: _InternalRuntimeDownloadArgs
value: ''
- template: /eng/common/templates/variables/pool-providers.yml

stages:
Expand Down Expand Up @@ -106,16 +97,12 @@ stages:
- checkout: self
clean: true

- template: /eng/common/templates/steps/enable-internal-runtimes.yml
- template: /eng/common/templates/steps/enable-internal-sources.yml

# Use utility script to run script command dependent on agent OS.
- script: eng/common/cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-integrationTest
$(_InternalBuildArgs)
$(_InternalRuntimeDownloadArgs)
displayName: Windows Build / Publish

- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
Expand All @@ -131,23 +118,18 @@ stages:
_BuildConfig: Release
_SignType: none
steps:

- template: /eng/common/templates/steps/enable-internal-runtimes.yml
- template: /eng/common/templates/steps/enable-internal-sources.yml

- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--integrationTest
$(_InternalRuntimeDownloadArgs)
name: Build
displayName: Build

- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- job: Linux
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
vmImage: ubuntu-latest
vmImage: ubuntu-latest
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: $(DncEngInternalBuildPool)
demands: ImageOverride -equals Build.Ubuntu.2204.Amd64
Expand All @@ -160,15 +142,10 @@ stages:
_BuildConfig: Release
_SignType: none
steps:

- template: /eng/common/templates/steps/enable-internal-runtimes.yml
- template: /eng/common/templates/steps/enable-internal-sources.yml

- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--integrationTest
$(_InternalRuntimeDownloadArgs)
name: Build
displayName: Build
condition: succeeded()
Expand Down
28 changes: 3 additions & 25 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ variables:
value: false
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: Templating-SDLValidation-Params
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
# Variable replaced by enable-internal-runtimes.yml
- name: _InternalRuntimeDownloadArgs
value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal
/p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64)
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- name: _InternalRuntimeDownloadArgs
value: ''
- template: /eng/common/templates-official/variables/pool-providers.yml

resources:
Expand Down Expand Up @@ -106,7 +98,7 @@ extends:
- _SignType: test
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
- _SignType: real
- _InternalBuildArgs: ''
- _InternalBuildArgs: ''
# Only enable publishing in non-public, non PR scenarios.
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
# DotNet-Symbol-Server-Pats provides: microsoft-symbol-server-pat, symweb-symbol-server-pat
Expand All @@ -119,16 +111,12 @@ extends:
- checkout: self
clean: true

- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/templates-official/steps/enable-internal-sources.yml

# Use utility script to run script command dependent on agent OS.
- script: eng/common/cibuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
-integrationTest
$(_InternalBuildArgs)
$(_InternalRuntimeDownloadArgs)
displayName: Windows Build / Publish

- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
Expand All @@ -141,18 +129,13 @@ extends:
- _BuildConfig: ${{ config.buildConfig }}
- _SignType: none
steps:

- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/templates-official/steps/enable-internal-sources.yml

- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--integrationTest
$(_InternalRuntimeDownloadArgs)
name: Build
displayName: Build

- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
- ${{ each config in parameters.buildConfigurations }}:
- job: Linux_${{ config.buildConfig }}
Expand All @@ -170,19 +153,14 @@ extends:
- _BuildConfig: ${{ config.buildConfig }}
- _SignType: none
steps:

- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
- template: /eng/common/templates-official/steps/enable-internal-sources.yml

- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
--integrationTest
$(_InternalRuntimeDownloadArgs)
name: Build
displayName: Build
condition: succeeded()

- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: eng/common/templates-official/post-build/post-build.yml@self
parameters:
Expand Down
2 changes: 0 additions & 2 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@

<UsageData>
<IgnorePatterns>
<!-- TODO: Ignore needed until https://github.com/dotnet/source-build/issues/3188 is addressed. -->
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/*" />
</IgnorePatterns>
</UsageData>
8 changes: 0 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
<Sha>9ae78a4e6412926d19ba97cfed159bf9de70b538</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="9.0.0-preview.6.24316.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f4fd3ea470aeef5a7c843e9fd5fa1ce50b6b5b70</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="9.0.0-preview.6.24316.2">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f4fd3ea470aeef5a7c843e9fd5fa1ce50b6b5b70</Sha>
</Dependency>
<Dependency Name="System.CommandLine" Version="2.0.0-beta4.24209.3">
<Uri>https://github.com/dotnet/command-line-api</Uri>
<Sha>963d34b1fb712c673bfb198133d7e988182c9ef4</Sha>
Expand Down
3 changes: 0 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@
<PropertyGroup>
<!-- Command-line-api dependencies -->
<SystemCommandLinePackageVersion>2.0.0-beta4.24209.3</SystemCommandLinePackageVersion>
<!-- Runtime dependencies -->
<MicrosoftNETCoreAppRefPackageVersion>9.0.0-preview.6.24316.2</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>9.0.0-preview.6.24316.2</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
</PropertyGroup>
</Project>
7 changes: 1 addition & 6 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"tools": {
"dotnet": "9.0.100-preview.5.24307.3",
"runtimes": {
"dotnet": [
"$(MicrosoftNETCoreAppRefPackageVersion)"
]
}
"dotnet": "9.0.100-preview.5.24307.3"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24317.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Remove="Microsoft.NETCore.App" />
<Content Include="content\**">
<PackagePath>content</PackagePath>
</Content>
Expand Down

0 comments on commit 5a1e982

Please sign in to comment.