Skip to content
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

Transform assembly signing attributes #258

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LTruijens
Copy link

Siging of an assembly can also be done using assembly attributes in the assemblyinfo.cs

[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile(@"....\PublicKey.snk")]

With this pull request these attributes get also transformed

Copy link
Collaborator

@mungojam mungojam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one change that I don't believe is required. Otherwise I would be happy to accept this in. I did similar in a custom transform but I didn't want to assume that people would want all of the assembly properties brought into the project file. It's good that you do too though :)

@@ -121,7 +136,7 @@ public string GetAttribute(Type attributeType)

//Make the assumption that it just has a single string argument
//because all of the attributes we currently look for do have
return att?.ArgumentList.Arguments.Single().ToString().Trim('"');
return att?.ArgumentList.Arguments.Single().ToString().TrimStart('@').Trim('"');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this change will achieve anything. The @ at the start e.g. @"c:\something" is just for reading the typed string, the resultant string in memory will be the same as if somebody had escaped slashes directly "c:\\something".

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

Successfully merging this pull request may close these issues.

None yet

2 participants