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

Setting SecurityRules with CreateAssemblyInfo #2533

Closed
dnperfors opened this issue Apr 23, 2019 · 1 comment
Closed

Setting SecurityRules with CreateAssemblyInfo #2533

dnperfors opened this issue Apr 23, 2019 · 1 comment
Labels
Milestone

Comments

@dnperfors
Copy link

@dnperfors dnperfors commented Apr 23, 2019

What You Are Seeing?

When I want to use the CreateAssemblyInfo to set the [assembly: SecurityRules(SecurityRuleSet.Level2)] attribute (which is recommended to do by Microsoft) I get a compile error that I can't convert a string to a SecurityRuleSet.

The code I use is:

    CreateAssemblyInfo("./code/SharedAssemblyInfo.cs", new AssemblyInfoSettings
    {
        CustomAttributes = new List<AssemblyInfoCustomAttribute>
        {
            new AssemblyInfoCustomAttribute { Name = "SecurityRules", NameSpace = "System.Security", Value ="SecurityRuleSet.Level2" }
        },
    });

And generates:

[assembly: SecurityRules("SecurityRuleSet.Level2")]

What is Expected?

I would expect to be able to give any type of value to AssemblyInfoCustomAttribute, for example a generic:

    CreateAssemblyInfo("./code/SharedAssemblyInfo.cs", new AssemblyInfoSettings
    {
        CustomAttributes = new List<AssemblyInfoCustomAttribute>
        {
            new AssemblyInfoCustomAttribute<SecurityRuleSet> { Name = "SecurityRules", NameSpace = "System.Security", Value =SecurityRuleSet.Level2 }
        },
    });

And generates:

[assembly: SecurityRules(SecurityRuleSet.Level2)]

What version of Cake are you using?

0.33.0

Are you running on a 32 or 64 bit system?

64 bit

What environment are you running on? Windows? Linux? Mac?

Windows

@devlead devlead added the Improvement label Oct 26, 2019
@devlead devlead added this to the v0.36.0 milestone Oct 26, 2019
devlead added a commit that referenced this issue Oct 26, 2019
@devlead

This comment has been minimized.

Copy link
Member

@devlead devlead commented Oct 26, 2019

Fixed by #2648

@devlead devlead closed this Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.