Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply source build patches #8338

Merged
merged 3 commits into from
Jan 14, 2022
Merged

Conversation

lbussell
Copy link
Contributor

@lbussell lbussell commented Jan 12, 2022

This PR applies two patches that source-build is currently using to build arcade, see dotnet/source-build#2708.

Summary of changes:

  • Use the net6.0 target framework for Microsoft.DotNet.Build.Tasks.Workloads during source build
    • This also required updating an obsolete managed SHA256 usage to avoid a syslib0021 error
  • Override the hardcoded path for DotNetSharedFrameworkTaskDir during source build

@lbussell lbussell marked this pull request as ready for review January 12, 2022 20:00
@lbussell lbussell requested review from tmat and tkapin and removed request for tmat January 13, 2022 00:03
@lbussell lbussell merged commit e3ab734 into dotnet:main Jan 14, 2022
@lbussell lbussell deleted the apply-source-build-patches branch January 14, 2022 18:31
akoeplinger added a commit that referenced this pull request Jan 18, 2022
…#8355)

After #8338 we saw a build error in a dotnet/runtime build job that tries to validate source-build but still uses the non-source-built arcade packages:

```
 /__w/1/s/artifacts/source-build/self/src/src/libraries/ref.proj(68,5): error MSB4062: The "CreateFrameworkListFile" task could not be loaded from the assembly /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22064.25/sdk/../tools/net6.0/Microsoft.DotNet.SharedFramework.Sdk.dll. Could not load file or assembly '/__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22064.25/tools/net6.0/Microsoft.DotNet.SharedFramework.Sdk.dll'. The system cannot find the file specified.
```

This is because the non-source-built arcade packages use netcoreapp3.1 libraries instead of  net6.0, but we're still setting DotnetBuildFromSource=true in those builds.

Instead of using DotnetBuildFromSource to switch between libraries we can check for the existence of the net6.0 folder which works in both scenarios.
ericstj pushed a commit to ericstj/arcade that referenced this pull request Mar 11, 2022
…dotnet#8355)

After dotnet#8338 we saw a build error in a dotnet/runtime build job that tries to validate source-build but still uses the non-source-built arcade packages:

```
 /__w/1/s/artifacts/source-build/self/src/src/libraries/ref.proj(68,5): error MSB4062: The "CreateFrameworkListFile" task could not be loaded from the assembly /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22064.25/sdk/../tools/net6.0/Microsoft.DotNet.SharedFramework.Sdk.dll. Could not load file or assembly '/__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22064.25/tools/net6.0/Microsoft.DotNet.SharedFramework.Sdk.dll'. The system cannot find the file specified.
```

This is because the non-source-built arcade packages use netcoreapp3.1 libraries instead of  net6.0, but we're still setting DotnetBuildFromSource=true in those builds.

Instead of using DotnetBuildFromSource to switch between libraries we can check for the existence of the net6.0 folder which works in both scenarios.
mmitche pushed a commit that referenced this pull request Mar 11, 2022
…#8355) (#8597)

After #8338 we saw a build error in a dotnet/runtime build job that tries to validate source-build but still uses the non-source-built arcade packages:

```
 /__w/1/s/artifacts/source-build/self/src/src/libraries/ref.proj(68,5): error MSB4062: The "CreateFrameworkListFile" task could not be loaded from the assembly /__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22064.25/sdk/../tools/net6.0/Microsoft.DotNet.SharedFramework.Sdk.dll. Could not load file or assembly '/__w/1/s/artifacts/source-build/self/package-cache/microsoft.dotnet.sharedframework.sdk/7.0.0-beta.22064.25/tools/net6.0/Microsoft.DotNet.SharedFramework.Sdk.dll'. The system cannot find the file specified.
```

This is because the non-source-built arcade packages use netcoreapp3.1 libraries instead of  net6.0, but we're still setting DotnetBuildFromSource=true in those builds.

Instead of using DotnetBuildFromSource to switch between libraries we can check for the existence of the net6.0 folder which works in both scenarios.

Co-authored-by: Alexander Köplinger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants