Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Flow project.json properties into the assembly. #2966

Merged
merged 1 commit into from
Oct 19, 2015

Conversation

cesarblum
Copy link
Contributor

  • title -> AssemblyTitle
  • description -> AssemblyDescription
  • copyright -> AssemblyCopyright

Language has already been handled by #2802.
#2715

@dnfclas
Copy link

dnfclas commented Oct 12, 2015

Hi @CesarBS, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@cesarblum
Copy link
Contributor Author

{
versionAttributes.AppendLine($"[assembly:{assemblyInformationalVersion}(\"{project.Version}\")]");
attributes.AppendLine($"[assembly:{attributeValue.Key}(\"{attributeValue.Value}\")]");
Copy link
Contributor

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?

#else
var assemblyPath = Path.Combine(result.RootPath, result.Configuration, "dnxcore50", "Test.dll");
#endif
var assembly = Assembly.LoadFrom(assemblyPath);
Copy link
Contributor Author

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.

// Assert
Assert.Equal(0, result.ExitCode);

#if DNX451
Copy link
Member

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.

@@ -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));
Copy link
Member

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

Copy link
Contributor Author

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.

@davidfowl
Copy link
Member

:shipit:

@davidfowl
Copy link
Member

very nice

@cesarblum cesarblum merged commit b323852 into dev Oct 19, 2015
@cesarblum cesarblum deleted the cesarbs/dnx-assemblyinfo branch October 19, 2015 17:38
@RehanSaeed
Copy link

Was this never re-implemented for .NET Core 1.1.1? Only AssemblyTitle seems to be driven by the title propery of project.json.

@davidfowl
Copy link
Member

You mean the csproj stuff? I believe it is implemented. If you migrate from project.json to csproj it'll turn off all of the generation. AFAIK, if you clean up the csproj it does the right thing. What are you seeing and what does your project file look like?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants