Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

298
Vistas
Visual studio WLS2 debugging and command line argument

Im trying to debug a .net core console application in visual studio 2019 and WLS2. The console application requires a command line argument at startup.

This my launchSettings.json

{
  "profiles": {
    "ConsoleApp": {
      "commandName": "Project",
      "commandLineArgs": "--s",
    },
    "WSL 2": {
      "commandName": "WSL2",
      "commandLineArgs": "--s",
      "distributionName": ""
    }
  }
}

Starting the debug session with "ConsoleApp" profile the application console get the argument "--s" as expected, but executing the debug in WSL with "WSL 2" profile I get the following message:

Unknown option: --s

.NET Core SDK (3.1.404)

Usage: dotnet [runtime-options] [path-to-application] [arguments]
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The commandLineArgs for WSL2 when not provided is defaulted to the name of the dll. When you provide one explicitly you must also provide the dll name along with the arguments. If your project name is MyNamespace.MyProject, update your launchsettings as follows:

"WSL 2": {
  "commandName": "WSL2",
  "commandLineArgs": "MyNamespace.MyProject.dll --s",
  "distributionName": ""
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda