Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've been trying to change the output exe's description and other stuff, but I haven't been able to find out how.

What I have tried:

I've looked up how to and it said to look for AssemblyInfo.cs but I don't seem to have one, I also looked in app.manafest, but could not find out how to change it(The description and other metadata).

Thank you for any help.

I am using dotnet publish -p:PublishSingleFile=true -r win-x64 -c Release --self-contained true
to make it into one exe file, incase that affects it.
I'm not quite sure what the best way to do it would be.
Updated 20-May-23 19:57pm
[no name] 21-May-23 9:20am    
By your reponses, it would seem you do not have a valid "C# Windows Forms project"; and maybe should start over; or create a new (different) one to see how a proper (default) project is structured.
Dave Kreskowiak 21-May-23 16:28pm    
Are you using Visual Studio 20xx or Visual Studio Code?
G Schulz 21-May-23 18:54pm    
VS 20

If you don't see an AssemblyInfo.cs file, you can just add one. Right-click your project line in Solution Explorer and click Add -> New Item (or hit Ctrl-Shift-A).

In the small dialog that may show up, click "Show all templates". A larger dialog with all available file templates will show up. Find "Assembly Information File" and click it ONCE. Check the filename at the bottom of the dialog and make sure it says "AssemblyInfo.cs". Click Add.

The file will be created and opened for edit. You can find all the information on which assembly attrbiutes you can add to your project (really, just an assembly) at here[^]

Here's an example of how to add a Description and Copyright attribute to a test project. I just added the last two lines to the AssemblyInfo.cs file:
using System.Reflection;
using System.Runtime.InteropServices;

// In SDK-style projects such as this one, several assembly attributes that were historically
// defined in this file are now automatically added during build and populated with
// values defined in project properties. For details of which attributes are included
// and how to customise this process see:

// Setting ComVisible to false makes the types in this assembly not visible to COM
// components.  If you need to access a type in this assembly from COM, set the ComVisible
// attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM.

[assembly: Guid("43256ce6-54a4-4178-b19e-e16829d728cb")]

[assembly: AssemblyDescription("This is a test!")]
[assembly: AssemblyCopyright("Copyright © Whoever 2023")]
Share this answer
G Schulz 21-May-23 11:30am    
Thanks! I will have to try this when I get to my computer!
G Schulz 21-May-23 14:52pm    
I do not see any option for Assembly Information File?
Dave Kreskowiak 21-May-23 16:27pm    
Then just create a new class file and rename it to AssemblyInfo.cs. Replace all the content in the file with the two "using" statements above, and the "assembly:" statements you need for your requirements.
Two ways to do it:

1) Open the Project branch in the Solution Explorer.
1.1) Expand the "Properties" twig.
1.2) Double click the "AssemblyInfo.cs" file at the top.
1.3) Change the line:
[assembly: AssemblyDescription("")]
1.4) Save the file.


2) Open the Project branch in the Solution Explorer.
2.1) Double click the "Properties" twig.
2.2) In the resulting window, click the "Assembly Information..." button.
2.3) In the resulting dialog, edit the Description textbox.
2.4) Press "OK".
Share this answer
G Schulz 21-May-23 0:34am    
By Properties, do you mean the button where it says Winformsapptest Properties?
Also I do not see the button you are talking about. Can you send a screenshot?
G Schulz 21-May-23 0:38am    
Ok I think I found what you are talking about, but I still dont see any "Assembly Information..." button or AssemblyInfo.cs
G Schulz 21-May-23 0:46am    
Still have not found the buttons or the files, but I have found something that sort of works.
I double clicked on the top file or the root and changed somethings.
Expanding on @OriginalGriff's post, it depends on the framework and the project type and the version of Visual Studio that you are using.

Easiest is to right-click on the project name, then at the bottom of the popup window select "Properties".
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900