.NET Core "Assembly Information File" should give a better indication of how assembly info is stored now
See original GitHub issueThe contents of the .NET Core Assembly Information File template is the following:
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("WindowsFormsApp8")]
// [assembly: AssemblyDescription("")]
// [assembly: AssemblyConfiguration("")]
// [assembly: AssemblyCompany("")]
// [assembly: AssemblyProduct("WindowsFormsApp8")]
// [assembly: AssemblyCopyright("Copyright © 2019")]
// [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("b72c1634-c91c-4f85-8224-0e3d9a8bfc83")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// [assembly: AssemblyVersion("1.0.0.0")]
// [assembly: AssemblyFileVersion("1.0.0.0")]
This gives the impression that you can just uncomment those attributes, but if you do so you get a very unhelpful error:
Severity Code Description Project File Line Suppression State
Error CS0579 Duplicate 'AssemblyTitle' attribute WindowsFormsApp8 C:\Users\davkean\source\repos\WindowsFormsApp8\WindowsFormsApp8\AssemblyInfo5.cs 8 Active
The file should give a better indication that most of this data is now stored in the project, pointing to a doc that documents these.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Is AssemblyInfo.cs file needed for .Net Core projects?
AssemblyInfo.cs is useful, but it's not necessary. In .NetCore you can manage AssemblyInfo from the .csproj file instead of AssemblyInfo.cs ...
Read more >Use AssemblyVersion and AssemblyFileVersion attributes
This article describes how to use AssemblyVersion and AssemblyFileVersion attributes in the AssemblyInfo.cs file.
Read more >In the .NET AssemblyInfo.cs, where to put the license info?
In .NET, assemblies have their AssemblyInfo.cs file where one can put general descriptive info about the assembly. But, where to explicitly put ...
Read more >Understanding the Visual Studio AssemblyInfo Class
The AssemblyInfo Class holds application attributes about a Visual Studio project that are applied at the assembly level. These global assembly ...
Read more >How to write unit tests on internal methods and protected ...
All the assembly related information are stored in the project file (.csproj) in dotnet core. For example: <PropertyGroup>
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This isn’t a .NET Core template, it’s a “auto-generated AssemblyInfo” template, so we’ll need to fact that in as soon as we start supporting legacy format in CPS. It’s not enough to indicate that it always applies to CPS.
Other half has been completed.