Re: new to Nant
"Philip Sayers" <[email protected]> Mon, 2 Apr 2012 09:37:20 -0400
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <00e001cd10d5$ba935a70$2fba0f50$@net> |
This is a multi-part message in MIME format. --===============1526792394643882177== Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E1_01CD10B4.3381BA70" Content-Language: en-us This is a multi-part message in MIME format. ------=_NextPart_000_00E1_01CD10B4.3381BA70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Ruben, I found that the APTC attribute needed to be constructed slightly differently. This works for me. <attribute type="AllowPartiallyTrustedCallersAttribute" asis="true"/> From: Ruben Rotteveel [mailto:[email protected]] Sent: Saturday, March 31, 2012 11:17 AM To: [email protected] Subject: [NAnt-users] new to Nant 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> ------=_NextPart_000_00E1_01CD10B4.3381BA70 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META = HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 12 = (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:windowtext;} span.EmailStyle18 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue = vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span = style=3D'color:#1F497D'>Hi Ruben,<o:p></o:p></span></p><p = class=3DMsoNormal><span = style=3D'color:#1F497D'><o:p> </o:p></span></p><p = class=3DMsoNormal><span style=3D'color:#1F497D'>I found that the APTC = attribute needed to be constructed slightly = differently.<o:p></o:p></span></p><p class=3DMsoNormal><span = style=3D'color:#1F497D'><o:p> </o:p></span></p><p = class=3DMsoNormal><span style=3D'color:#1F497D'>This works for = me.<o:p></o:p></span></p><p class=3DMsoNormal><span = style=3D'color:#1F497D'><o:p> </o:p></span></p><p = class=3DMsoNormal><span style=3D'color:#1F497D'><attribute = type=3D"AllowPartiallyTrustedCallersAttribute" = asis=3D"true"/><o:p></o:p></span></p><p = class=3DMsoNormal><span = style=3D'color:#1F497D'><o:p> </o:p></span></p><p = class=3DMsoNormal><span = style=3D'color:#1F497D'><o:p> </o:p></span></p><div><div = style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in = 0in 0in'><p class=3DMsoNormal><b><span = style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>= </b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> = Ruben Rotteveel [mailto:[email protected]] = <br><b>Sent:</b> Saturday, March 31, 2012 11:17 AM<br><b>To:</b> = [email protected]<br><b>Subject:</b> [NAnt-users] new to = Nant<o:p></o:p></span></p></div></div><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>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:<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal>‘…CommonAssemblyInfo.cs' could not be = generated.<o:p></o:p></p><p class=3DMsoNormal> = Assembly attribute with type 'AllowPartiallyTrustedCallers' could not be = loaded.<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal>Any help is greatly appreciated.<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>This is the = part that creates the assemblyinfo.<o:p></o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal><target = name=3D"update-common-assemblyinfo"><o:p></o:p></p><p = class=3DMsoNormal> <echo message=3D"Generating = common AssemblyInfo file..." /><o:p></o:p></p><p = class=3DMsoNormal> <!-- ensure = src/CommonAssemblyInfo.cs is writable if it already exists = --><o:p></o:p></p><p class=3DMsoNormal> <attrib = file=3D"${root.dir}\src\CommonAssemblyInfo.cs" = readonly=3D"false" = if=3D"${file::exists('${root.dir}\src\CommonAssemblyInfo.cs')}"= /><o:p></o:p></p><p class=3DMsoNormal> <!-- = generate the source file holding the common assembly-level attributes = --><o:p></o:p></p><p class=3DMsoNormal> <asminfo = output=3D"${root.dir}\src\CommonAssemblyInfo.cs" = language=3D"CSharp"><o:p></o:p></p><p = class=3DMsoNormal> = <imports><o:p></o:p></p><p = class=3DMsoNormal> <import = namespace=3D"System" /><o:p></o:p></p><p = class=3DMsoNormal> <import = namespace=3D"System.Security" /><o:p></o:p></p><p = class=3DMsoNormal> <import = namespace=3D"System.Reflection" /><o:p></o:p></p><p = class=3DMsoNormal> <import = namespace=3D"System.Runtime.InteropServices" = /><o:p></o:p></p><p class=3DMsoNormal> = </imports><o:p></o:p></p><p = class=3DMsoNormal> = <attributes><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"CLSCompliantAttribute" = value=3D"true" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"ComVisibleAttribute" = value=3D"false" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AssemblyProductAttribute" = value=3D"${product.fullname}" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AssemblyCompanyAttribute" = value=3D"${product.url}" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AssemblyCopyrightAttribute" = value=3D"${product.copyright}" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AssemblyTrademarkAttribute" = value=3D"Apache License, Version 2.0" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AssemblyCultureAttribute" = value=3D"" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AssemblyVersionAttribute" = value=3D"${project.version}" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AssemblyConfigurationAttribute" = value=3D"${project.framework}; ${project.version}; = ${project.buildtype}" /><o:p></o:p></p><p = class=3DMsoNormal> = <attribute type=3D"AllowPartiallyTrustedCallers" = value=3D"" /><o:p></o:p></p><p = class=3DMsoNormal> = </attributes><o:p></o:p></p><p = class=3DMsoNormal> </asminfo><o:p></o:p></p><p = class=3DMsoNormal> = </target><o:p></o:p></p></div></body></html> ------=_NextPart_000_00E1_01CD10B4.3381BA70-- --===============1526792394643882177== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure --===============1526792394643882177== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ NAnt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users --===============1526792394643882177==--