Re: new to Nant

Ruben Rotteveel <[email protected]> Mon, 2 Apr 2012 14:07:27 +0000
Newsgroups gmane.comp.windows.dotnet.nant.user
Message-ID <10A08DE450078E46971CF2353254623E9D0ED1@BY2PRD0510MB378.namprd05.prod.outlook.com>
--===============6095839113770658304==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_10A08DE450078E46971CF2353254623E9D0ED1BY2PRD0510MB378na_"

--_000_10A08DE450078E46971CF2353254623E9D0ED1BY2PRD0510MB378na_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Awesome, that worked.

From: Philip Sayers [mailto:[email protected]]
Sent: Monday, April 02, 2012 8:37 AM
To: [email protected]
Subject: Re: [NAnt-users] new to Nant

Hi Ruben,

I found that the APTC attribute needed to be constructed slightly different=
ly.

This works for me.

<attribute type=3D"AllowPartiallyTrustedCallersAttribute" asis=3D"true"/>


From: Ruben Rotteveel [mailto:[email protected]]<mailto:[ma=
ilto:[email protected]]>
Sent: Saturday, March 31, 2012 11:17 AM
To: [email protected]<mailto:[email protected]=
t>
Subject: [NAnt-users] new to Nant

I'm new to Nant and am editing a build script.  I need to build the assembl=
ies in my project to AllowPartiallyTrustedCallers, however when I add the a=
ttribute to the assemblyinfo builder I get the following error:

'...CommonAssemblyInfo.cs' could not be generated.
    Assembly attribute with type 'AllowPartiallyTrustedCallers' could not b=
e loaded.

Any help is greatly appreciated.

This is the part that creates the assemblyinfo.

<target name=3D"update-common-assemblyinfo">
    <echo message=3D"Generating common AssemblyInfo file..." />
    <!-- ensure src/CommonAssemblyInfo.cs is writable if it already exists =
-->
    <attrib file=3D"${root.dir}\src\CommonAssemblyInfo.cs" readonly=3D"fals=
e" if=3D"${file::exists('${root.dir}\src\CommonAssemblyInfo.cs')}" />
    <!-- generate the source file holding the common assembly-level attribu=
tes -->
    <asminfo output=3D"${root.dir}\src\CommonAssemblyInfo.cs" language=3D"C=
Sharp">
      <imports>
        <import namespace=3D"System" />
        <import namespace=3D"System.Security" />
        <import namespace=3D"System.Reflection" />
        <import namespace=3D"System.Runtime.InteropServices" />
      </imports>
      <attributes>
        <attribute type=3D"CLSCompliantAttribute" value=3D"true" />
        <attribute type=3D"ComVisibleAttribute" value=3D"false" />
        <attribute type=3D"AssemblyProductAttribute" value=3D"${product.ful=
lname}" />
        <attribute type=3D"AssemblyCompanyAttribute" value=3D"${product.url=
}" />
        <attribute type=3D"AssemblyCopyrightAttribute" value=3D"${product.c=
opyright}" />
        <attribute type=3D"AssemblyTrademarkAttribute" value=3D"Apache Lice=
nse, Version 2.0" />
        <attribute type=3D"AssemblyCultureAttribute" value=3D"" />
        <attribute type=3D"AssemblyVersionAttribute" value=3D"${project.ver=
sion}" />
        <attribute type=3D"AssemblyConfigurationAttribute" value=3D"${proje=
ct.framework}; ${project.version}; ${project.buildtype}" />
        <attribute type=3D"AllowPartiallyTrustedCallers" value=3D"" />
      </attributes>
    </asminfo>
  </target>

--_000_10A08DE450078E46971CF2353254623E9D0ED1BY2PRD0510MB378na_
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-micr=
osoft-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=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.EmailStyle18
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
span.EmailStyle21
	{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=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">Awesome, that worked.<=
o:p></o:p></span></p>
<p class=3D"MsoNormal"><a name=3D"_MailEndCompose"><span style=3D"color:#1F=
497D"><o:p>&nbsp;</o:p></span></a></p>
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in">
<p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:&quot=
;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style=3D"font-s=
ize:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Philip S=
ayers [mailto:[email protected]]
<br>
<b>Sent:</b> Monday, April 02, 2012 8:37 AM<br>
<b>To:</b> [email protected]<br>
<b>Subject:</b> Re: [NAnt-users] new to Nant<o:p></o:p></span></p>
</div>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">Hi Ruben,<o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p>&nbsp;</o:p></spa=
n></p>
<p class=3D"MsoNormal"><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=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p>&nbsp;</o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">This works for me.<o:p=
></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p>&nbsp;</o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D">&lt;attribute type=3D&=
quot;AllowPartiallyTrustedCallersAttribute&quot; asis=3D&quot;true&quot;/&g=
t;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p>&nbsp;</o:p></spa=
n></p>
<p class=3D"MsoNormal"><span style=3D"color:#1F497D"><o:p>&nbsp;</o:p></spa=
n></p>
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in">
<p class=3D"MsoNormal"><b><span style=3D"font-size:10.0pt;font-family:&quot=
;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style=3D"font-s=
ize:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Ruben Ro=
tteveel
<a href=3D"mailto:[mailto:[email protected]]">[mailto:rrott=
[email protected]]</a>
<br>
<b>Sent:</b> Saturday, March 31, 2012 11:17 AM<br>
<b>To:</b> <a href=3D"mailto:[email protected]">nant-users@l=
ists.sourceforge.net</a><br>
<b>Subject:</b> [NAnt-users] new to Nant<o:p></o:p></span></p>
</div>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">I&#8217;m new to Nant and am editing a build script.=
&nbsp; I need to build the assemblies in my project to AllowPartiallyTruste=
dCallers, however when I add the attribute to the assemblyinfo builder I ge=
t the following error:<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">&#8216;&#8230;CommonAssemblyInfo.cs' could not be ge=
nerated.<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp; Assembly attribute with type 'All=
owPartiallyTrustedCallers' could not be loaded.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Any help is greatly appreciated.<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">This is the part that creates the assemblyinfo.<o:p>=
</o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">&lt;target name=3D&quot;update-common-assemblyinfo&q=
uot;&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp; &lt;echo message=3D&quot;Generati=
ng common AssemblyInfo file...&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp; &lt;!-- ensure src/CommonAssembly=
Info.cs is writable if it already exists --&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp; &lt;attrib file=3D&quot;${root.di=
r}\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=3D"MsoNormal">&nbsp;&nbsp;&nbsp; &lt;!-- generate the source file =
holding the common assembly-level attributes --&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&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=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;imports&gt;<o:p><=
/o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;impor=
t namespace=3D&quot;System&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;impor=
t namespace=3D&quot;System.Security&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;impor=
t namespace=3D&quot;System.Reflection&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;impor=
t namespace=3D&quot;System.Runtime.InteropServices&quot; /&gt;<o:p></o:p></=
p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/imports&gt;<o:p>=
</o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attributes&gt;<o:=
p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;CLSCompliantAttribute&quot; value=3D&quot;true&quot; /&gt=
;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;ComVisibleAttribute&quot; value=3D&quot;false&quot; /&gt;=
<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AssemblyProductAttribute&quot; value=3D&quot;${product.fu=
llname}&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AssemblyCompanyAttribute&quot; value=3D&quot;${product.ur=
l}&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AssemblyCopyrightAttribute&quot; value=3D&quot;${product.=
copyright}&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AssemblyTrademarkAttribute&quot; value=3D&quot;Apache Lic=
ense, Version 2.0&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AssemblyCultureAttribute&quot; value=3D&quot;&quot; /&gt;=
<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AssemblyVersionAttribute&quot; value=3D&quot;${project.ve=
rsion}&quot; /&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AssemblyConfigurationAttribute&quot; value=3D&quot;${proj=
ect.framework}; ${project.version}; ${project.buildtype}&quot; /&gt;<o:p></=
o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;attri=
bute type=3D&quot;AllowPartiallyTrustedCallers&quot; value=3D&quot;&quot; /=
&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/attributes&gt;<o=
:p></o:p></p>
<p class=3D"MsoNormal">&nbsp;&nbsp;&nbsp; &lt;/asminfo&gt;<o:p></o:p></p>
<p class=3D"MsoNormal">&nbsp; &lt;/target&gt;<o:p></o:p></p>
</div>
</body>
</html>

--_000_10A08DE450078E46971CF2353254623E9D0ED1BY2PRD0510MB378na_--


--===============6095839113770658304==
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
--===============6095839113770658304==
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

--===============6095839113770658304==--