.net maui 6.0 clang++ exited with code 1: framework 'NewsstandKit' not found

905 views Asked by At

I am developing a Maui app in visual studio 2022 for windows which gave me errors and I don´t understand very well where they came from, the errors on the output console:

1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.60\targets\Xamarin.Shared.Sdk.targets(1226,3): error : clang++ exited with code 1:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.60\targets\Xamarin.Shared.Sdk.targets(1226,3): error : ld: warning: ignoring duplicate libraries: '-lSystem.IO.Compression.Native', '-lSystem.Native', '-lSystem.Net.Security.Native', '-lSystem.Security.Cryptography.Native.Apple', '-lcompression', '-lmono-component-debugger', '-lmono-component-diagnostics_tracing', '-lmono-component-hot_reload', '-lmonosgen-2.0', '-lxamarin-dotnet-debug'
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.60\targets\Xamarin.Shared.Sdk.targets(1226,3): error : ld: framework 'NewsstandKit' not found
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.60\targets\Xamarin.Shared.Sdk.targets(1226,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)

So I have made 2 empty projects completely from 0 with the basic project that is created when making a new project in visual studio 2022. A project is created with the net 6.0 framework and the other with 7.0. Both with everything the same except the version of the framework. In the part of Android everything works well, cleaning, compiling and deploying on a pixel 5 - API 31 (android 12.0 - API31). When pairing with the mac on which I test things for iOS and the simulators, if I compile, the one with net 7.0 compiles and deploys to an iPhone 15 iOS 17.0 simulator fine, however the one with net 6.0 when trying to compile it shows the errors I mentioned. I don't know what else to try to make it work.

1

There are 1 answers

0
Liyun Zhang - MSFT On

This error is cause by Apple has removed the NewsstandKit framework from the SDK entirely in Xcode 15.x and iOS 17.

And you can read the Support for new Beta versions of iOS. iOS17 beta for example on the github. There is a workaround in it. You can have a try.