Open damiand2 opened 1 year ago
This issue was moved to xamarin/xamarin-macios#18802
Reopening, since this is not an issue in xamarin-macios. I believe it's in NuGet or dotnet/sdk.
The important information is that the project builds if using TargetFramework
(singular) instead of TargetFrameworks
(plural). As far as I know, using the plural version with a single target framework should be the same as using the singular version.
Binlogs: binlogs.zip
I've attached a working binlog (using TargetFramework
) and a failing binlog (using TargetFrameworks
).
The difference is that the working build imports Xamarin.Build.Download.props (which comes from a transitively referenced NuGet), while the broken build doesn't.
Screenshot comparison:
Note how the condition to import Xamarin.Build.Download.props is different, the broken version has an additional condition on the target framework.
My theory is that this is early enough in the build for TargetFramework not to be set, thus the condition fails - one reason I believe this is because the Xamarin.Build.Download.targets file is imported just fine later on, with the exact same condition:
@rmarinho can you transfer to dotnet/sdk? it doesn't look like I have permissions to do that.
@damiand2 if you approve and merge https://github.com/damiand2/MauiMapBindingTest/pull/1 the test project will compile successfully once this issue is fixed.
@rolfbjarne - ok, waiting for confirmation from @rmarinho
Any update on this issue?
I'm facing a similar one using:
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.19.2" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed" Version="1.19.2" />
where the build has the following warning and app crashes whenever the resource should be loaded:
obj/Debug/net8.0-ios/iossimulator-arm64/onnxruntime.xcframework.zip/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework/onnxruntime : warning MT7091: The framework obj/Debug/net8.0-ios/iossimulator-arm64/onnxruntime.xcframework.zip/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.framework is a framework of static libraries, and will not be copied to the app.
(on macOS, and afaik my build tools are now up to date, I've re-installed everything from scratch using VSCode)
Any update on this issue?
Does your problem go away if you use "TargetFramework" (singular) as opposed to "TargetFrameworks" (plural) in your csproj? If not, then you're experiencing a different issue (so please create a new issue for it).
Description
Hi, I'm trying to create iOS binding library for google map utils (https://github.com/googlemaps/google-maps-ios-utils) so I did following steps on Mac machine:
So I tried to add also those base frameworks but it changes nothing in build errors. Is this scenario supported? How can I build binding library for framework that depends on other frameworks, not installed on Mac (as those other frameworks are also iOS-only). Should I try to build a FAT library?
Steps to Reproduce
Link to public reproduction project repository
https://github.com/damiand2/MauiMapBindingTest
Version with bug
7.0.92
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
not yet
Relevant log output
No response