I am trying to make a simple CLI project with C# and wanted to make a logger for it. I settled on using Log4Net. I was using
).
I made another project to see if something was wrong with the way the CLI project was created but I still got a project without an AssemblyInfo.cs
.
Googling the issue I see that I can go to the project properties page and click the assembly information button and have it regenerated but that is also missing for me in both projects.
Any idea why and how I may fix this? Or maybe a way to use Log4Net without an AssemblyInfo.cs
file.
Any help is appreciated
CodePudding user response:
Just add an AssemblyInfo.cs
file yourself - or call it something else entirely, e.g. Log4NetAssemblyAttributes
. The name of the file is irrelevant. A file with the attributes from the project file is generated automatically as part of the build in .NET Core, rather than being included as a regular source file in the project template, but you can place an [assembly:xyz]
attribute in any source file you like.