I am using PRISM for Silverlight 4.0 in one of my projects where I also access Sharepoint 2010.
The strange thing is that randomly I get the error:
An exception occurred while initializing module 'SharepointServiceModule'.
- The exception message was: Die Methode add_GetListCompleted im Typ SharepointServiceModule.Services.SharepointObjectModelService der Assembly SharepointServiceModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null hat keine Implementierung.
- The Assembly that the module was trying to be loaded from was:SharepointServiceModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.
Which is very strange for me because first of all it happens only randomly and second that the method "add_GetListCompleted" is an event which must be implemented because I use it and it works.
Does anybody have an idea of whats going on here?
I found a solution for my problem.
First I tried to change the name of the interface and I noticed that the interface name did not change in the error message.
Therefore I removed the affected xap module from the Web project (this can be done in the properties of the "name.Web" project under "Silverlight Applications") and added it again. Then I performed a clean of the solution and a rebuild. After that everthing worked fine...
Related
i have created one library using .net standard , am trying to use that in .net core api ,
but am getting error -
Error constructing handler for request of type MediatR.IRequestHandler`2[]. Register your handlers with the container. See the samples in GitHub for examples.
inner exception -
Could not load file or assembly 'RedisHelper.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
my mediatr injection as follow -
services.AddMediatR(Assembly.GetExecutingAssembly());
my class DI -
services.AddTransient<IRedisClient, RedisClient>();
can any one suggest me what i am missing here .
Thanks
Error constructing handler for request of type
MediatR.IRequestHandler`2[]. Register your handlers with the
container. See the samples in GitHub for examples.
inner exception - Could not load file or assembly 'RedisHelper.Client,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system
cannot find the file specified.
As the exception message said, could not load the RedisHelper.Client assembly. Please check your .net core application and the .net standard library, where you add this assembly? Please ensure it adds success, you could also try to re-install it.
Besides, if you add the RedisHelper.Client assembly in the library, you should also add it in the .net core application.
While my .NET Core application is running, I noticed the following line:
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. System.TypeLoadException: Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
I'm just curious what's causing this error because my apps is still running fine despite the error message.
By the way, I'm using .NET Core 2.0.0 Preview 1 version.
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware is just the middleware catching exceptions when nothing else in your program did
So your "real" exception is
Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, ...' does not have an implementation
By doing some googling with this exception, it seems to get down to support of your .Net Core version vs your EF Provider
If you want more information, you can:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-2.1#the-developer-exception-page Enable Developer Exception pages
Log more information from EF (https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1#add-providers => enable in trace mode will get you more information)
I am starting to explore Application Insights and tried adding it to my Windows Phone 8.1 app. While trying to execute the project, an exception is thrown on load within Public Sub New() in App.xaml.vb. The line where the error happens is
TelemetryClient = new TelemetryClient()
The exception thrown is
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.ni.dll
An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: Exception has been thrown by the target of an invocation.
Innerexception details:
{System.InvalidOperationException: Type 'Microsoft.ApplicationInsights.Extensibility.ComponentContextInitializer, Microsoft.ApplicationInsights, Version=0.16.1.418, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not implement the required interface
Microsoft.ApplicationInsights.Extensibility.IContextInitializer.
at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.CreateInstance(Type interfaceType, String typeName)
at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadInstance(XElement definition, Type expectedType, Object instance)
at Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryConfigurationFactory.LoadInstances[T](XElement definition, ICollection`1 instances)}
I followed the steps outlined in the Azure documentation. What may I be doing wrong?
Are you using a Windows Phone app on top of Windows Runtime or on top of Silverlight?
If you remove the following line from ApplicationInsights.config, does your app start successfully?
<Add Type="Microsoft.ApplicationInsights.Extensibility.ComponentContextInitializer, Microsoft.ApplicationInsights"/>
Turns out it was a corrupted solution. I had added the nuget and then added the Application Insights. In between I had upgraded the nugget package to the 0.16 pre-release version. In effect it had created multiple references. So I ended up manually clearing all entries of Microsoft.ApplicationInsights in package.config and .vbproj. I also removed all the references and referenced the whole thing again. Now it works like a charm!
In Visual Studio 2013, I've set up a WCF Application. My setup is exactly like the example posted at https://github.com/ninject/Ninject.Extensions.Wcf/tree/master/src/Examples. When I try to import my service reference from another project, I get the error below. I have have added Ninject.Extensions.Factory to the WCF project (and the referencing project) using Nuget, and still get the same error.
Warning 1 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'Ninject.Extensions.Factory, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7' or one of its dependencies. The system cannot find the file specified.
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IEnrollmentService'] C:\...\Reference.svcmap 1 1
When importing the Service Reference, click the Advanced button, then uncheck "reuse types in referenced assemblies".
After adding ILMerge to my post build tasks and working out the commandline, I sucessfully get a merged program MyMerged.exe
But when I run it, I get an exception
Unhandled Exception: System.TypeLoadException:
Could not load type 'Microsoft.Build.Utilities.TaskItem' from assembly 'mymerged, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because the method '.ctor' has no implementation (no RVA).
at MyProgram.Program.Main(String[] args)
Is this a bug in ILMerge not handling a situation where there is no constructor, or a bug in TaskItem for not having one.
thanks
Include Microsoft.Build.Utilities.dll on the ILMerge command line so that it will get merged in with your assembly and found.
If you have duplicate types defined and use the /allowDup command line switch, ILMerge will rename the duplicate types and this may also cause "Could not load type ..." errors and unexpected behavior during runtime, especially when reflection is being used.