-
Notifications
You must be signed in to change notification settings - Fork 519
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
[release/6.0.4xx] [dotnet] Condition default inclusion on the target framework version. #15197
[release/6.0.4xx] [dotnet] Condition default inclusion on the target framework version. #15197
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
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
📋 [PR Build] API Diff 📋API Current PR diff✅ API Diff (from PR only) (no change) View dotnet API diffView dotnet legacy API diffAPI diff✅ API Diff from stable View dotnet API diffView dotnet legacy API diffGenerator diff✅ Generator Diff (no change) Pipeline on Agent XAMBOT-1096.Monterey' |
💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻✅ All tests on macOS Mac Catalina (10.15) passed. Pipeline on Agent |
💻 [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 |
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
Backport of #15196