默認的AssemblyInfo.cs看起來是這樣的:在AssemblyInfo.cs中需要什麼?
的using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Foobar")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Foobar")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 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("e8cd5d7d-5fba-4fe1-a753-f0cc6e052bf2")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
所有這一切是真的有必要嗎?例如,如果我不需要,我可以刪除Guid和ComVisible,或者AssemblyTrademark,因爲它只是空的?
當你嘗試過時發生了什麼? –
好吧,它沒有崩潰,但想知道是否有任何我不知道的更大的影響,比如裝配在某些情況下無法使用:) – Svish
我能想到的唯一可能的問題是將多個副本GAC中的程序集。您可以在其中放置多個版本的程序集。如果每個副本具有不同的文化,則可以擁有相同版本的多個副本。但是,如果版本信息丟失,爲什麼這可能是一個問題。 –