Xamarin cosmos DB not working when Deploy on IOS - xamarin.forms

I working on Xamarin forms and I'am using Microsoft Cosmod Db database to store and read data.
In the app I can access/write to my cosmos db database in Debug and Release mode when using IOS and Android Simulator.
But once I deploy on Google Play and App Store connect I still can access to my database on Android but not on IOS when I try to read data sometimes it crashs or nothing happen
My question : I do not understand why Cosmos db Nuget package is not working on IOS once my App is deploy for test in App Store connect.
When Using raygun.io to catch my error
Here is the exception :
Lealtd.MyPages.MyAuthentification.LeafProfileParameter.MyParamPage() in <aa0ef9de4404408f83484774998ac15a#c3f844596a550d3270e6f8cf3e1cb01a>
Lealtd.MyPages.MyAuthentification.LeafProfileParameter..ctor() in <aa0ef9de4404408f83484774998ac15a#c3f844596a550d3270e6f8cf3e1cb01a>
Lealtd.MyPages.MyAuthentification.LeafInPage.OnUserLeafIn() in <aa0ef9de4404408f83484774998ac15a#c3f844596a550d3270e6f8cf3e1cb01a>
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0(System.Object state) in <66c50f4174694147beb2fbedff89d188#c3f844596a550d3270e6f8cf3e1cb01a>
Foundation.NSAsyncSynchronizationContextDispatcher.Apply() in <c07d1d2ff2fb499fb8eca9a33aeb3c2e#c3f844596a550d3270e6f8cf3e1cb01a>
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIKit.UIApplication.Main(System.String[] args, System.Type principalClass, System.Type delegateClass) in <c07d1d2ff2fb499fb8eca9a33aeb3c2e#c3f844596a550d3270e6f8cf3e1cb01a>
Lealtd.iOS.Application.Main(System.String[] args) in <3eed6dbecd10466db73945963e82109c#c3f844596a550d3270e6f8cf3e1cb01a>
Here is the stack trace :
System.Runtime.Remoting.Messaging.CallContext.LogicalGetData(System.String ) in <66c50f4174694147beb2fbedff89d188#c3f844596a550d3270e6f8cf3e1cb01a>
System.Diagnostics.CorrelationManager.get_ActivityId() in <9346215e3717414fb21df612b5dd4279#c3f844596a550d3270e6f8cf3e1cb01a>
Microsoft.Azure.Cosmos.ActivityScope..ctor(System.Guid activityId) in <b59e9dd3c16f4591867b773a543b41c5#c3f844596a550d3270e6f8cf3e1cb01a>
Microsoft.Azure.Cosmos.ClientContextCore.RunWithDiagnosticsHelperAsync[TResult](Microsoft.Azure.Cosmos.Tracing.ITrace trace, System.Func`2[T,TResult] task, System.Func`2[T,TResult] openTelemetry, System.String operationName, Microsoft.Azure.Cosmos.RequestOptions requestOptions) in <b59e9dd3c16f4591867b773a543b41c5#c3f844596a550d3270e6f8cf3e1cb01a>
Microsoft.Azure.Cosmos.ClientContextCore+<>c__DisplayClass31_0`1[TResult].<OperationHelperWithRootTraceWithSynchronizationContextAsync>b__0() in <b59e9dd3c16f4591867b773a543b41c5#c3f844596a550d3270e6f8cf3e1cb01a>
Lealtd.MyPages.WordPage.MyWordPage.ExecuteRefreshCommandAsyncPulled() in <aa0ef9de4404408f83484774998ac15a#c3f844596a550d3270e6f8cf3e1cb01a>
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0(System.Object state) in <66c50f4174694147beb2fbedff89d188#c3f844596a550d3270e6f8cf3e1cb01a>
Foundation.NSAsyncSynchronizationContextDispatcher.Apply() in <c07d1d2ff2fb499fb8eca9a33aeb3c2e#c3f844596a550d3270e6f8cf3e1cb01a>
(wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
UIKit.UIApplication.Main(System.String[] args, System.Type principalClass, System.Type delegateClass) in <c07d1d2ff2fb499fb8eca9a33aeb3c2e#c3f844596a550d3270e6f8cf3e1cb01a>
Lealtd.iOS.Application.Main(System.String[] args) in <3eed6dbecd10466db73945963e82109c#c3f844596a550d3270e6f8cf3e1cb01a>
I have found this link saying that to make cosmos db work I need to pour Linker behaviour to "don't link" - Don't Link required with Cosmos DB SDK V3 on iOS #8948
When I do it I have this error :
Found conflicts between different versions of "System.Numerics.Vectors" that could not be resolved.
There was a conflict between "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
"System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Numerics.Vectors.dll].
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Numerics.Vectors.dll
Project file item includes which caused reference "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Numerics.Vectors.dll".
System.Numerics.Vectors
References which depend on "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Client.dll
Project file item includes which caused reference "/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Client.dll".
/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Client.dll
/Users/x/Documents/Entreprise /MyApps/Leaf/lealtd/lealtd/bin/Release/netstandard2.0/lealtd.dll
/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Core.dll
Project file item includes which caused reference "/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Core.dll".
/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Core.dll
/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Client.dll
/Users/x/Documents/Entreprise /MyApps/Leaf/lealtd/lealtd/bin/Release/netstandard2.0/lealtd.dll
/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Serialization.HybridRow.dll
/Users/x/.nuget/packages/system.text.json/4.6.0/lib/netstandard2.0/System.Text.Json.dll
Project file item includes which caused reference "/Users/x/.nuget/packages/system.text.json/4.6.0/lib/netstandard2.0/System.Text.Json.dll".
/Users/x/.nuget/packages/system.text.json/4.6.0/lib/netstandard2.0/System.Text.Json.dll
/Users/x/.nuget/packages/azure.core/1.19.0/lib/netstandard2.0/Azure.Core.dll
/Users/x/.nuget/packages/microsoft.azure.cosmos/3.31.1/lib/netstandard2.0/Microsoft.Azure.Cosmos.Client.dll
/Users/x/Documents/Entreprise /MyApps/Leaf/lealtd/lealtd/bin/Release/netstandard2.0/lealtd.dll
/Users/x/.nuget/packages/system.memory.data/1.0.2/lib/netstandard2.0/System.Memory.Data.dll
Thanks for your help

Related

Could not load file or assembly Microsoft.VisualStudio.DevOps.Contract

I'm trying to publish a .NET Core (3.1) Web Application for the first time in Visual Studio 2019 and I get the error:
System.BadImageFormatException: Could not load file or assembly 'Microsoft.VisualStudio.DevOps.Contract, Version=15.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'Microsoft.VisualStudio.DevOps.Contract, Version=15.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.BadImageFormatException: Could not load file or assembly 'Microsoft.VisualStudio.DevOps.Contract, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'Microsoft.VisualStudio.DevOps.Contract, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.FetchContinuousDeliveryService()
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.InitializeContinuousDelivery()
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel..ctor(IThreadSwitcher threadSwitcher, IPublishServiceProvider serviceProvider, IVsHierarchy hierarchy, ITelemetryProvider telemetryProvider, IVsWrappersFactory vsWrappersFactory, IReadOnlyList`1 providers, IFeatureManager featureDetectionManager, IProfileController profileController, IDependenciesManagerProvider dependenciesManagerProvider)
at Microsoft.Publish.Framework.Provider.DefaultPublishTabProvider.CreateViewAsync(IVsHierarchy project, IAsyncServiceProvider serviceProvider, CancellationToken cancellationToken)
at Microsoft.Publish.Framework.Provider.PublishProjectDesignerTabProvider.<CreateViewAsync>d__7.MoveNext()
The publish window seems to not be fully drawn out in VS 2019 afterward. Any ideas out there?
I've found an answer to this issue and I'm posting it here. I reinstalled VS2019. I may have missed installing key components during original installation, such as Azure, I'm uncertain on that detail.

Could not load assembly System.Runtime in Xamarin.Forms UWP Project with .NET Standard library

I'm in the process of setting up a Xamarin.Forms app using .NET Standard for the shared library instead of a PCL. I've followed the instructions for doing so laid out here: https://channel9.msdn.com/Shows/XamarinShow/Snack-Pack-15-Upgrading-to-XamarinForms-to-NET-Standard
This is with a brand new Xamarin.Forms app, created using Visual Studio 2017 with a PCL, which was replaced with a .NET Standard library as described in the video.
The UWP app compiles fine, but throws this exception when I try to start it (on the call to Xamarin.Forms.Forms.Init)
System.IO.FileLoadException: 'Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
I've tried specifically adding the nuget package for System.Runtime, version 4.1.0 to the UWP project, but that doesn't seem to help. It runs fine in Android, but keeps giving me this exception running the UWP project. Can anyone tell me what might be causing this and how I can fix it?
edit:
there is a very similar error in the build log:
Could not resolve this reference. Could not locate the assembly "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Followed by an extremely long list of places it has checked.
I also found this, which seems like it may be the problem:
2> There was a conflict between "System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
2> "System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
Does anyone know how I can resolve this conflict?
edit 2:
There's also this in the build logs right after the above, which is even more perplexing, as it seems to indicate the only thing referencing version 4.0.20.0 of System.Runtime is... version 4.3.0 of System.Runtime???
2> References which depend on "System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [C:\Users\Katie.nuget\packages\system.runtime\4.3.0\ref\netcore50\System.Runtime.dll].
2> C:\Users\Katie.nuget\packages\system.runtime\4.3.0\ref\netcore50\System.Runtime.dll
2> Project file item includes which caused reference "C:\Users\Katie.nuget\packages\system.runtime\4.3.0\ref\netcore50\System.Runtime.dll".
2> C:\Users\Katie.nuget\packages\system.runtime\4.3.0\ref\netcore50\System.Runtime.dll

Asp.Net Hosting Issues: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

I worked on an Asp.Net MVC4 application on my personal desktop and trying to host it into a windows server 2012 and IIS8 by remotely logging into it using the normal deployment procedure and Finally When I tried to browse it threw me a server error as follows:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
MvcApplication1.MvcApplication.Application_Start() +0
[HttpException (0x80004005): Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12864673
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722601
May I know where I id a mistake
Simply, you have not deployed necessary assembly references to work on host properly! And it tries to search, perhaps on hosting provider system while is not accessible! Follow these steps to make sure you have added required files due to deployment.
Edit:
Therefore, while this option(add deployable dependencies) still exists in Visual Studio 2010 (and Visual Studio 2010 SP1), it was built into the NuGet Package Manager alongside Visual Studio 2012 so that all required assemblies are automatically bin deployed.
The specific assembly that you're missing in this case is the Web API 2.1 WebHost (or 2.2 now). Just add that using the Nuget Package Console to your project and then rebuild.
Try to add the Web API 2.1 WebHost to your project using the Nuget Package Manager and then rebuild, publish and deploy on IIS.
You can fixed by either of below steps:
Option 1: To Resolve issue you have to move “System.Web.Http.WebHost.dll” file in “bin” folder to IIS. And restart the server to reload everything again. Check the site should work.
Option 2: Follow below steps:
1) Go to “Solution Explorer” in Visula Studio.
2) Right Click on “System.Web.Http.WebHost” in “References” and select properties.
3) Update property “Local Copy” to “True”.
4) Clear and Build again to have DLL in bin folder.
5) Copy the “System.Web.Http.WebHost.dll” file in “bin” folder to IIS.
Application should work.
Source: http://sforsuresh.in/not-load-file-assembly-system-web-http-webhost/

Error when calling webservice: "The type 'System.ComponentModel.INotifyPropertyChanging' is defined in an assembly that is not referenced"

I can call my web service by accessing it in a web browser on the server but when I call it via a Soap client from my test client, I get the following exception:
"The type 'System.ComponentModel.INotifyPropertyChanging' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."
..rest of the stack trace is below.
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
--- End of inner exception stack trace ---
Now I have this System.dll added as a reference in my web service project and it is set to copy to local. That dll isn't in the GAC on the server (but is locally on my development server) - is that going to be the issue?
I have the following section in my web.config:
<add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
I don't get it? If the dll is in the bin folder and that reference is there as well as being added to my project, what is it complaining about?
These are the dlls in my bin folder:
Devart.Data.dll
Devart.Data.Linq.dll
Devart.Data.Oracle.dll
Devart.Data.Oracle.Linq.dll
Oracle.DataAccess.dll
System.ComponentModel.Composition.dll
System.ComponentModel.DataAnnotations.dll
System.Configuration.dll
System.Data.dll
System.Data.Entity.dll
System.dll
System.Runtime.Serialization.dll
System.Web.dll
System.Web.Services.dll
System.Xml.dll
I'm genuinely stumped, does anyone know why I am getting this error?
in your project, look at your references, take a look at the path of the system.dll reference, is the path indicating that you are referencing the GAC version or the bin version? if the path points to the GAC version you will need to remove the reference and re-add the reference to the bin version.

How can I find out why an assembly is required in ASP.Net MVC4 project?

I am trying to deploy my ASP.Net MVC4 application to Azure but it is crashing during deployment. Apparently this is because something is requesting assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' . This all works perfectly locally and is a nightmare to debug on Azure as deployment takes 25-30 minutes for me.
I had thought I had configured CLR to not require MVC3 even if something wanted it by using:
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
If I look at the ObjectBrowser nothing seems to be requiring MVC3. What is the best way to figure out what is requesting it? I have various Nuget packages in the project. I guess one of them is requesting MVC3? Is there anyway to see a list of all dependencies etc?
I get:
CLR exception type: System.Reflection.ReflectionTypeLoadException
"Unable to load one or more of the requested types. Retrieve the
LoaderExceptions property for more information."
Microsoft.WindowsAzure.ServiceRuntime Critical: 201 : ModLoad:
000007fc906a0000 000007fc907a9000
D:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll Role
entrypoint could not be created: System.TypeLoadException: Unable to
load the role entry point due to the following exceptions:
-- System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040) File name:
'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property
for more information. at
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at
System.Reflection.RuntimeModule.GetTypes() at
System.Reflection.Assembly.GetTypes() at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly
entryPointAssembly) --- End of inner exception stack trace ---
at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly
entryPointAssembly) at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.CreateRoleEntryPoint(RoleType
roleTypeEnum) at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType
roleTypeEnum) ModLoad: 000007fca2f00000 000007fca2f96000
D:\Windows\SYSTEM32\clbcatq.dll ntdll!ZwTerminateProcess+0xa:
000007fc`a2fa2eaa c3 ret
and
Exception object: 00000000017e0070 Exception type: System.TypeLoadException Message: Unable to load the role
entry point due to the following exceptions:
-- System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040) File name:
'System.Web.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
InnerException: System.Reflection.ReflectionTypeLoadException, Use
!PrintException 00000000017dcf08 to see more. StackTrace (generated):
StackTraceString: HResult: 80131522
You can use Reflector to load the Nuget packages and look at their dependencies. Should be fairly easy to spot whether one is dependent upon MVC3. Your assembly binding looks fine though. Do you have multiple projects in your solution? Could one of those be taking a dependency on a Nuget package that depends on MVC3?
This post may help: How can I build a 'dependency tree diagram' from my .NET solution

Resources