Example is not working as expected #376

Closed
opened 2025-12-29 08:27:09 +01:00 by adam · 6 comments
Owner

Originally created by @devmariodiaz on GitHub (Oct 25, 2021).

Hello Stef,

Thanks for all your help.

I want to report to you, that this example that you provide me some days ago is not working, is not taking the launchsettings.json parameters, is taking default parameters.

dc078b57ea/examples/WireMock.Net.StandAlone.NETCoreApp

Screen Shot 2021-10-25 at 4 25 47 PM

Could you please to take a look at this?

Originally created by @devmariodiaz on GitHub (Oct 25, 2021). Hello Stef, Thanks for all your help. I want to report to you, that this example that you provide me some days ago is not working, is not taking the launchsettings.json parameters, is taking default parameters. https://github.com/WireMock-Net/WireMock.Net/tree/dc078b57ea463e2c9c7da7f6579af34000596446/examples/WireMock.Net.StandAlone.NETCoreApp ![Screen Shot 2021-10-25 at 4 25 47 PM](https://user-images.githubusercontent.com/54611419/138774319-344c096a-4721-4d42-a3fc-0df4212f0839.png) Could you please to take a look at this?
adam added the bug label 2025-12-29 08:27:09 +01:00
adam closed this issue 2025-12-29 08:27:09 +01:00
Author
Owner

@StefH commented on GitHub (Oct 26, 2021):

When running in VS2022, this works fine for me:
image

@StefH commented on GitHub (Oct 26, 2021): When running in VS2022, this works fine for me: ![image](https://user-images.githubusercontent.com/249938/138842844-9f4de4cb-5c83-4353-b225-3ce09eca9031.png)
Author
Owner

@devmariodiaz commented on GitHub (Oct 26, 2021):

Thanks, Stef,

I wonder, Maybe because I'm running it on mac OS? Could have any environment configuration difference?

@devmariodiaz commented on GitHub (Oct 26, 2021): Thanks, Stef, I wonder, Maybe because I'm running it on mac OS? Could have any environment configuration difference?
Author
Owner

@StefH commented on GitHub (Oct 26, 2021):

What happens if you run dotnet run command? Like:

dotnet run --framework netcoreapp3.1 -- --Urls http://localhost:12345

Result at my windows pc:

PS C:\Dev\GitHub\WireMock.Net\examples\WireMock.Net.StandAlone.NETCoreApp> dotnet run --framework netcoreapp3.1 -- --Urls http://localhost:12345
2021-10-26 18:17:01,031 [1] DEBUG Program - WireMock.Net server arguments ['--Urls', 'http://localhost:12345']
2021-10-26 18:17:01,106 [1] INFO  Program - By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)
2021-10-26 18:17:01,347 [1] DEBUG Program - Server settings {
  "Port": null,
  "UseSSL": null,
  "StartAdminInterface": true,
  "ReadStaticMappings": false,
  "WatchStaticMappings": false,
  "WatchStaticMappingsInSubdirectories": false,
  "ProxyAndRecordSettings": null,
  "Urls": [
    "http://localhost:12345"
  ],
  "StartTimeout": 10000,
  "AllowPartialMapping": false,
  "AdminUsername": null,
  "AdminPassword": null,
  "AdminAzureADTenant": null,
  "AdminAzureADAudience": null,
  "RequestLogExpirationDuration": null,
  "MaxRequestLogCount": null,
  "AllowCSharpCodeMatcher": false,
  "AllowBodyForAllHttpMethods": false,
  "AllowOnlyDefinedHttpStatusCodeInResponse": false,
  "DisableJsonBodyParsing": false,
  "DisableRequestBodyDecompressing": null,
  "HandleRequestsSynchronously": false,
  "ThrowExceptionWhenMatcherFails": false,
  "CertificateSettings": null,
  "CustomCertificateDefined": false,
  "WebhookSettings": null
}
2021-10-26 18:17:01,474 [1] INFO  Program - Server using .NET Core 3.1
26-10-2021 16:17:01 Press Ctrl+C to shut down
26-10-2021 16:17:01 WireMock.Net server running : True
@StefH commented on GitHub (Oct 26, 2021): What happens if you run dotnet run command? Like: ``` cmd dotnet run --framework netcoreapp3.1 -- --Urls http://localhost:12345 ``` Result at my windows pc: ``` cmd PS C:\Dev\GitHub\WireMock.Net\examples\WireMock.Net.StandAlone.NETCoreApp> dotnet run --framework netcoreapp3.1 -- --Urls http://localhost:12345 2021-10-26 18:17:01,031 [1] DEBUG Program - WireMock.Net server arguments ['--Urls', 'http://localhost:12345'] 2021-10-26 18:17:01,106 [1] INFO Program - By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net) 2021-10-26 18:17:01,347 [1] DEBUG Program - Server settings { "Port": null, "UseSSL": null, "StartAdminInterface": true, "ReadStaticMappings": false, "WatchStaticMappings": false, "WatchStaticMappingsInSubdirectories": false, "ProxyAndRecordSettings": null, "Urls": [ "http://localhost:12345" ], "StartTimeout": 10000, "AllowPartialMapping": false, "AdminUsername": null, "AdminPassword": null, "AdminAzureADTenant": null, "AdminAzureADAudience": null, "RequestLogExpirationDuration": null, "MaxRequestLogCount": null, "AllowCSharpCodeMatcher": false, "AllowBodyForAllHttpMethods": false, "AllowOnlyDefinedHttpStatusCodeInResponse": false, "DisableJsonBodyParsing": false, "DisableRequestBodyDecompressing": null, "HandleRequestsSynchronously": false, "ThrowExceptionWhenMatcherFails": false, "CertificateSettings": null, "CustomCertificateDefined": false, "WebhookSettings": null } 2021-10-26 18:17:01,474 [1] INFO Program - Server using .NET Core 3.1 26-10-2021 16:17:01 Press Ctrl+C to shut down 26-10-2021 16:17:01 WireMock.Net server running : True ```
Author
Owner

@devmariodiaz commented on GitHub (Oct 26, 2021):

This is happening when I use the Run button through Visual Studio 2019 for mac OS, I'm just trying to execute this one using a Windows machine.

@devmariodiaz commented on GitHub (Oct 26, 2021): This is happening when I use the Run button through Visual Studio 2019 for mac OS, I'm just trying to execute this one using a Windows machine.
Author
Owner

@StefH commented on GitHub (Oct 27, 2021):

OK, please try a Windows machine.

In your case it seems that the whole start-profile is not recognized.

Pressing the ">" button on windows shows this:
image

@StefH commented on GitHub (Oct 27, 2021): OK, please try a Windows machine. In your case it seems that the whole start-profile is not recognized. Pressing the ">" button on windows shows this: ![image](https://user-images.githubusercontent.com/249938/139055627-f95b6297-ba66-4f43-bd00-dd813f0b7f91.png)
Author
Owner

@StefH commented on GitHub (Nov 28, 2021):

Closing...

@StefH commented on GitHub (Nov 28, 2021): Closing...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#376