I have finished my program in c#, hit build solution, and gra开发者_运维技巧bbed the exe out of the bin folder in my project directory. I noticed the description under the filename was "WindowsFormApplication1". I browsed briefly through any fields in the solutions explorer I might change, but nothing worked. Am I doing the right thing to release my program, and/or where can you change that description? I would like to just pass the exe around.
Two methods.
Right click on project=>properties=>Application=>Assembly Information...
Solution Explorer=>Project=>Properties folder=>AssemblyInfo.cs
You can change them in the project properties at Application
-> Assembly Information...
.
If you're concerned about the meta data in general, you may want to disable the pdb at Build
-> Advanced...
-> Debug Info
or the assembly will contain the full path to the .pdb file, wich usually contains the user name.
I'd like to add that in case you're working with multiple projects in one solution, one could create a separate build properties file. This way you don't need to set the properties per project.
Create the file
Directory.Build.Props
in the solution folder.Add the following properties
<Project> <PropertyGroup> <Version>1.0.0.0<Version> <AssemblyVersion>1.0.0.0</AssemblyVersion> <FileVersion>1.0.0.0</FileVersion> <Company>Stack Exchange Inc.</Company> <Authors>Jeff Atwood, Joel Spolsky</Authors> <Copyright>user contributions licensed under cc by-sa. rev 2020.10.26.37891</Copyright> </PropertyGroup> </Project>
精彩评论