Skip to content

Commit

Permalink
Use entry assembly version for AppVersion by default
Browse files Browse the repository at this point in the history
  • Loading branch information
anfomin committed Feb 13, 2018
1 parent 7be11f2 commit cd4b3ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RaygunCore.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<RepositoryUrl>https://github.com/anfomin/rayguncore</RepositoryUrl>
<PackageProjectUrl>https://github.com/anfomin/rayguncore</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/anfomin/rayguncore/blob/master/LICENSE</PackageLicenseUrl>
<VersionPrefix>1.0.1</VersionPrefix>
<VersionPrefix>1.0.2</VersionPrefix>
<VersionSuffix Condition="'$(VERSION_SUFFIX)'!=''">$(VERSION_SUFFIX)</VersionSuffix>
<NoWarn>$(NoWarn);1573;1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
4 changes: 2 additions & 2 deletions RaygunCore/Services/MainMessageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public void Apply(RaygunMessageDetails details)
{
var asm = GetType().Assembly;
details.MachineName = System.Environment.MachineName;
details.Version = _options.AppVersion;
details.Version = _options.AppVersion ?? Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
details.Client.Name = asm.GetCustomAttribute<AssemblyTitleAttribute>().Title;
details.Client.Version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
details.Client.Version = asm.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
details.Client.ClientUrl = "https://github.com/anfomin/raygun";
}
}
Expand Down

0 comments on commit cd4b3ba

Please sign in to comment.