First of all, sorry for my bad English. I'm developing a Xamarin PCL application for Android and UWP.
For android everything works but for UWP it doesn't. When I build in debug mode it also works fine but that is because the common language runtime exceptions are off. The errors occur when it hits Xamarin.Forms.Forms.Init(e);
These are the errors:
System.IO.FileNotFoundException occurred HResult=0x80070002 Message=Could not load file or assembly 'clrcompression, Culture=neutral, PublicKeyToken=null'. Het systeem kan het opgegeven bestand niet vinden. Source= StackTrace: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
System.IO.FileNotFoundException occurred HResult=0x80070002 Message=Could not load file or assembly 'clrjit, Culture=neutral, PublicKeyToken=null'. Het systeem kan het opgegeven bestand niet vinden. Source= StackTrace: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
System.IO.FileNotFoundException occurred HResult=0x80070002 Message=Could not load file or assembly 'sqlite3, Culture=neutral, PublicKeyToken=null'. Het systeem kan het opgegeven bestand niet vinden. Source= StackTrace: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
System.IO.FileNotFoundException occurred HResult=0x80070002 Message=Could not load file or assembly 'ucrtbased, Culture=neutral, PublicKeyToken=null'. Het systeem kan het opgegeven bestand niet vinden. Source= StackTrace: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
The app contains multiple nuget packages and multiple portable library classes. App PCL:
package id="Newtonsoft.Json" version="10.0.3" targetFramework="portable45-
net45+win8" /
package id="Rg.Plugins.Popup" version="1.0.4" targetFramework="portable45-
net45+win8" /
package id="SQLite.Net.Core-PCL" version="3.1.1"
targetFramework="portable45-net45+win8" /
package id="SQLite.Net-PCL" version="3.1.1" targetFramework="portable45-
net45+win8" /
package id="System.Runtime" version="4.3.0" targetFramework="portable45-
net45+win8" /
package id="System.Threading" version="4.3.0" targetFramework="portable45-
net45+win8" /
package id="Xam.Plugins.DownloadManager" version="1.3.2"
targetFramework="portable45-net45+win8" /
package id="Xamarin.Forms" version="2.4.0.18342"
targetFramework="portable45-net45+win8" /
package id="ZXing.Net.Mobile" version="2.2.9" targetFramework="portable45-
net45+win8" /
package id="ZXing.Net.Mobile.Forms" version="2.2.9"
targetFramework="portable45-net45+win8" /
UWP:
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.UniversalWindowsPlatform": "6.0.1",
"Microsoft.Toolkit.Uwp.Notifications": "2.0.0",
"Newtonsoft.Json": "10.0.3",
"Rg.Plugins.Popup": "1.0.4",
"SQLite.Net-PCL": "3.1.1",
"SQLite.Net.Core-PCL": "3.1.1",
"System.IO": "4.3.0",
"System.Net.Sockets": "4.3.0",
"System.ObjectModel": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Handles": "4.3.0",
"System.Threading": "4.3.0",
"Xam.Plugin.Connectivity": "3.0.3",
"Xam.Plugins.DownloadManager": "1.3.2",
"Xamarin.Forms": "2.4.0.18342",
"ZXing.Net.Mobile": "2.2.9",
"ZXing.Net.Mobile.Forms": "2.2.9"
Library classes 1:
PCL:
package id="Newtonsoft.Json" version="10.0.3" targetFramework="portable45-
net45+win8" /
package id="SQLite.Net.Core-PCL" version="3.1.1"
targetFramework="portable45-net45+win8" /
package id="SQLite.Net-PCL" version="3.1.1" targetFramework="portable45-
net45+win8" /
package id="Xamarin.Forms" version="2.4.0.18342"
targetFramework="portable45-net45+win8" /
UWP:
Microsoft.netcore.universalwindowsplatform
newtonsoft.json
sqlite.net-pcl
sqlite.net.core-pcl
xamarin.froms
Library classes 2:
PCL:
package id="Xamarin.Forms" version="2.4.0.18342"
targetFramework="portable45-net45+win8" /
UWP:
microsoft.netcore.universalwindowsplatform
microsoft.toolkit.uwp.notifications.
sqlite for universal windows platform
universal windows
windows desktop extensions for the uwp
windows IoT extensions for the UWP
Windows Mobile extensions for the uwp
Windows Team extensions for the uwp
xam.plugin.connectivity
xamarin.forms
Does anybody know how to fix this problem?
UPDATE: Error 1 (clrcompression) is fixed. This was because the base project uses an package that has an dependency of System.io.compression of version 4.1.0 and the app used 4.3.0 (but nuget packages was the same version) after I changed that it was fixed. But this can't easily be found. That's why the other 3 errors remain.
User contributions licensed under CC BY-SA 3.0