question

ThangachamyMaruthaiah-0158 avatar image
0 Votes"
ThangachamyMaruthaiah-0158 asked YijingSun-MSFT answered

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

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.

dotnet-aspnet-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YijingSun-MSFT avatar image
0 Votes"
YijingSun-MSFT answered

Hi @ThangachamyMaruthaiah-0158 ,
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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.