英文:
How to change the executable name on publish in .NET 7
问题
<TargetName>cli</TargetName>
英文:
to demonstrate i will use illustrative names.
- I use VSCode
The problem
I have a project with name App
.
I i enter on my terminal and type: dotnet publish --configuration Release -o build
i will have an exe ./build/App.exe
.
this is the current behavior.
The wanted solution
So, i need the executable name to be cli.exe
when i run the publish command instead of App.exe
.
How can i do that?
I have been tried the:
<TargetName>cli</TargetName>
but this tag only changes the .dll
file, not the .exe
.
答案1
得分: 0
请使用 AssemblyName
,而不是 TargetName
。
英文:
Instead of TargetName
use AssemblyName
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论