4

In .NET, assemblies have their AssemblyInfo.cs file where one can put general descriptive info about the assembly. But, where to explicitly put an (open source) license? I will have a copyright, which is still mine, but how am I supposed to explicitly license via GPL (in this case?)

Here's how I do it for now:

// 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: AssemblyCompany("marcelsuter.ch")]
[assembly: AssemblyProduct("Replayer")]
[assembly: AssemblyCopyright("(c) 2018 by marcelsuter.ch, GPL-v3 licensed")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.6.2")]

This does not seem to fit well, is there a better way to state the license?

  • Are you wrapping your code into a NuGet package? If so, the nuspec file lets you specify a license. – Philip Kendall Feb 15 at 9:19
  • @PhilipKendall No, this is just getting into a .NET executable (.EXE), which can be downloaded from the github repo. – Marcel Feb 15 at 9:40
0

Are you using the dotnet core? You can use the PackageLicenseFile and the PackageLicenseUrl. Also, related with Assembly information you have this Assembly Info Properties

All of this information is related to the new .csproj structure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.