Skip to content

[release/6.0.4xx] [dotnet] Condition default inclusion on the target framework version. - #15197

Merged
rolfbjarne merged 2 commits into
dotnet:release/6.0.4xxfrom
vs-mobiletools-engineering-service2:backport-pr-15196-to-release/6.0.4xx
Jun 3, 2022
Merged

rolfbjarne merged 2 commits into
dotnet:release/6.0.4xxfrom
vs-mobiletools-engineering-service2:backport-pr-15196-to-release/6.0.4xx

Conversation

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

One problem we hit when trying to build net6.0-ios projects from
a .NET 7 SDK & iOS workload, was that we ended up importing two
AutoImport.props files.

These are imported for any pack in WorkloadManifest.json declared as
an SDK:

"packs": {
  "Microsoft.iOS.Sdk": {
    "kind": "sdk",

So the way this has to work is that ny <ItemGroup> must be conditioned so
that $(TargetFrameworkVersion) matches the expected .NET SDK version.

I used [MSBuild]::VersionEquals() for all checks, because the value
is v6.0 and the helper method properly handles this case for us.

When this change ships in a .NET 6 servicing release, we can then
update our .NET 7 packages to rely on this change.

This is equivalent to Android's change here:
dotnet/android@38b3fa6

Backport of #15196

One problem we hit when trying to build `net6.0-ios` projects from
a .NET 7 SDK & iOS workload, was that we ended up importing *two*
`AutoImport.props` files.

These are imported for any pack in `WorkloadManifest.json` declared as
an SDK:

    "packs": {
      "Microsoft.iOS.Sdk": {
        "kind": "sdk",

So the way this has to work is that ny `<ItemGroup>` must be conditioned so
that `$(TargetFrameworkVersion)` matches the expected .NET SDK version.

I used `[MSBuild]::VersionEquals()` for all checks, because the value
is `v6.0` and the helper method properly handles this case for us.

When this change ships in a .NET 6 servicing release, we can then
update our .NET 7 packages to rely on this change.

This is equivalent to Android's change here:
dotnet/android@38b3fa6
@rolfbjarne

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator Author

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMBOT-1033.Monterey
Hash: 3bbebd7b777f9cdd158fd082af0ba5a709e17ea9

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator Author

📋 [PR Build] API Diff 📋

API Current PR diff

✅ API Diff (from PR only) (no change)

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

API diff

✅ API Diff from stable

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

Generator diff

✅ Generator Diff (no change)

Pipeline on Agent XAMBOT-1096.Monterey'
Hash: 3bbebd7b777f9cdd158fd082af0ba5a709e17ea9

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator Author

💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻

✅ All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: 3bbebd7b777f9cdd158fd082af0ba5a709e17ea9

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator Author

💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

✅ All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: 3bbebd7b777f9cdd158fd082af0ba5a709e17ea9

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator Author

✅ [CI Build] Tests passed on VSTS: simulator tests iOS. ✅

Tests passed on VSTS: simulator tests iOS.

🎉 All 146 tests passed 🎉

Pipeline on Agent XAMBOT-1105.Monterey'
Merge 3bbebd7 into 320d083

@rolfbjarne
rolfbjarne merged commit 4e41e57 into dotnet:release/6.0.4xx Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported not-notes-worthy Ignore for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants