Note that there are some explanatory texts on larger screens.

plurals
  1. PONantcontrib <record> task
    primarykey
    data
    text
    <p>I am trying to attach a log file to email. </p> <p>My code is:</p> <pre class="lang-xml prettyprint-override"><code>**&lt;loadtasks assembly=".../tasks.dll" /&gt; &lt;record name="c:foo\log.txt" action="Start" /&gt; &lt;target name="email"&gt; &lt;mail from="abc@foo.com" tolist="xyz@foo.com" subject="Build" message="Build Failed" mailhost="smtp.anywhere.net"&gt; &lt;files&gt; &lt;include name="c:foo\log.txt" /&gt; &lt;/files&gt; &lt;attachment&gt; &lt;include name="c:foo\log.txt" /&gt; &lt;/attachment&gt; &lt;/mail&gt; &lt;/target&gt; &lt;record name="c:foo\log.txt" action="Close" /&gt;** </code></pre> <p>My command is:</p> <pre><code>nant -f:filename.build email -l:c:foo\log.txt </code></pre> <p>I get following error:</p> <pre><code>System.Security.SecurityException: Request for the permission of type 'System.Se curity.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMa rk&amp; stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.IO.FileSystemInfo.get_FullName() at NAnt.Contrib.Tasks.RecordTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Project.InitializeProjectDocument(XmlDocument doc) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() </code></pre> <p>When i dont use <code>&lt;record&gt;</code> tasks it gives another error like, could not attach txt file. bcoz it being used by another process.</p> <p>Why am I getting this error?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload