I have a ASP.NET Core application hosted in Windows Sercice, so it is a .NETCore project but TargetFramework is .NET Framework. This Microsoft document describes this kind of project.
The application works fine with SerciceStack.Core 1.0.44, here goes the snippet of my project file.
<PackageReference Include="ServiceStack.Core" Version="1.0.44" />
<PackageReference Include="ServiceStack.Kestrel" Version="1.0.44" />
<PackageReference Include="ServiceStack.Text.Core" Version="1.0.44" />
<PackageReference Include="ServiceStack.Api.Swagger.Core" Version="1.0.44" />
Now I am trying to upgrade to version 5.0.2, then I found there are two families of assemblies. ServiceStack 5.0.2 and ServiceStack.Core 5.0.2
Then I tried to head on ServiceStack.Core 5.0.2 direction and found it is totally a mess.
First, there is no ServiceStack.Api.Swagger.Core 5.0.2, the only one is ServiceStack.Api.Swagger 5.0.2 and it is depending on ServiceStack 5.0.2.
Second, ServiceStack.Kestrel 5.0.2 dependencies are in different family of ServiceStack.Kestrel 1.0.44. You can compare the dependencies by opening the links.
ServiceStack.Kestrel 1.0.44 depends on ServiceStack.Core 1.0.44;
ServiceStack.Kestrel 5.0.2 depends on ServiceStack 5.0.2
So ServiceStack.Kestrel 5.0.2 cannot be used with ServiceStack.Core 5.0.2 any more.
Then I tried the other direction ServiceStack 5.0.2 -- changing all references to the one without Core postfix and encountering another issue.
Which direction should I go in my case?
Best Regards
Please read the Run ASP.NET Core Apps on the .NET Framework docs. You must continue to reference the .Core packages as they only contains .NET Standard 2.0 builds. Referencing the main packages without the .Core suffix e.g. ServiceStack in a .NET Framework project will reference the net45 builds which can only run classic ASP.NET Framework or HttpListener Apps.
In a .NET Core App you should reference the main NuGet packages e.g. ServiceStack as it will ignore the net45 builds and only reference the .NET Standard 2.0 builds.
Finnally I get the existing project working with version 5.
First, upgrade the version to 5 as below.
<PackageReference Include="ServiceStack.Api.Swagger" Version="5.0.2" />
<PackageReference Include="ServiceStack.Client.Core" Version="5.0.2" />
<PackageReference Include="ServiceStack.Common.Core" Version="5.0.2" />
<PackageReference Include="ServiceStack.Core" Version="5.0.2" />
<PackageReference Include="ServiceStack.Interfaces.Core" Version="5.0.2" />
<PackageReference Include="ServiceStack.Kestrel" Version="5.0.2" />
<PackageReference Include="ServiceStack.Text.Core" Version="5.0.2" />
Then there are a lot of compilation errors as below.
error CS0433: The type 'IRequest' exists in both 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0433: The type 'IRequest' exists in both 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0433: The type 'IReturn<T>' exists in both 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0433: The type 'Service' exists in both 'ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0433: The type 'RouteAttribute' exists in both 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0246: The type or namespace name 'Verbs' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'Summary' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'Notes' could not be found (are you missing a using directive or an assembly reference?)
error CS0433: The type 'ApiMemberAttribute' exists in both 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0246: The type or namespace name 'Name' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'ParameterType' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'DataType' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'IsRequired' could not be found (are you missing a using directive or an assembly reference?)
error CS0246: The type or namespace name 'Description' could not be found (are you missing a using directive or an assembly reference?)
error CS0433: The type 'IReturn<T>' exists in both 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0433: The type 'ApiMemberAttribute' exists in both 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'
error CS0246: The type or namespace name 'Name' could not be found (are you missing a using directive or an assembly reference?)
warning MSB3243: No way to resolve conflict between "ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" and "ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587". Choosing "ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" arbitrarily.
warning MSB3243: No way to resolve conflict between "ServiceStack.Client, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" and "ServiceStack.Client, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587". Choosing "ServiceStack.Client, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" arbitrarily.
warning MSB3243: No way to resolve conflict between "ServiceStack.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" and "ServiceStack.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587". Choosing "ServiceStack.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" arbitrarily.
warning MSB3243: No way to resolve conflict between "ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" and "ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587". Choosing "ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" arbitrarily.
warning MSB3243: No way to resolve conflict between "ServiceStack.Text, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" and "ServiceStack.Text, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587". Choosing "ServiceStack.Text, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null" arbitrarily.
These errors are caused by ServiceStack.Api.Swagger and ServiceStack.Kestrel.
In previous version, they depend on ServiceStack.Core whose publicKeyToken is null;
but in this new version, they depend on ServiceStack whose publicKeyToken exists.
Binding redirection cant help in this case because publicKeyToken is null.
Eventually ServiceStack and ServiceStack.Core they have the same implementation on Windows in my case.
Hence, the key to solve this issue is to change the dependencies of ServiceStack.Api.Swagger and ServiceStack.Kestrel from ServiceStack family to ServiceStack.Core family.
The first step is to copy the assembly files into a packages folder in project and change the reference manner from PackageReference to Reference. After that, NuGet doesnt manage them any more and we can modify the assembly.
Now compiling the project results in different errors like below.
Error CS0012 The type 'IPlugin' is defined in an assembly that is not referenced. You must add a reference to assembly 'ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'.
Error CS0012 The type 'IPreInitPlugin' is defined in an assembly that is not referenced. You must add a reference to assembly 'ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587'.
They are generated by ServiceStack.Api.Swagger because it is trying to link to the type in ServiceStack. In fact the same type exists in ServiceStack.Core assembly whose publicKeyToken is null.
Now I take use of the tool reflexil to edit ServiceStack.Api.Swagger.dll
Select ServiceStack dependencies and clear their publicKeyToken as it is presented in screenshot above.
Compile and now everything works and I dont change any code.
The root issue is that ServiceStack changes the dependencies from ServiceStack.Core family to ServiceStack family.
Personally I would suggest ServiceStack release another parallel package ServiceStack.Api.Swagger.Core 5.0.2 which depends on ServiceStack.Core.
Related
I recently updated my packages and I started to get this weird warning in a few projects. I'm unable to resolve it:
Found conflicts between different versions of "System.Runtime.CompilerServices.Unsafe" that could not be resolved.
There was a conflict between "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
"System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll].
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll".
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll".
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
C:\Users\0000\.nuget\packages\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll
C:\Users\0000\.nuget\packages\nito.disposables\2.2.1\lib\net461\Nito.Disposables.dll
C:\Users\0000\.nuget\packages\nito.asyncex.context\5.1.2\lib\net461\Nito.AsyncEx.Context.dll
C:\Users\0000\.nuget\packages\nito.asyncex.coordination\5.1.2\lib\net461\Nito.AsyncEx.Coordination.dll
C:\Users\0000\.nuget\packages\nito.asyncex.oop\5.1.2\lib\net461\Nito.AsyncEx.Oop.dll
C:\Users\0000\.nuget\packages\nito.asyncex.tasks\5.1.2\lib\net461\Nito.AsyncEx.Tasks.dll
C:\Users\0000\.nuget\packages\nito.asyncex.interop.waithandles\5.1.2\lib\net461\Nito.AsyncEx.Interop.WaitHandles.dll
C:\Users\0000\.nuget\packages\nito.cancellation\1.1.2\lib\net461\Nito.Cancellation.dll
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll".
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
C:\Users\0000\.nuget\packages\utf8json\1.3.7\lib\net47\Utf8Json.dll
C:\Users\0000\.nuget\packages\easy.logger.extensions\1.5.0\lib\net45\Easy.Logger.Extensions.dll Focus.Tests.LogicTester
How do I decipher what is the actual issue here? Is there a package that internally depend on a specific version of a DLL but that DLL is also addedd directly with a newer version?
In short, you have dependencies on two different versions of the same DLL. Breakdown below, but TL;DR, you should be able to resolve this by updating your PackageReference to System.Runtime.CompilerServices.Unsafe to version 6.0.0.
If you don't call into it directly, consider removing the PackageReference, as it should be added transitively via the other references listed below.
If you don't have a PackagerReference to this package, adding one (using version 6.0.0) would make that the primary reference, thereby again aligning everything at the same version.
Error message breakdown:
Found conflicts between different versions of "System.Runtime.CompilerServices.Unsafe" that could not be resolved.
There was a conflict between "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
The compiler picked one based on some measure of how directly you referenced it (as opposed to one of your dependencies referencing it):
"System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
The 5.0 version is referenced by:
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll].
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
The item in the project that creates this runtime dependency on the 5.0 file seems to be itself, i.e. you reference it directly:
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll".
C:\Users\0000\.nuget\packages\system.runtime.compilerservices.unsafe\5.0.0\ref\net461\System.Runtime.CompilerServices.Unsafe.dll
The 6.0 version is referenced by these dependencies:
References which depend on "System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
...
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
...
These are indirectly referenced via other packages:
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll".
C:\Users\0000\.nuget\packages\system.memory\4.5.4\lib\net461\System.Memory.dll
C:\Users\0000\.nuget\packages\system.collections.immutable\5.0.0\lib\net461\System.Collections.Immutable.dll
C:\Users\0000\.nuget\packages\nito.disposables\2.2.1\lib\net461\Nito.Disposables.dll
C:\Users\0000\.nuget\packages\nito.asyncex.context\5.1.2\lib\net461\Nito.AsyncEx.Context.dll
C:\Users\0000\.nuget\packages\nito.asyncex.coordination\5.1.2\lib\net461\Nito.AsyncEx.Coordination.dll
C:\Users\0000\.nuget\packages\nito.asyncex.oop\5.1.2\lib\net461\Nito.AsyncEx.Oop.dll
C:\Users\0000\.nuget\packages\nito.asyncex.tasks\5.1.2\lib\net461\Nito.AsyncEx.Tasks.dll
C:\Users\0000\.nuget\packages\nito.asyncex.interop.waithandles\5.1.2\lib\net461\Nito.AsyncEx.Interop.WaitHandles.dll
C:\Users\0000\.nuget\packages\nito.cancellation\1.1.2\lib\net461\Nito.Cancellation.dll
...
Project file item includes which caused reference "C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll".
C:\Users\0000\.nuget\packages\system.threading.tasks.extensions\4.6.0-preview.18571.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
C:\Users\0000\.nuget\packages\utf8json\1.3.7\lib\net47\Utf8Json.dll
C:\Users\0000\.nuget\packages\easy.logger.extensions\1.5.0\lib\net45\Easy.Logger.Extensions.dll Focus.Tests.LogicTester
I am attempting to validate my customization project before upgrading from 2019R1 to 2019R2. The error messages are not specific enough to be much use in diagnosing the problems, and seem to be referring to objects in the Acumatica code base.
Validating Binary Files
MyProject.dll Failed to resolve type reference: PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1 declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve type reference: PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1 declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve type reference: PX.Objects.PO.POLineType/Goods/Provider declared in PX.Objects, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Fixed binding: splits from PX.Objects.PO.POReceiptEntry
Fixed binding: Item from PX.Objects.IN.InventoryItemMaintBase
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
MyProject.dll Failed to resolve method reference: System.Void PX.Data.ReferentialIntegrity.Attributes.PrimaryKeyOf`1/By`1/ForeignKeyOf`1/By`1::.ctor() declared in PX.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3b136cac2f602b8e
I attempted to unpublish all customization, upgrade, and open my project in visual studio to find the specific errors, but there were none. The customization project subsequently published successfully, but I was missing data from custom objects.
Any suggestions for determining what I need to change in my customization project?
I would check if during build you used dll of proper Acumatica version.
I had been building the Acumatica website within the project, without success. I eventually was able to publish with no apparent weirdnesses after I changed the .NET version of the website project to 4.8 and was able to publish, although I'm not certain if that's what made the difference or just hitting it repeatedly with a hammer did the trick.
i would like to get rid of this message so build time dramatically decreases (it builds and runs ok).
This warning appears in mtouch.
warning MT3006: Could not compute a complete dependency map for the
project. This will result in slower build times because Xamarin.iOS
can't properly detect what needs to be rebuilt (and what does not need
to be rebuilt). Please review previous warnings for more details.
Test solution: helloworld mvvmcross solution with ios project and pcl (wp8+monotouch+net45+android) + Microsoft HTTP PCL package in pcl only + an async call to HttpClient.GetStringAsync in the pcl.
Full log:
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0,
Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
'Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=e16445fd9b451819' was not found. Please review the
project's references.
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
'Cirrious.MvvmCross, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=e16445fd9b451819' was not found. Please review the
project's references.
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly
'Cirrious.MvvmCross.Binding, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' was not found. Please review the project's
references.
warning MT3005: The dependency 'System.Net.Primitives, Version=3.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of
the assembly 'Com.Catenum.Intouch.Business, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' was not found. Please review the
project's references.
warning MT3005: The dependency 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of the assembly
'Com.Catenum.Intouch.Business, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' was not found. Please review the project's
references.
warning MT3005: The dependency 'System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of
the assembly 'Com.Catenum.Intouch.Business, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' was not found. Please review the
project's references.
warning MT3006: Could not compute a complete dependency map for the project. This will result in slower build times because
Xamarin.iOS can't properly detect what needs to be rebuilt (and what
does not need to be rebuilt). Please review previous warnings for more
details.
You must make sure that all the assemblies only reference BCL assemblies that Xamarin.iOS ships.
For example:
warning MT3005: The dependency 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of the assembly 'Com.Catenum.Intouch.Business, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' was not found. Please review the project's references.
Xamarin.iOS does not have a System.Net.Http v1.5.0.0, it has v2.0.5.0 instead (all the Xamarin.iOS base class libraries have version v2.0.5.0, except monotouch.dll itself). The solution is to recompile Com.Catenum.Intouch.Business as a Xamarin.iOS class library (this typically involves creating a new Xamarin.iOS class library project, and link the source files in), which will ensure it contains the correct reference to System.Net.Http.dll.
Note that in Xamarin.iOS 7.0.4 there is a (harmless) bug which causes spurious MT3005/3006 warnings in some cases. This is probably the case for the first warning:
warning MT3005: The dependency 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' of the assembly 'Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e16445fd9b451819' was not found. Please review the project's references.
since Xamarin.iOS does contain a System.Windows assembly with that version.
This has caused me quite the embaressment today. While I was demoing Rx 2.x features and capabilities, I tried to build a NuGet enabled project which I copied from another computer.
Everything was downloaded correctly, the references are there! but I can't compile.
These two below assemblies are causing the issue. I am wondering if anyone has faced this issue with restroing Rx assemblies into a .Net 4.5 project.
System.Reactive.Windows.Threading
Warning 11 The primary reference "System.Reactive.Windows.Threading,
Version=2.1.30214.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" could not be resolved because it has an
indirect dependency on the framework assembly "System.Threading.Tasks,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
which could not be resolved in the currently targeted framework.
".NETFramework,Version=v4.5". To resolve this problem, either remove
the reference "System.Reactive.Windows.Threading, Version=2.1.30214.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35,
processorArchitecture=MSIL" or retarget your application to a
framework version which contains "System.Threading.Tasks,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
And System.Reactive.PlatformServices
Warning 26 The primary reference "System.Reactive.PlatformServices"
could not be resolved because it has an indirect dependency on the
framework assembly "System.Runtime.Extensions, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be
resolved in the currently targeted framework.
".NETFramework,Version=v4.5". To resolve this problem, either remove
the reference "System.Reactive.PlatformServices" or retarget your
application to a framework version which contains
"System.Runtime.Extensions, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a".
Couldn't compile:
Error 73 The type or namespace name 'IScheduler' could not be found
(are you missing a using directive or an assembly
reference?)
Error 74 The type or namespace name 'CompositeDisposable' could not be
found (are you missing a using directive or an assembly
reference?)
My psychic debugger says this has something to do with either mixing references to .NET 4.0 and .NET 4.5 Rx DLLs in a project, or Microsoft.Bcl.Async.
When trying to debug on my iPhone I get the error:
Error MT2002: Failed to resolve "Microsoft.Win32.RegistryKey" reference from "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" (MT2002)
What does this mean and how do I fix it?
The issue you are seeing is a result of using the type Microsoft.Win32.RegistryKey in your project or any third party libraries, this likely not available in MonoTouch
I would take a look at the library you have developed and double check everything is ok.