.NET Watch Launch Setting Profile For ASP.NET Core
source link: https://khalidabuhakmeh.com/dotnet-watch-launchsetting-for-aspnet-core
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
.NET Watch Launch Setting Profile For ASP.NET Core
In .NET, launch settings (launchSettings.json
) allow us to share run commands across all development environments, regardless of IDE and editor choices. For the most part, launch commands are cross-platform capable, so they aren’t limited to any operating system, which is excellent for teams that let developers make their own choices for tools and development environments. One of the recent tools in .NET, dotnet-watch
, allows developers to speed up their development workflow by providing a more responsive feedback loop from the time a developer makes an edit in code to the time the app reflects it in the output.
In this short but helpful post, you’ll find a simple launch settings configuration to add dotnet-watch
as a profile to your project’s existing launchSettings.json
file.
Launch Setting Profile For dotnet-watch
The .NET SDK bundles the dotnet-watch
tool, which you can find in the SDK installation directory under the SDK version directory in a folder named DotnetTools
. Other tools include dotnet-dev-certs
, dotnet-format
, dotnet-user-secrets. **Note, to get the following launch profile to work, you'll need the
dotnet executable in your
PATH`.**
First, locate the launchSettings.json
in your project. You can typically find the file under the Properties
folder. Then under the profiles
section, add the following element.
"Watch": {
"commandName": "Executable",
"executablePath": "dotnet",
"workingDirectory": "$(ProjectDir)",
"hotReloadEnabled": true,
"hotReloadProfile" : "aspnetcore",
"commandLineArgs": "watch run",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
You should now see Watch
as a launch command in your favorite IDE and editor.
You can also adapt this launch profile to work with desktop application development, but I haven’t tried it myself.
Now you should be able to start a quick feedback loop experience with a click of a button. Enjoy, and thanks for reading. If you found this post helpful, please share it with friends and coworkers.
Tags: dotnet
About Khalid Abuhakmeh
Khalid is a developer advocate at JetBrains focusing on .NET technologies and tooling.
Recommend
-
1
Twitter Pauses Public Requests for Profile Verification, Just a Week After Re-Launch Published May 28, 2021 By
-
10
.Net MAUI, UIReplicating Course Profile UI in .NET MAUI Leoma...
-
7
Eclipse Profile configuration: The launch requires at least one data collector May 13, 2010 I just installed TPTP into my Ecl...
-
2
What is the Core Profile? The Jakarta EE specifications have already two profiles, the Full profile, and the Web profile. The Web Profile contains a set of specifications that are geared toward the typical Web Applications. It gro...
-
7
WhatsApp is expected to soon launch iMessage-like profile photos within group August 25, 2022
-
5
One of the most typical user interfaces in chat applications is the group view. Almost all chat software allows for group chat, which calls for a standard group photo to serve as the group’s representation. A useful feature of the
-
4
Interview with Tanja Obradovic, Jakarta EE Program Manager at Eclipse Foundation Jakarta EE 10 Platform, Web Profile, and New Core Profile Specifications Are Finally Out!
-
2
Brandon Toombs March 7, 2023 Less than a 1 minute...
-
2
Thursday, 04 May 2023 09:38 Launch your podcast or stream with the Sennheiser Profile USB microphone By
-
5
Replicating a Dating Profile UI in .NET MAUI
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK