Closed RobertoMachorro closed 1 week ago
@RobertoMachorro is there any reason for using custom launch configurations instead of selecting the startup project from the language status menu?
When you open the solution with a MAUI project, and then open a .cs or .csproj file in the editor, you should see {}
in the right side of the status bar. See https://learn.microsoft.com/dotnet/maui/get-started/first-app?pivots=devices-windows&view=net-maui-9.0&tabs=visual-studio-code#choose-your-target-device.
Thanks @emaf for your quick response.
I believe I had misunderstood the process, but based on what you said, the following worked for me:
I select the Target and Startup Project in the {} popup menu, and then hit F5, I get taken to the Run and Debug panel, I go through the prompts and it forces me to generate a launch.json. Rather than add all the stuff I had before, I went with the auto-generated config below:
{
"configurations": [
{
"name": ".NET MAUI",
"type": "maui",
"request": "launch",
"preLaunchTask": "maui: Build"
}
]
}
At that point, anything I have in the {} popup menu (Target, Startup Project, Debug/Release) is what runs when I hit F5. Many thanks! 🙏
@emaf, the 'needs-more-info' label has been removed upon receiving further response from the original bug filer.
I have two projects and both are in a solution file. I'd like to launch one by selecting it and release/debug. I have the configuration file below. When selecting any of the entries and starting, nothing happens in VSCode. When I remove the "project" property from any of the configurations, only the first project builds and runs.