Why not able to load netstandard.dll when creating new window service with SignalR assembly?

Thangachamy Maruthaiah 1 Reputation point
2021-06-21T14:51:04.073+00:00

We had conversion feature in our application. Which feature refers core library which linked with netstandard.dll.
When we creating new window service by using SignalR and placing the library file in same bin folder, facing the below error.

Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

But, When placing newly created service library file into separate folder, there is no issue. Application is working as expected.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,506 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,086 Reputation points
    2021-06-22T05:50:42.323+00:00

    Hi @Thangachamy Maruthaiah ,
    The netstandard.dll you are trying to load is a reference assembly that which cannot be loaded for runtime on .NET Framework as pointed out by others. However if you need to resolve that dependency you will need to runtime version that maps to the framework you are trying to run on.
    More details,you could refer to below article:
    https://stackoverflow.com/questions/45021965/could-not-load-file-or-assembly-netstandard-version-2-0-0-0-reference
    Best regards,
    Yijing Sun


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.