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

[build] fix ConfigureLocalWorkload target #9124

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

jonathanpeppers
Copy link
Member

After 580166e was merged, the ConfigureLocalWorkload target was no longer working as some of the structure of the sdk-manifests folder has changed.

  • We should run the DeleteExtractedWorkloadPacks target, as it will delete the sdk-manifests/workloadset folder.

Without doing this, the .NET SDK will always attempt to use the 34.99.0-preview.6.340 version in the "baseline" manifest.

  • We also should put a versioned folder after each manifest directory.

So, for example:

bin\Debug\lib\sdk-manifests\microsoft.net.sdk.android\ -> bin\Debug\lib\sdk-manifests\microsoft.net.sdk.android\35.0.0-preview.x.x\
bin\Debug\lib\sdk-manifests\android.deps.workload\ -> bin\Debug\lib\sdk-manifests\android.deps.workload\0.0.1\

Now with a fresh checkout:

dotnet msbuild -t:Prepare Xamarin.Android.sln
.\dotnet-local.cmd build Xamarin.Android.sln
.\dotnet-local.cmd build -t:ConfigureLocalWorkload build-tools\create-packs\Microsoft.Android.Sdk.proj

At this point, I can build app projects and the
BuildBasicApplication test passes locally.

After 580166e was merged, the `ConfigureLocalWorkload` target was
no longer working as some of the structure of the `sdk-manifests`
folder has changed.

* We should run the `DeleteExtractedWorkloadPacks` target, as
  it will delete the `sdk-manifests/workloadset` folder.

Without doing this, the .NET SDK will *always* attempt to use the
34.99.0-preview.6.340 version in the "baseline" manifest.

* We also should put a versioned folder after each manifest directory.

So, for example:

    bin\Debug\lib\sdk-manifests\microsoft.net.sdk.android\ -> bin\Debug\lib\sdk-manifests\microsoft.net.sdk.android\35.0.0-preview.x.x\
    bin\Debug\lib\sdk-manifests\android.deps.workload\ -> bin\Debug\lib\sdk-manifests\android.deps.workload\0.0.1\

Now with a fresh checkout:

    dotnet msbuild -t:Prepare Xamarin.Android.sln
    .\dotnet-local.cmd build Xamarin.Android.sln
    .\dotnet-local.cmd build -t:ConfigureLocalWorkload build-tools\create-packs\Microsoft.Android.Sdk.proj

At this point, I can build app projects and the
`BuildBasicApplication` test passes locally.
Copy link
Contributor

@grendello grendello left a comment

Choose a reason for hiding this comment

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

Confirmed that the fix works locally :)

@grendello
Copy link
Contributor

Base build and smoke tests passed fine, merging since we have no tests that build any application with the local build.

@grendello grendello merged commit baf16f1 into dotnet:main Jul 22, 2024
26 of 57 checks passed
grendello added a commit that referenced this pull request Jul 23, 2024
* main: (23 commits)
  Localized file check-in by OneLocBuild Task (#9129)
  [ci] Disable CodeQL on CI/PR pipelines (#9128)
  Refine 16k page alignment support (#9075)
  [build] fix `ConfigureLocalWorkload` target (#9124)
  Bump to NDK r27 (#9020)
  [ci] Use drop service for SDK insertion artifacts  (#9116)
  Fix up all mapping paths (#9121)
  [ci] Fix maestro publishing for stable packages (#9118)
  Bump to dotnet/sdk@2f14fea98b 9.0.100-preview.7.24367.21 (#9108)
  Missing androidx.window.[extensions|sidecar] warnings (#9085)
  [ci] Use sign-artifacts template for macOS signing (#9091)
  [ci] Use DotNetCoreCLI to sign macOS files (#9102)
  [ci] Disable CodeQL on macOS, Linux, non-main jobs (#9111)
  [tests] re-enable `JavaAbstractMethodTest` (#9097)
  [Microsoft.Android.Sdk.ILLink] preserve types with `IJniNameProviderAttribute` (#9099)
  [Mono.Android] Data sharing and Close() overrides (#9103)
  [AndroidManifest] Add `Android.App.PropertyAttribute` (#9016)
  [Mono.Android] Add support for AndroidMessageHandler ClientCertificates (#8961)
  [Mono.Android] Bind and enumify API-35 (#9043)
  Bump to dotnet/java-interop@7a058c0e (#9066)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants