question

NicolasBlanco-7990 avatar image
0 Votes"
NicolasBlanco-7990 asked JarvanZhang-MSFT commented

Error while Linking Framework SDKs on Xamarin. "Cant resolve the reference...."

I am trying to compile my code using the "Link Framework SDKs Only" option, since I am trying to make my code lighter. Whenever I try with "Dont link", the code compiles without a problem, but once I choose the "Link Framework SDKs Only" option an error pops up.

I would like to know if anybody has encountered a similar error, or knows how to solve this. The image below shows the exact error that´s poping up

114003-2.jpeg


dotnet-xamarin
2.jpeg (30.1 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, NicolasBlanco. Did you use a third-party nuget? The nuget may reference the System.ComponentModel.Annotations assembly that causes the problem. Try to remove the nuget or create a new blank project for test.

To void the issue, try tp skip the related assembly:

--linkskip=System.ComponentModel.Annotations

Check the doc: https://docs.microsoft.com/en-us/xamarin/ios/deploy-test/linker?tabs=macos#skipping-assemblies

Similar issue: https://github.com/xamarin/Essentials/issues/1176

0 Votes 0 ·

0 Answers