Hey Ruben, Thanks for reporting the issue. I've created a fix for this issue that has been submitted for review. I'm hoping to get this in before the 0.92 release cycle is currently scheduled to begin.
In the meantime, I would suggest to create a second Global AssemblyInfo.cs file that contains the attribute "AllowPartiallyTrustedCallers" that is not generated by the asminfo task and make sure the second assembly file is included in your build. I understand that this is not the most ideal workaround but it should work for the time being. For those interested, there were two issues going on with this. The first was that the asminfo task only recognizes the full name of the attribute (ie: AllowPartiallyTrustedCallers would not be located but AllowPartiallyTrustedCallersAttribute would) and second is that the asminfo doesn't properly handle attributes with only default constructors. So even changing the attribute name to include the "Attribute" suffix would not completely fix this particular issue. Thanks, Ryan On Sat, Mar 31, 2012 at 10:06 AM, Ryan Boggs <rmbo...@gmail.com> wrote: > Forgot to CC list. Sorry about that. > > Thanks, > Ryan > > ---------- Forwarded message ---------- > From: Ryan Boggs <rmbo...@gmail.com> > Date: Sat, Mar 31, 2012 at 10:06 AM > Subject: Re: [NAnt-users] new to Nant > To: Ruben Rotteveel <rrottev...@turnberrysolutions.com> > > > Hi Ruben, > > Unfortunately, I think this could possibly be a bug in the asminfo > task. I'm going to investigate this further. > > In the meantime, could you please report this in the issues log on > NAnt's github site? Link provided below: > https://github.com/nant/nant > > Thanks, > Ryan > > On Sat, Mar 31, 2012 at 8:16 AM, Ruben Rotteveel > <rrottev...@turnberrysolutions.com> wrote: >> I’m new to Nant and am editing a build script. I need to build the >> assemblies in my project to AllowPartiallyTrustedCallers, however when I add >> the attribute to the assemblyinfo builder I get the following error: >> >> >> >> ‘…CommonAssemblyInfo.cs' could not be generated. >> >> Assembly attribute with type 'AllowPartiallyTrustedCallers' could not be >> loaded. >> >> >> >> Any help is greatly appreciated. >> >> >> >> This is the part that creates the assemblyinfo. >> >> >> >> <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> >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> NAnt-users mailing list >> NAnt-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/nant-users >> ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users