×

Loading...
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!

我找到了一个AssemblyInfo.cs,也放在这里,供有同样需要的朋友参考。

using System.Reflection;
using System.Runtime.CompilerServices;

// General Information
[assembly: AssemblyTitle("Wilson.DotNet")]
[assembly: AssemblyDescription("Paul@WilsonDotNet.com")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("www.WilsonDotNet.com")]
[assembly: AssemblyProduct("WilsonDotNetPages")]
[assembly: AssemblyCopyright("2002-2003 Paul Wilson")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Version Information
[assembly: AssemblyVersion("2.0.0.*")]

// Signing Information
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 请问在做.net的DX,要是没有visual studio.net,怎么才能让dll文件有版本号、公司名字等版本信息?
    • In Solution Explorer-->AssemblyInfo.vb
      • 谢谢回答,可我没有visual studio.net,不知道该怎么办?
      • 在visual studio.net里,是不是只要有AssemblyInfo.vb文件就可以了?
        • 我不知道没有.net怎么办。你用什么打包的。有些打包程序里面应该也可以设置。我把一个assemblyinfo.vb给你考下来了,你看看吧。
          本文发表在 rolia.net 枫下论坛Imports System.Reflection
          Imports 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.

          ' Review the values of the assembly attributes

          <Assembly: AssemblyTitle("")>
          <Assembly: AssemblyDescription("")>
          <Assembly: AssemblyCompany("")>
          <Assembly: AssemblyProduct("")>
          <Assembly: AssemblyCopyright("")>
          <Assembly: AssemblyTrademark("")>
          <Assembly: CLSCompliant(True)>

          'The following GUID is for the ID of the typelib if this project is exposed to COM
          <Assembly: Guid("51211DCA-8601-41EB-A58F-0FB7B3765910")>

          ' 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.*")>更多精彩文章及讨论,请光临枫下论坛 rolia.net
          • 谢谢!这个文件很有用。“打包”指的是什么?是指compile吗?
            • not only, it means package.
              • 谢谢,等我有了visual studio.net,我天天打包。:)
            • 就是用这个AssemblyInfo,编译的时候把它加进去就可以了。以C#为例,比如你的source code file 是source.cs,则在建个AssemblyInfo.cs,把它们放在同一个目录下,然后在命令行运行类似的命令:csc /target:library /out:test.dll *.cs
              • 多谢!搞定了!!再请问这个AssemblyInfo是给整个项目用的Metadata file,我想只对一个DLL文件使用,是不是不行?还有是不是把所有文件都编译成一个DLL文件就是打包呢?
                • 当然可以只对一个DLL文件使用了。每个Assembly可以有各自的AssemblyInfo。至于打包,估计lilyba说的是和发布有关的东东。
                  • 再次感谢!
          • 我找到了一个AssemblyInfo.cs,也放在这里,供有同样需要的朋友参考。
            using System.Reflection;
            using System.Runtime.CompilerServices;

            // General Information
            [assembly: AssemblyTitle("Wilson.DotNet")]
            [assembly: AssemblyDescription("Paul@WilsonDotNet.com")]
            [assembly: AssemblyConfiguration("")]
            [assembly: AssemblyCompany("www.WilsonDotNet.com")]
            [assembly: AssemblyProduct("WilsonDotNetPages")]
            [assembly: AssemblyCopyright("2002-2003 Paul Wilson")]
            [assembly: AssemblyTrademark("")]
            [assembly: AssemblyCulture("")]

            // Version Information
            [assembly: AssemblyVersion("2.0.0.*")]

            // Signing Information
            [assembly: AssemblyDelaySign(false)]
            [assembly: AssemblyKeyFile("")]
            [assembly: AssemblyKeyName("")]