When TargetName is specified dotnet run command fails
See original GitHub issueI have created a console application and added the TargetName name property (See screen shot attached). Then dotnet run
fails to execute the application. dotnet build
works as excepted.
Tested on .NET 5 and .NET 6 preview SDKs.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
dotnet-run command not working as expected
When I run dotnet build in my VS Code terminal, it works as expected. But the problem is, in the same project, when...
Read more >"Dotnet build" command should generate an error directing ...
"Dotnet build" command should generate an error directing you to use "dotnet msbuild" if you try to specify a target to run (/t:TargetName) ......
Read more >Unable to run dotnet bundle in csproj target
It seems to be only refusing to execute the command, claiming that 'No executable found matching command "dotnet-bundle"', even though running that exact ......
Read more >dotnet run command - .NET CLI
The dotnet run command provides a convenient option to run your application from the source code.
Read more >Exec Task - MSBuild
Learn to use the MSBuild Exec task to run a specified program or command by using the specified arguments.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These have been separate for a very long time, but I don’t know how often they’re actually separated. It’s surprising to me that this is even possible. I also note that
TargetName
isn’t documented butAssemblyName
is, though that’s a pretty weak signal since our documentation isn’t reliably great (no insult intended to our current doc writer!).Sounds like you’ve found a solution and using TargetName is not supported at this time so closing this out.