WireMock standalone and Linqpad #600

Closed
opened 2025-12-29 08:30:46 +01:00 by adam · 2 comments
Owner

Originally created by @asherber on GitHub (May 14, 2024).

Originally assigned to: @StefH on GitHub.

Has anyone had success running WireMock as a standalone process in Linqpad?

I'm using Linqpad 7 with .net 7, and StandAloneApp.Start(args); gives me:

FileNotFoundException: Could not load file or assembly
'Microsoft.Extensions.DependencyInjection.Abstractions, Version=7.0.0.0, Culture=neutral,
PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

I've tried playing with the "Copy all assemblies into local output folder" and "Use a non-collectible load context" settings, since those sometimes clear up issues, but no luck.

Originally created by @asherber on GitHub (May 14, 2024). Originally assigned to: @StefH on GitHub. Has anyone had success running WireMock as a standalone process in Linqpad? I'm using Linqpad 7 with .net 7, and `StandAloneApp.Start(args);` gives me: ``` FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified. ``` I've tried playing with the "Copy all assemblies into local output folder" and "Use a non-collectible load context" settings, since those sometimes clear up issues, but no luck.
adam added the question label 2025-12-29 08:30:46 +01:00
adam closed this issue 2025-12-29 08:30:46 +01:00
Author
Owner

@StefH commented on GitHub (May 15, 2024):

I can also confirm that for LINQPad 6, the same issue. I'm not sure yet if this is an issue for WireMock or for LINQPad.

@StefH commented on GitHub (May 15, 2024): I can also confirm that for LINQPad 6, the same issue. I'm not sure yet if this is an issue for WireMock or for LINQPad.
Author
Owner

@asherber commented on GitHub (May 15, 2024):

Solution: In the Linqpad Query Properties window (F4), you need to check "Reference ASP.NET Core".

image

Maybe add a note about this to the docs?

@asherber commented on GitHub (May 15, 2024): **Solution:** In the Linqpad Query Properties window (F4), you need to check "Reference ASP.NET Core". ![image](https://github.com/WireMock-Net/WireMock.Net/assets/5248041/6f8606dd-5c58-4b18-a5a0-c5fdf4eb0087) Maybe add a note about this to the [docs](https://github.com/WireMock-Net/WireMock.Net/wiki/WireMock-as-a-standalone-process)?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#600