When trying to run the Xamarin.IOS project of my mobile application I get the following error.
File not found: /Users/USERNAME/Library/Caches/Xamarin/mtbs/builds/MyApp.iOS/665113b8e3040a55db5fc43a003035bd/NLogLogger.xcassets/AppIcons.appiconset/Contents.json
Q1.) I have another project which runs successfully, and that projects checks for the Contents.json file in the directory:
/Users/USERNAME/Library/Caches/Xamarin/mtbs/builds/OtherApp.iOS/665113b8e3040a55db5fc43a003035bd/Assets.xcassets/AppIcons.appiconset/Contents.json
This leads me to think that the issue is coming from Xamarin looking for Contents.json in the wrong directory, any idea how to get it to look in the proper location? (I think this could fix the problem)
Q2. Does anyone understand this error and how to fix it, I have been stuck with this for quite a while now.
Note: I have been focused on the Xamarin.Android for this project and this is the first time I am running it the Xamarin.IOS version.
With Xamarin. Forms, you can use C# or XAML to build cross-platform user interfaces for iOS, Android, and macOS.
To do it, go to Tools > Options > Environment > Preview Features > Enable Xamarin Hot Restart. Enable it and remember to restart Visual Studio to actually enable it! Now: Set your iOS project as startup project.
I was able to solve it this way:
.csproj:
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcons.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\LaunchImages.launchimage\Contents.json">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With