Could not load file or assembly 'netstandard, Version=2.0.0.0 On Build Server #137

Closed
opened 2025-12-29 14:23:23 +01:00 by adam · 4 comments
Owner

Originally created by @gifthove on GitHub (Aug 31, 2018).

I have this issue on my Jenkins build server "System.BadImageFormatException : Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)". To give you context, i have a unit testing project with .Net Framework 4.6.1 and i am using Wiremock for stubbing out an API. So the error occurs when starting the stub server _"this.stubServer = FluentMockServer.Start();" On the build server i have ASP.NET Core/.NET Core: Runtime & Hosting Bundle installed. What could be the issue?

Originally created by @gifthove on GitHub (Aug 31, 2018). I have this issue on my Jenkins build server _"System.BadImageFormatException : Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)"_. To give you context, i have a unit testing project with .Net Framework 4.6.1 and i am using Wiremock for stubbing out an API. So the error occurs when starting the stub server _"this._stubServer = FluentMockServer.Start();_" On the build server i have ASP.NET Core/.NET Core: Runtime & Hosting Bundle installed. What could be the issue?
adam closed this issue 2025-12-29 14:23:23 +01:00
Author
Owner

@StefH commented on GitHub (Aug 31, 2018):

This issue is new for me.

Are you running the build on a non-windows machine?

@StefH commented on GitHub (Aug 31, 2018): This issue is new for me. Are you running the build on a non-windows machine?
Author
Owner

@gifthove commented on GitHub (Sep 2, 2018):

Our build server is windows 2012 Server.

@gifthove commented on GitHub (Sep 2, 2018): Our build server is windows 2012 Server.
Author
Owner

@StefH commented on GitHub (Sep 6, 2018):

I don't have a clue what's wrong here. Do you still have this issue?

@StefH commented on GitHub (Sep 6, 2018): I don't have a clue what's wrong here. Do you still have this issue?
Author
Owner

@StefH commented on GitHub (Oct 12, 2018):

Closing this issue.

If you still have an problem, please comment and re-open this one.

@StefH commented on GitHub (Oct 12, 2018): Closing this issue. If you still have an problem, please comment and re-open this one.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#137