-
Notifications
You must be signed in to change notification settings - Fork 224
Flow project.json properties into the assembly. #2966
Conversation
Hi @CesarBS, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
{ | ||
versionAttributes.AppendLine($"[assembly:{assemblyInformationalVersion}(\"{project.Version}\")]"); | ||
attributes.AppendLine($"[assembly:{attributeValue.Key}(\"{attributeValue.Value}\")]"); |
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.
Do you want to add that attribute even when the value is null?
1543082
to
b281692
Compare
#else | ||
var assemblyPath = Path.Combine(result.RootPath, result.Configuration, "dnxcore50", "Test.dll"); | ||
#endif | ||
var assembly = Assembly.LoadFrom(assemblyPath); |
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.
Still pending on using System.Reflection.Metadata.
6e8cef7
to
6649e9c
Compare
// Assert | ||
Assert.Equal(0, result.ExitCode); | ||
|
||
#if DNX451 |
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.
This isn't right. Use the result object and the sdk object to get the appropriate output path. The target framework the test is being compiled with is irrelevant.
7324ca3
to
d2b6aeb
Compare
@@ -355,7 +327,7 @@ private static string RemovePrereleaseTag(string version) | |||
|
|||
foreach (var d in dirs) | |||
{ | |||
ctx.Monitor(new FileWriteTimeCacheDependency(d)); | |||
ctx?.Monitor(new FileWriteTimeCacheDependency(d)); |
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.
Unit test? make it null
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.
It is already :) I made that change because the first time I ran my test, it blew up there with a NullReferenceException.
|
very nice |
d2b6aeb
to
b323852
Compare
Was this never re-implemented for .NET Core 1.1.1? Only AssemblyTitle seems to be driven by the title propery of project.json. |
You mean the csproj stuff? I believe it is implemented. If you migrate from |
Language has already been handled by #2802.
#2715