AllowPartiallyTrustedCallers #41

Rotteveel opened this Issue Mar 31, 2012 · 3 comments


None yet

2 participants


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">
        <import namespace="System" />
        <import namespace="System.Security" />
        <import namespace="System.Reflection" />
        <import namespace="System.Runtime.InteropServices" />
        <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="" />

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.

@rmboggs rmboggs was assigned Mar 31, 2012
rmboggs commented Mar 31, 2012

Updated the issue to show the example in question.

rmboggs commented Mar 31, 2012

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

@rmboggs 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 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