Reference non-core dll from core app
-
We are using a group of third party webservice dlls in our apps. I have been trying to develop a .Net Core version of an app, but as soon as it hits the non-core dll, it throws an error loading one of it's dependencies.
Quote:
System.BadImageFormatException: 'Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)'
I have no control of the webservice source, so I can't develop a core library. With all the push for Core, I find it hard to believe nobody has found a fix for this. There are a ton of third party libraries out there.
-
We are using a group of third party webservice dlls in our apps. I have been trying to develop a .Net Core version of an app, but as soon as it hits the non-core dll, it throws an error loading one of it's dependencies.
Quote:
System.BadImageFormatException: 'Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)'
I have no control of the webservice source, so I can't develop a core library. With all the push for Core, I find it hard to believe nobody has found a fix for this. There are a ton of third party libraries out there.
System.Web.Services
predate even WCF, and WCF is now being deprecated in favor of .NET Core, gRPC and ASP.NET Core. Microsoft is no longer interested in maintaining legacy technology like Web Services, Web Forms, Web Pages, etc. If you use one of them, at least maintain an instance of legacy code as a bridge between .NET Core and other frameworks. [System.Web.Services namespace in .net core - Stack Overflow](https://stackoverflow.com/questions/36544471/system-web-services-namespace-in-net-core) Try this thread on GitHub for WCF, [How to use wsdl service in Asp .net core 2.0 Api Project? · Issue #2819 · dotnet/wcf · GitHub](https://github.com/dotnet/wcf/issues/2819) [Add WCF Web Service Reference - .NET Core | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide)The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
We are using a group of third party webservice dlls in our apps. I have been trying to develop a .Net Core version of an app, but as soon as it hits the non-core dll, it throws an error loading one of it's dependencies.
Quote:
System.BadImageFormatException: 'Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)'
I have no control of the webservice source, so I can't develop a core library. With all the push for Core, I find it hard to believe nobody has found a fix for this. There are a ton of third party libraries out there.
I had to dump all that stuff from System.Web.Services and rewrite new ones in the Core format. Frustrating at first but now easy to understand how Core works now. No regrets, my new stuff is better and faster. But I've manage to find a qualified NuGet package to replace some items like System.Drawing.Common, just took time for research and testing to qualify them which was time consuming. And I found better solutions in other packages.
If it ain't broke don't fix it Discover my world at jkirkerx.com