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

AllowPartiallyTrustedCallers #41

Closed
Rotteveel opened this Issue Mar 31, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@Rotteveel

Rotteveel commented Mar 31, 2012

I tried to add the assembly attribute 'AllowPartiallyTrustedCallers to asminfo task like so:

<target name="update-common-assemblyinfo">
    <echo message="Generating common AssemblyInfo file..." />
    <!-- ensure src/CommonAssemblyInfo.cs is writable if it already exists -->
    <attrib file="${root.dir}\src\CommonAssemblyInfo.cs" readonly="false" if="${file::exists('${root.dir}\src\CommonAssemblyInfo.cs')}" />
    <!-- generate the source file holding the common assembly-level attributes -->
    <asminfo output="${root.dir}\src\CommonAssemblyInfo.cs" language="CSharp">
    <imports>
        <import namespace="System" />
        <import namespace="System.Security" />
        <import namespace="System.Reflection" />
        <import namespace="System.Runtime.InteropServices" />
    </imports>
    <attributes>
        <attribute type="CLSCompliantAttribute" value="true" />
        <attribute type="ComVisibleAttribute" value="false" />
        <attribute type="AssemblyProductAttribute" value="${product.fullname}" />
        <attribute type="AssemblyCompanyAttribute" value="${product.url}" />
        <attribute type="AssemblyCopyrightAttribute" value="${product.copyright}" />
        <attribute type="AssemblyTrademarkAttribute" value="Apache License, Version 2.0" />
        <attribute type="AssemblyCultureAttribute" value="" />
        <attribute type="AssemblyVersionAttribute" value="${project.version}" />
        <attribute type="AssemblyConfigurationAttribute" value="${project.framework}; ${project.version}; ${project.buildtype}" />
        <attribute type="AllowPartiallyTrustedCallers" value="" />
    </attributes>
    </asminfo>
</target>

and received the following error while running the build script.

'…CommonAssemblyInfo.cs' could not be generated.
Assembly attribute with type 'AllowPartiallyTrustedCallers' could not be loaded.

@ghost ghost assigned rmboggs Mar 31, 2012

@rmboggs

This comment has been minimized.

Show comment
Hide comment
@rmboggs

rmboggs Mar 31, 2012

Member

Updated the issue to show the example in question.

Member

rmboggs commented Mar 31, 2012

Updated the issue to show the example in question.

@rmboggs

This comment has been minimized.

Show comment
Hide comment
@rmboggs

rmboggs Mar 31, 2012

Member

Thanks for reporting this. I'm looking into this now.

Member

rmboggs commented Mar 31, 2012

Thanks for reporting this. I'm looking into this now.

rmboggs pushed a commit to rmboggs/nant that referenced this issue Apr 1, 2012

Ryan Boggs
Corrected issue when specifying AssemblyInfo attributes that have con…
…structors without parameters. Added ability to add attributes without Attribute suffix (ie: AssemblyTitleAttribute and AssemblyTitle both work). Added unit tests for recent changes. Should fix NAnt Issue #41.

rmboggs pushed a commit that referenced this issue Apr 21, 2012

@rmboggs

This comment has been minimized.

Show comment
Hide comment
@rmboggs

rmboggs Apr 21, 2012

Member

This should be fixed in master now. Closing this issue.

Member

rmboggs commented Apr 21, 2012

This should be fixed in master now. Closing this issue.

@rmboggs rmboggs closed this Apr 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment