-
Notifications
You must be signed in to change notification settings - Fork 331
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
Visual Studio development of Dapr apps #401
Comments
When looking into Tye, have to say that Tye extrimely simplifies the deployment. For this reason, I propose similar concept in dapr.
This would be a great simplification. |
Thanks. Could you please send your feedback on https://docs.microsoft.com/en-us/visualstudio/ide/suggest-a-feature?view=vs-2019? |
Hi, I have played around with Visual Studio and Dapr applications. Dotnet app starting DaprModify your .NET app to start Dapr process Need Nuget package public static void Main(string[] args) {
var rootCommand = new RootCommand
{
new Option<string[]>("--DAPR_CMD")
};
rootCommand.Handler = CommandHandler.Create((string[] DAPR_CMD) =>
{
if (DAPR_CMD != null && DAPR_CMD.Length > 0)
{
var cmd = DAPR_CMD[0];
var cmdArgs = DAPR_CMD[1..];
if (!string.IsNullOrWhiteSpace(cmd))
{
DaprProcess = new System.Diagnostics.Process
{
StartInfo =
{
FileName = cmd,
Arguments = string.Join(' ', cmdArgs),
}
};
DaprProcess.Start();
}
}
});
rootCommand.Invoke(args); The necessary "Dapr": {
"commandName": "Project",
"commandLineArgs": "--DAPR_CMD dapr run --app-id mydaprapp --components-path ./components/ --app-port 5000 --dapr-http-port 5005 --dapr-grpc-port 5006",
"launchUrl": "swagger",
"environmentVariables": {
"DAPR_HTTP_PORT": "5005",
"DAPR_GRPC_PORT": "5006",
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": "true",
"applicationUrl": "https://localhost:5001;http://localhost:5000"
} Use VS extensionNeed PowerShell 7 / Core installed (Example: Need the Visual Studio extension Microsoft Child Process Debugging Power Tool installed. Activate
The necessary "Dapr-PWSH": {
"commandName": "Executable",
"executablePath": "pwsh",
"commandLineArgs": "-Command \"dapr run --app-id mydaprapp --components-path ./components/ --app-port 5000 --dapr-http-port 5005 --dapr-grpc-port 5006 -- dotnet run --no-build\"",
"workingDirectory": ".",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"nativeDebugging": true
} |
thks |
Could we include something in the documentation for this? So far only IntelliJ and VSCode is documented. This seems a bit strange considering the flagship nature of Visual Studio 2022 and this being a Microsoft driven project. |
Just starting to explore Dapr, and came across Dapr sidekick which seems to make debugging in VS very easy. Might get me into trouble...don't know yet :) |
@Fabian-Schmidt I can't seem to figure out the extension way I have the following settings
Am I missing something? |
Currently only the development of Dapr applications in VS Code and IntelliJ is documented:
https://github.com/dapr/docs/tree/master/howto#developer-tooling
There should also be something similiar for Visual Studio 2019:
If Visual Studio does not support a productive development, we need an extension approach, like we have for VSCode: https://github.com/microsoft/vscode-dapr
Tye with Dapr integration is going into this direction - but it is only experimental.
The text was updated successfully, but these errors were encountered: