New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support dotnet watch in launchSettings.json #1067

Closed
RehanSaeed opened this Issue Mar 12, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@RehanSaeed

RehanSaeed commented Mar 12, 2018

I used to be able to use dotnet watch in Visual Studio by adding the following section to launchSettings.json and starting the project without debugging using CTRL + F5.

    "Kestrel (dotnet watch run)": {
      "commandName": "Executable",
      "executablePath": "C:\\Program Files\\dotnet\\dotnet.exe",
      "commandLineArgs": "watch run",
      "launchBrowser": true,
      "launchUrl": "https://localhost:5001/",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },

This used to work in ASP.NET Core 1.1 but no longer does. According to aspnet/DotNetTools#404 the new format for ASP.NET Core 2.0 is:

   "Kestrel (dotnet watch run)": {
      "commandName": "Executable",
      "executablePath": "C:\\Program Files\\dotnet\\dotnet.exe",
      "commandLineArgs": "watch run",
      "workingDirectory": "C:\\Users\\namc\\source\\repos\\WebApplication2\\WebApplication2",
      "launchBrowser": true,
      "launchUrl": "https://localhost:5001/",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }

The problem with this is the hard coded executablePath which is Windows specific and the workingDirectory which is specific to wherever I did a Git clone on my local machine.

@barrytang

This comment has been minimized.

barrytang commented Mar 13, 2018

To report new issues, use the Report a Problem tool. The GitHub Issue Tracker for the aspnet/Tooling repo is now deprecated in favor of the Report a Problem tool.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See here for more details.

@barrytang barrytang closed this Mar 13, 2018

@barrytang

This comment has been minimized.

barrytang commented Mar 13, 2018

Adding @BillHiebert, @abpiskunov and @balachir as FYI.

@RehanSaeed

This comment has been minimized.

RehanSaeed commented Mar 13, 2018

Posted to the 'Report a Problem' tool with the same title as this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment