-
Notifications
You must be signed in to change notification settings - Fork 516
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 from Visual Studio 2022 17.8.0 Preview 3.0 paired to Mac failing if using a Nuget package with xcframework reference #19173
Comments
OK, I can reproduce, and I'll try to fix this next week. |
…y in the ResolveNativeReferences task. Fixes xamarin#19173. Fixes xamarin#19173.
@rolfbjarne I see you fixed this. Is it possible to install this updated build task on top of the latest VS 17.8.0 Preview 3 so that I can continue development? |
@philipag I haven't tested this, but there may be a workaround you can apply locally:
<Target Name="_ExpandNativeReferences" Condition="'$(DesignTimeBuild)' != 'true'" DependsOnTargets="_DetectSdkLocations;_ComputeTargetArchitectures;_GenerateBundleName">
<ItemGroup>
<_XCFrameworkNativeReference Include="@(NativeReference -> '%(Identity)/.')" Condition="'%(Extension)' == '.xcframework'" />
<_FrameworkNativeReference Include="@(NativeReference -> '%(Identity)/%(Filename)')" Condition="'%(Extension)' == '.framework'" />
<_FileNativeReference Include="@(NativeReference)" Condition="'%(Extension)' != '.framework' And '%(Extension)' != '.xcframework'" />
</ItemGroup>
<ResolveNativeReferences
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And '$(IsBindingProject)' != 'true'"
Architectures="$(TargetArchitectures)"
FrameworksDirectory="$(_AppFrameworksRelativePath)"
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
NativeReferences="@(_XCFrameworkNativeReference);@(_FrameworkNativeReference)"
References="@(ReferencePath)"
SdkIsSimulator="$(_SdkIsSimulator)"
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
>
<Output TaskParameter="NativeFrameworks" ItemName="_ResolvedNativeReference" />
</ResolveNativeReferences>
<ItemGroup>
<_FrameworkNativeReference Include="@(_ResolvedNativeReference)" Condition="'%(Kind)' == 'Framework'" />
<_FileNativeReference Include="@(_ResolvedNativeReference)" Condition="'%(Kind)' == 'Static' Or '%(Kind)' == 'Dynamic'" />
</ItemGroup>
</Target>
<Target Name="_ExpandNativeReferences" Condition="'$(DesignTimeBuild)' != 'true'" DependsOnTargets="_DetectSdkLocations;_ComputeTargetArchitectures;_GenerateBundleName">
<ItemGroup>
<_XCFrameworkNativeReference Include="@(NativeReference -> '%(Identity)/.')" Condition="'%(Extension)' == '.xcframework'" />
<_FrameworkNativeReference Include="@(NativeReference -> '%(Identity)/%(Filename)')" Condition="'%(Extension)' == '.framework'" />
<_FileNativeReference Include="@(NativeReference)" Condition="'%(Extension)' != '.framework' And '%(Extension)' != '.xcframework'" />
</ItemGroup>
<ResolveNativeReferences
Condition="'$(IsMacEnabled)' == 'true' And '$(IsBindingProject)' != 'true'"
Architectures="$(TargetArchitectures)"
FrameworksDirectory="$(_AppFrameworksRelativePath)"
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
NativeReferences="@(_XCFrameworkNativeReference);@(_FrameworkNativeReference)"
References="@(ReferencePath)"
SdkIsSimulator="$(_SdkIsSimulator)"
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
>
<Output TaskParameter="NativeFrameworks" ItemName="_ResolvedNativeReference" />
</ResolveNativeReferences>
<ItemGroup>
<_FrameworkNativeReference Include="@(_ResolvedNativeReference)" Condition="'%(Kind)' == 'Framework'" />
<_FileNativeReference Include="@(_ResolvedNativeReference)" Condition="'%(Kind)' == 'Static' Or '%(Kind)' == 'Dynamic'" />
</ItemGroup>
</Target>
|
With this temporary fix I'm able to build my app targeting iOS again 👍 thx a lot |
…n building remotely in the ResolveNativeReferences task. Fixes xamarin#19173. Fixes xamarin#19173. Backport of xamarin#19227.
…y in the ResolveNativeReferences task. Fixes xamarin#19173. Fixes xamarin#19173.
…y in the ResolveNativeReferences task. Fixes xamarin#19173. Fixes xamarin#19173.
…ac when building remotely in the ResolveNativeReferences task. Fixes #19173. (#19235) Fixes #19173. Backport of #19227 Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
…n building remotely in the ResolveNativeReferences task. Fixes #19173. (#19234) Fixes #19173. Backport of #19227 Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
Got this error when trying the temp fix unfortunately: |
@rolfbjarne |
@rolfbjarne this happens because MobileAds.SharedInstance is null with in the AppDelegate.cs FinishedLaunching method. This work around only allows you to build locally, but when you connect to mac you receive a totally different error. Have anyone found a fix where you can actually build using remote device, while paired to a mac? |
This should be fixed once we release .NET 8. |
Might be something similar to #19152 or at least the second comment in that issue.
Steps to Reproduce
Expected Behavior
App builds and deploys to device without problems
Actual Behavior
The build fails.
This Nuget package and build worked on previous preview versions and RC1 of .NET 8.0. I have tried with both Xcode 14.3 and Xcode 15 on the remote Mac.
The build fails with the following warning and errors. The first warning is probably what generate the last error as it can't find symbol references because of the warning. I have checked that the file is located in the given folder.
Warning in the start of the build:
Error in the end of the build:
Environment
Version information
Build Logs
Output-Build.txt
https://github.com/skha83/MauiIosError/blob/main/Output-Build.txt
Example Project (If Possible)
https://github.com/skha83/MauiIosError
The text was updated successfully, but these errors were encountered: