-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
${AssemblyVersion}: add type (File, Assembly, Informational) option #2487
${AssemblyVersion}: add type (File, Assembly, Informational) option #2487
Conversation
…ersions generated by Roslyn. Documentation.
The build server says:
Could you please check that? |
{ | ||
if (!string.IsNullOrEmpty(assemblyName)) | ||
var assemblyName = GetAssemblyName(); | ||
assemblyName.Version.ToString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing return
;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, looks good!
|
||
private static Assembly GenerateTestAssembly() | ||
{ | ||
const string code = @" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Unfortunately, it fails on Travis .> NLog.UnitTests.LayoutRenderers.AssemblyVersionTests.AssemblyVersionTypeTest(type: Assembly, expected: "1.1.1.1") [FAIL] Any idea why? See https://travis-ci.org/NLog/NLog/builds/324836802 |
…dling of Roslyn-generated version type unit test when we have issues of entry assembly.
Codecov Report
@@ Coverage Diff @@
## master #2487 +/- ##
=======================================
- Coverage 82% 82% -1%
=======================================
Files 322 322
Lines 24215 23219 -996
Branches 3225 2888 -337
=======================================
- Hits 19912 18939 -973
+ Misses 3542 3511 -31
- Partials 761 769 +8 |
The issue appears to be the way that xunit handles app domains, described in microsoft/vstest#649. This means that calls to There may be a way to get around this by changing the xunit config value So in these most recent pushes I have taken the same approach as the existing |
seems to work great! Thanks, looks good! Could you please update the wiki and add "Introduced in NLog 4.5"? Thanks in advance! |
Really appreciate all your help. I've updated https://github.com/nlog/nlog/wiki/AssemblyVersion-Layout-Renderer and https://github.com/NLog/NLog/wiki/Platform-Support. |
thanks! also for adding examples! 👍 👍 |
Fixes #2480.
Requires documentation updates at https://github.com/nlog/nlog/wiki/AssemblyVersion-Layout-Renderer and https://github.com/NLog/NLog/wiki/Platform-Support (see code for details).