Reputation: 291
I have a .Net Core 2.0 web application and I would like to have the name displayed in task manager. It's currently showing .NET Core Host
:
I have found this question, but unfortunately it's not possible to change the assembly info, because this window is not even showing up (I assume this is because it's a .NET Core 2.0 application and not a .NET Framework 4.x application).
Is there another way to display the title of the application in task manager?
Upvotes: 7
Views: 4196
Reputation: 2762
I managed to set display name by setting the AssemblyTitle
value in .csproj file in .net core 3.1:
.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Hello World</AssemblyName>
<AssemblyTitle>Display Name</AssemblyTitle>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>
Upvotes: 4
Reputation: 4629
If you run the application from the dll - no, there is no way as the DotnetCore-Hosting-Process is needed to run it.
If you deploy the application as a self-contained application it will display the name you set your AssemblyName/Executable to:
.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Hello World</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>
Please also read up the consequences of publishing self-contained apps here.
Upvotes: 1