-
Notifications
You must be signed in to change notification settings - Fork 518
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
[dotnet] Condition default inclusion on the target framework version. #15196
Conversation
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
/sudo backport release/6.0.4xx |
Backport Job to branch release/6.0.4xx Created! The magic is happening here |
Hooray! Backport succeeded! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6236693 for more details. |
📋 [PR Build] API Diff 📋API diff (for current PR)ℹ️ API Diff (from PR only) (please review changes) .NETXamarin vs .NETAPI diff (vs stable)✅ API Diff from stable .NETXamarin vs .NETGenerator diff✅ Generator Diff (no change) Pipeline on Agent XAMBOT-1035.Monterey |
🔥 [PR Build] Build failed 🔥Build failed for the job 'Build packages' Pipeline on Agent |
💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻✅ All tests on macOS Mac Catalina (10.15) passed. Pipeline on Agent |
❌ [CI Build] Tests failed on VSTS: simulator tests iOS ❌Tests failed on VSTS: simulator tests iOS. Test results5 tests failed, 140 tests passed.Failed tests
Pipeline on Agent XAMBOT-1043.Monterey' |
Test failures are unrelated (https://github.com/xamarin/maccore/issues/2558). |
One problem we hit when trying to build
net6.0-ios
projects froma .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 asan SDK:
So the way this has to work is that ny
<ItemGroup>
must be conditioned sothat
$(TargetFrameworkVersion)
matches the expected .NET SDK version.I used
[MSBuild]::VersionEquals()
for all checks, because the valueis
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