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>&nbsp;</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>&nbsp;</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>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span style=3D'color:#1F497D'>&lt;attribute =
type=3D&quot;AllowPartiallyTrustedCallersAttribute&quot; =
asis=3D&quot;true&quot;/&gt;<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'color:#1F497D'><o:p>&nbsp;</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>&nbsp;</o:p></p><p class=3DMsoNormal>I&#8217;m =
new to Nant and am editing a build script.&nbsp; 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>&nbsp;</o:p></p><p =
class=3DMsoNormal>&#8216;&#8230;CommonAssemblyInfo.cs' could not be =
generated.<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; =
Assembly attribute with type 'AllowPartiallyTrustedCallers' could not be =
loaded.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>Any help is greatly appreciated.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>This is the =
part that creates the assemblyinfo.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>&lt;target =
name=3D&quot;update-common-assemblyinfo&quot;&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp; &lt;echo message=3D&quot;Generating =
common AssemblyInfo file...&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- ensure =
src/CommonAssemblyInfo.cs is writable if it already exists =
--&gt;<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; &lt;attrib =
file=3D&quot;${root.dir}\src\CommonAssemblyInfo.cs&quot; =
readonly=3D&quot;false&quot; =
if=3D&quot;${file::exists('${root.dir}\src\CommonAssemblyInfo.cs')}&quot;=
 /&gt;<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; &lt;!-- =
generate the source file holding the common assembly-level attributes =
--&gt;<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; &lt;asminfo =
output=3D&quot;${root.dir}\src\CommonAssemblyInfo.cs&quot; =
language=3D&quot;CSharp&quot;&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;imports&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;import =
namespace=3D&quot;System&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;import =
namespace=3D&quot;System.Security&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;import =
namespace=3D&quot;System.Reflection&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;import =
namespace=3D&quot;System.Runtime.InteropServices&quot; =
/&gt;<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;/imports&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attributes&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;CLSCompliantAttribute&quot; =
value=3D&quot;true&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;ComVisibleAttribute&quot; =
value=3D&quot;false&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AssemblyProductAttribute&quot; =
value=3D&quot;${product.fullname}&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AssemblyCompanyAttribute&quot; =
value=3D&quot;${product.url}&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AssemblyCopyrightAttribute&quot; =
value=3D&quot;${product.copyright}&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AssemblyTrademarkAttribute&quot; =
value=3D&quot;Apache License, Version 2.0&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AssemblyCultureAttribute&quot; =
value=3D&quot;&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AssemblyVersionAttribute&quot; =
value=3D&quot;${project.version}&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AssemblyConfigurationAttribute&quot; =
value=3D&quot;${project.framework}; ${project.version}; =
${project.buildtype}&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;attribute type=3D&quot;AllowPartiallyTrustedCallers&quot; =
value=3D&quot;&quot; /&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;/attributes&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp; &lt;/asminfo&gt;<o:p></o:p></p><p =
class=3DMsoNormal>&nbsp; =
&lt;/target&gt;<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==--