question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standardization of runtime assembly attributes

See original GitHub issue

In runtime assemblies we have these:

[assembly: AssemblyMetadata("RepositoryUrl", "git://github.com/dotnet/runtime")]
[assembly: AssemblyInformationalVersion("5.0.0-preview.8.20357.3+225405979bef9252208fcc71ea0552e1cb27a1e2")]

In ASP.NET ones:

[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/dotnet/aspnetcore")]
[assembly: AssemblyInformationalVersion("5.0.0-preview.8.20357.7")]
[assembly: AssemblyMetadata("CommitHash", "380a5679bbc5cef03471ab68bd9b2d14085ead91")]

I’d love to see these version metadata standardized across repositories, and probably keep it stable as long as possible, such that application that need to introspect these are broken less often.

Suggestions:

  • Use different attributes for the version and the commit hash, like ASP.NET
  • Standardize the repository url, probably with the https scheme instead of git

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
bricelamcommented, Sep 29, 2020

Personally? No. All the information is now available. Having a standard format is only valuable if it becomes ubiquitous across the entire .NET ecosystem.

1reaction
jkotascommented, Jul 31, 2020

dotnet/runtime is following standards established by .NET SDK, SourceLink and Arcade.

  • If you are going to do (inside git repository):
dotnet new console
dotnet add package Microsoft.SourceLink.GitHub
dotnet build

The binary is going to have the same AssemblyInformationalVersion format as dotnet/runtime binaries.

Why is ASP.NET deviating from the .NET SDK and SourceLink defaults?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set assembly attributes
Three attributes, together with a strong name (if applicable), determine the identity of an assembly: name, version, and culture.
Read more >
ReferenceAssemblyAttribute Class (System.Runtime. ...
Identifies an assembly as a reference assembly, which contains metadata but no executable code. public ref class ReferenceAssemblyAttribute sealed : Attribute.
Read more >
c# - .Net 4 - Include custom information in assembly
I'm building an extensible application which will load additional assemblies at runtime through Assembly.LoadFile() . Those additional ...
Read more >
c# - Duplicate AssemblyVersion Attribute
To obtain this, one solution is to add conditional defines to the including project (found in project Properties). Then change the assembly ......
Read more >
Attributes and Assemblies
The .NET runtime uses the configurable attributes and versioning rules built into assemblies to greatly simplify application deployment. The chapter concludes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found