Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Reference non-core dll from core app

Reference non-core dll from core app

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netdotnetannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Richard Jones
    wrote on last edited by
    #1

    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.

    A J 2 Replies Last reply
    0
    • R Richard Jones

      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.

      A Offline
      A Offline
      Afzaal Ahmad Zeeshan
      wrote on last edited by
      #2

      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 !~

      1 Reply Last reply
      0
      • R Richard Jones

        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.

        J Offline
        J Offline
        jkirkerx
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups