I am using Pomelo 1.1.2 on ASP.NET Core 2.0 Preview, along with EF 2.0 Preview. With their demo code, I get the following exception every time I call "UseMySql": System.TypeLoadException occurred HResult=0x80131522 Message=Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Internal.MySqlOptionsExtension' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=1.1.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. Source=<Cannot evaluate [...] read more
I am trying to dynamically load a .NET Core DLL containing an ASP.NET Core's Startup class. I then want to instantiate the Startup class and hand it over to the TestHost API, so I can start the site in memory. I've written the following code: var directoryPath = @"C:\Dlls"; var [...] read more
First of all, sorry for this extra descriptive question. I was implementing my own assembly rather calling anything from GAC! I started with a Class Library project in Visual C# 2010 Express edition. The file Class1.cs looked very simple as: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Sample [...] read more
I am getting the error Msg 6512, Level 16, State 27, Line 6 Failed to initialize the Common Language Runtime (CLR) v2.0.50727 with HRESULT 0x80131522. You need to restart SQL Server to use CLR integration features. i am using SQL Server 2008 R2 Edition with windows 7. This error occur [...] read more
I was trying to use NReco.VideoConverter.dll assembly in my .NET CORE 2.0 but FFMpegConverter instance is not created. I am getting below exception. Can you look into this and guide me how can I make an instance of FFMpegConverter using NReco.VideoConverter.dll and its version is 1.1.2. > system.TypeLoadException occurred HResult=0x80131522 [...] read more
There's a project which was migrated from .NET 3.5 to .NET 4.0. The project has some references to .NET 1.0 assemblies, which are wrappers around COM objects. These .NET 1.0 assemblies and COM objects are product of an external company. The project compiles, but during runtime the first point when [...] read more
Hi I am trying to use DotNetRDf.Query.FullText in .Net core 3.1 to create Lucene indexer but getting below run time exception. Can you please help to resolve this issue? > System.TypeLoadException HResult=0x80131522 Message=Could not load type > 'MaxFieldLength' from assembly 'Lucene.Net, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=85089178b9ac3181'. Sample Code: var indexer = [...] read more
Implementing serilog into our project. We already have AspNetCoreRateLimit implemented to thorttle calls to the API. The project is a .Net Core project but build targeting Net461 due to some dependencies. Prior to serilog the api was fine. Now having installed serilog we are getting an error. The error bubbles [...] read more
I'm trying to host a Signalr hub in my .NET Core 3.0 console application. What I coded is as follows. When I run I got "GetStreamItemType does not have implementation" exception. static void Main(string[] args) { BuildWebHost(args).Run(); } public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args).UseStartup<Startup>().Build(); public class Startup { public [...] read more
Setup While trying to create a static object at the translation unit scope in a C++/CLI wrapper for a native C++ lib, I ran into an issue with using the auto keyword. The C++/CLI wrapper is purely functional so I was in need of using a ConcurrentDictionary to hold some [...] read more
I followed the docs telling me that since version 2.1, I can do the following. services.AddDbContext<Context>(c => c .UseLazyLoadingProxies() .UseSqlServer(...)); It doesn't work throwing the exception below. Commenting out the UseLazyLoadingProxies part makes it function properly, it's the laziness that's to blame). > System.TypeLoadException HResult=0x80131522 Message=Method 'get_Info' in type > [...] read more
I'm upgrading my web application from the .NET Framework version of ASP.NET MVC to ASP.NET Core. I've worked through all of the C# and Razor build errors, and now I'm trying to run the application for the first time. When I make any calls into MongoDB's C# driver: public static [...] read more
I try to add SqlGeography to my model and when I call create table I got weird error. First I add this package: Microsoft.SqlServer.Types Then I create my model like example at below: public class Locations { public int Id { get; set; } public string Name { get; set; [...] read more
With the risk to fall into too specific question... Given a C++ MFC (mixed, not shaked) project compiled with /CLR, I have 200 classes already defined. When I add a new empty class to this project, an error raises when I compile and execute in debug mode. > An unhandled [...] read more
In some measure of progress since my last question I have got the following project to compile. It is based on https://stackoverflow.com/a/10949784/846550 However at runtime the call to CoCreateInstance fails. The HRESULT is 0x80131522 - google for this and most hits seem to relate to SQL server which I am [...] read more
I need to call a .Net Class Library from a vbscript application I have written a C# class library and created a COM DLL component and a type library file I have successfully registered the dll and tlb on my local computer using C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe "C:\user\Visual Studio 2008\Projects\[Sample]\[Sample]\bin\Debug\[Sample].dll" /tlb "C:\user\Visual Studio [...] read more
I'm attempting to execute the following: var builder = services.AddIdentityServer( options => { options.IssuerUri = "https://boo.com"; }) .AddExtensionGrantValidator<LPDelegationGrantValidator>() .AddProfileService<ONBProfileService>() .AddOperationalStore(options => { options.ConfigureDbContext = b => { b.UseSqlServer(connectionString, db => db.MigrationsAssembly(migrationsAssembly)); }; }) .AddConfigurationStore(options => { options.ConfigureDbContext = b => { b.UseSqlServer(connectionString, db => db.MigrationsAssembly(migrationsAssembly)); }; }); This used to [...] read more
I have written basic simple query which was working before when I was using .net core 2.2 (I have used linq2db.EntityFrameworkCore) projectContext.DocumentAnnotation.ToLinqToDBTable().InsertWithIdentity(() => new DocumentAnnotation { Name = name, ParentId = parentId })) after upgrade It to .net core 3.0 I am getting below error. System.TypeLoadException HResult=0x80131522 Message=Could not load [...] read more
We're working on a programme for an internship but lacking an expert in C++/CLI. The programme compiles and works in release. The programme compiles in debug but on launch crashes with this error: > Additional information: Could not load file or assembly ', Version=0.0.0.0, > Culture=neutral, PublicKeyToken=null' or one of [...] read more
I have read-only access to a database that was set up for a third-party, closed-source app. Once group of (hopefully) useful table functions only returns the error: > Failed to initialize the Common Language Runtime (CLR) v2.0.50727 with HRESULT > 0x80131522. You need to restart SQL server to use CLR [...] read more
I migrated the project from .NET Framework to .NET Core, by creating a new project, importing the code and installing dependencies. Everything has gone well, except for the API component.Previously I used System.Web.Http.Selfhost, however now when I try to run the program I get the following exception: > System.TypeLoadException HResult=0x80131522 [...] read more
I have a working ASP.Net Core application with SQL Server and Entity Framework. I use DI to inject the database context. The solution has a web project and a data project. I am looking to move to MySql and have made some small changes to the code. Running the application [...] read more
I am getting the following when trying to implement Azure Key Vault Secret from a stateless service fabric works just fine from a console app. System.TypeLoadException HResult=0x80131522 Message=Inheritance security rules violated by type: 'System.Net.Http.WebRequestHandler'. Derived types must either match the security accessibility of the base type or be less accessible. [...] read more
I want to use a class name sting to new a class NameSpace is Mcs.ControlMaster Class Name is HostTransportCommand after check some posts here. I use Activator var msg = Activator.CreateInstance(Type.GetType("Mcs.ControlMaster.HostTransportCommand", true)); got exception System.TypeLoadException HResult=0x80131522 Message=Could not load type 'Mcs.ControlMaster.HostTransportCommand' from assembly 'Mcs.ControlMaster.UT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Source=<Cannot evaluate the [...] read more
I connected the application to the database I am using. With the old version of MVC5 application can access this database and repository. I made ASP.NET CORE 3.1 to talk to the repository and I am getting this error as below. Error > System.TypeLoadException HResult=0x80131522 Message=Method 'GetEntityStaticMetaData' in type 'CDS.DataAccessLayer.EntityClasses.AddressEntity' [...] read more
I am using the same code in .Net Core 3.0 preview without any problem. After updating to Core 3.0 final release, I got this error: > System.TypeLoadException HResult=0x80131522 Message=Method 'get_Info' in type > 'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension' > from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=3.0.0.0, > Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an > implementation. The line [...] read more
I'm developing an Android/iOS/UWP Xamarin.Forms app. The last weeks I worked mainly on the Android/iOS apps. Now, I want to start my app again in UWP and get the error: System.TypeLoadException HResult=0x80131522 Message=Could not find Windows Runtime type 'Microsoft.Graphics.Canvas.UI.Xaml.CanvasImageSource'. Source=Xamarin.Forms.Platform.UAP StackTrace: at Xamarin.Forms.Platform.UWP.ImageRenderer.GetDesiredSize(Double widthConstraint, Double heightConstraint) at Xamarin.Forms.Platform.UWP.Platform.GetNativeSize(VisualElement element, Double [...] read more
I have a class in ASP.Net framework 4.6 SessionHelper Code of class is as follow using System; using System.Web; using MyPortal.Common.Entity; using MyPortal.Common.Helper; namespace MyPortal.BusinessLayer.Helper { public static class SessionHelper { public static User GetLoggedInUser { get { return (User) GetFromSession(User.SESSION_LOGGEDIN_USER); } } public static User GetLoggedInExternalUser { get { [...] read more
We want to call a C++ function in a x64 application: https://www.inventcom.net/fanuc-focas-library/misc/cnc_diagnoss We need to pass a ODBDGN struct to the function. This struct has an union in it so in c# we cannot defined union we need to do this: [StructLayout(LayoutKind.Explicit, Pack=4)] public class ODBDGN { [FieldOffset(0)] public short [...] read more
I'll explain my use case that I'm trying to solve which will give you clear picture of what I need? We have a web service hosted on a device and I'm able to consume the API's exposed by the service through the wsdl files that they share. But for some [...] read more
I am hosting a .NET 1.1 application on IIS7 while browsing my application i am getting an error in application event logs. > Failed to execute request because the App-Domain could not be created. Error: > 0x80131522 Event ID : 1088 Source : ASP.NET 2.0.50727.0 I'm running windows server 2008 [...] read more
I am facing an issue with Visual Studio 2015. When I click on new project/add new file, I get an error message. I get this error even for clicking few menu items. Error when click on new project [https://i.stack.imgur.com/Ht6nG.png] > Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an > exception. I even get [...] read more
I have a big legacy C++/MFC application which is being extended via a C# class library. There's a C++/CLI wrapper for this so the legacy program doesn't need CLR support turned on, but with that it is impossible to debug through the managed code while running the native project. Turning [...] read more
I have an ASP.net MVC Web application running on .Net Framework v4.6.1 which is referring library project, which, in turn is referring to the Nuget package 'Microsoft.TeamFoundationServer.ExtendedClient' v14.89.0. This package depends on the Nuget package 'Microsoft.VisualStudio.Services.Client' v14.89.0, among others. Today, I upgraded the 'TeamFoundationServer.ExtendedClient' to v15.112.1 (latest stable) which in [...] read more
I'm trying to make a .NET Core 2.0 console application work with a MySQL database using Entity Framework. I've tried both the Oracle ( https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore/ ) and Pomelo ( https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql ) connectors and both of them throw a TypeLoadException: Oracle Exception: System.TypeLoadException occurred HResult=0x80131522 Message=Method 'Clone' in type 'MySQL.Data.EntityFrameworkCore.Infraestructure.Internal.MySQLOptionsExtension' from [...] read more
I am trying to expose a COM Event Source from C#. I have the following event interface that is imported from a TLB: [Guid("AAAABBBB-CCCC-DDDD-EEEEFFFFAAAA")] [InterfaceType(2)] [TypeLibType(4096)] public interface _IFooEvents { [DispId(20)] void FooEvent(int Value); // Remainder of elements omitted for brevity } I'm attempting to implement this event interface as [...] read more
I am building a Windows Store App using a brokered component. The brokered component is meant to enable interaction with an RFID reader on the device. When I try to initialize an instance of the class exposed by the brokered component, I received a System.TypeLoadException with the message Could not [...] read more
I have a project in MFC that uses a WPF user control targeting .NET 4.0. When I run the program I get the following exception > An unhandled exception of type 'System.IO.FileLoadException' occurred in > Unknown Module. > > Additional information: Could not load file or assembly 'MyProject' , > [...] read more
SITUATION I'm using ngen to create native images of my assemblies during the installation. This worked fine until recently and I've no idea what broke it. Sadly the ngen output isn't very helpful. It just says that it couldn't find or load a type, but doesn't say which type. What's [...] read more
A short while back i had to display the current version of our Silverlight app. After some googling the following code gave me the desired result: var fileVersionAttributes = typeof(MyClass).Assembly. GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false) as AssemblyFileVersionAttribute[]; var version = fileVersionAttributes[0].Version; This worked a treat in our .NET 3.5 Silverlight 3 environment. However, [...] read more
2nd Edit: I have found a MS log viewer, which does not enlighten me. Here is what it shows: *** Assembly Binder Log Entry (10/15/2020 @ 4:09:38 PM) *** The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running [...] read more
Here are some details of my app and the error I am getting: .NetCore Version : 2.0 Exception File name : Startup.cs line number : 41 UseWebpackDevMiddleware() Package Reference: <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" /> <PackageReference Include="Microsoft.PowerBI.Api" Version="2.0.12" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.3" /> Stack trace: System.TypeLoadException HResult=0x80131522 Message=Could [...] read more