Do I need AssemblyInfo while working with .NET Core?

前端 未结 2 517
暗喜
暗喜 2021-02-04 00:03

Previously, AssemblyInfo.cs file was autocreated by Visual Studio to contain assembly-wide attributes, like AssemblyVersion, AssemblyName and so on.

In .NET

2条回答
  •  不思量自难忘°
    2021-02-04 00:18

    project.json has replaced the AssemblyInfo.

    AssemblyVersionAttribute is replaced by version property

    version
    Type: String
    The Semver version of the project, also used for the NuGet package.
    

    AssemblyNameAttribute is now the name property

    name
    Type: String
    The name of the project, used for the assembly name as well as the name of the package. The top level folder name is used if this property is not specified.
    

    and so on


    Update: With the announcement of .NET Core Tools MSBuild, the .csproj has replaced the project.json. The AssemblyInfo.cs file is back, but most of the settings have been moved directly to .csproj. See related SO question for more details: Equivalent to AssemblyInfo in dotnet core/csproj :

    
      
        net461
        1.2.3.4
        Author 1
        Company XYZ
        Product 2
        MyApp
        2.0.0.0
        3.0.0.0
        en
        Description here
        Copyright
        License URL
        Project URL
        Icon URL
        Repo URL
        Repo type
        Tags
        Release
      
    

提交回复
热议问题