<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: NAnt &#8211; Detect 64-bit or 32-bit OS</title>
	<atom:link href="http://www.jaxidian.org/update/2009/07/16/50/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jaxidian.org/update/2009/07/16/50/</link>
	<description>Shane Milton&#039;s Technology Update</description>
	<lastBuildDate>Mon, 16 Jan 2012 22:52:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Shane Milton</title>
		<link>http://www.jaxidian.org/update/2009/07/16/50/comment-page-1/#comment-487</link>
		<dc:creator>Shane Milton</dc:creator>
		<pubDate>Tue, 02 Aug 2011 14:49:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaxidian.org/update/?p=50#comment-487</guid>
		<description>JonnyG: Does this link help you?

http://stackoverflow.com/questions/1215731/building-net-4-projects-with-nant

(Sorry, I&#039;m personally not doing much Nant these days but I seem to recall jumping through an extra hoop if you want to use Nant for .NET 4.0 apps. If this link doesn&#039;t help you, search around more on that topic. I don&#039;t believe this error has anything to do with 64-bit stuff.</description>
		<content:encoded><![CDATA[<p>JonnyG: Does this link help you?</p>
<p><a href="http://stackoverflow.com/questions/1215731/building-net-4-projects-with-nant" rel="nofollow">http://stackoverflow.com/questions/1215731/building-net-4-projects-with-nant</a></p>
<p>(Sorry, I&#8217;m personally not doing much Nant these days but I seem to recall jumping through an extra hoop if you want to use Nant for .NET 4.0 apps. If this link doesn&#8217;t help you, search around more on that topic. I don&#8217;t believe this error has anything to do with 64-bit stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JonnyG</title>
		<link>http://www.jaxidian.org/update/2009/07/16/50/comment-page-1/#comment-485</link>
		<dc:creator>JonnyG</dc:creator>
		<pubDate>Tue, 02 Aug 2011 14:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaxidian.org/update/?p=50#comment-485</guid>
		<description>I&#039;m getting a strange error on my Win7+.Net4 workstation when testing the above nant code. Any assistance would be extremely helpful!


NAnt 0.90 (Build 0.90.3780.0; release; 5/8/2010)

Buildfile: file:///c:/testproject/default.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: check.os.32or64bit

 [property] Target framework changed to &quot;Microsoft .NET Framework 4.0&quot;.
       [cd] Current directory changed to &quot;c:\testproject&quot;.

check.os.32or64bit:


BUILD FAILED

c:\testproject\default.build(116,4):
Error loading assembly &#039;C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll&#039;.
    Could not load file or assembly &#039;file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll&#039; or one of its dep
endencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Total time: 0.2 seconds.



Here is the Target:


	
		
		&lt;code&gt;
	&lt;script language=&quot;C#&quot; prefix=&quot;MyWin32Calls&quot;&gt;
		&lt;references&gt;&lt;include name=&quot;system.dll&quot;/&gt;&lt;/references&gt;
		&lt;code&gt;
			&lt;![CDATA[
					[System.Runtime.InteropServices.DllImport(&quot;kernel32.dll&quot;)]
					public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo);
		 
					[Function(&quot;IsWow64Process&quot;)]
					public bool IsWow64Process(){
						bool retVal = false;
						IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal);
						return retVal;
					}
			]]&gt;
		&lt;/code&gt;
	&lt;/script&gt;
	&lt;property name=&quot;IsWow64Process&quot; value=&quot;${MyWin32Calls::IsWow64Process()}&quot; /&gt;
	&lt;property name=&quot;Is64BitProcess&quot; value=&quot;${environment::get-variable(&#039;PROCESSOR_ARCHITECTURE&#039;)!=&#039;x86&#039;}&quot; /&gt;

	&lt;property name=&quot;Is64BitOperatingSystem&quot; value=&quot;${IsWow64Process or Is64BitProcess}&quot; /&gt;

	&lt;choose&gt;
		&lt;when test=&quot;${Is64BitOperatingSystem}&quot;&gt;
			&lt;echo message=&quot;The operating system you are running is 64-bit.&quot; /&gt;
		&lt;/when&gt;
		&lt;otherwise&gt;
			&lt;echo message=&quot;The operating system you are running is 32-bit.&quot; /&gt;
		&lt;/otherwise&gt;
	&lt;/choose&gt;

&lt;/target&gt;
		&lt;/code&gt;
	
	
	

	

	
		
			
		
		
			
		
	

</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting a strange error on my Win7+.Net4 workstation when testing the above nant code. Any assistance would be extremely helpful!</p>
<p>NAnt 0.90 (Build 0.90.3780.0; release; 5/8/2010)</p>
<p>Buildfile: file:///c:/testproject/default.build<br />
Target framework: Microsoft .NET Framework 2.0<br />
Target(s) specified: check.os.32or64bit</p>
<p> [property] Target framework changed to &#8220;Microsoft .NET Framework 4.0&#8243;.<br />
       [cd] Current directory changed to &#8220;c:\testproject&#8221;.</p>
<p>check.os.32or64bit:</p>
<p>BUILD FAILED</p>
<p>c:\testproject\default.build(116,4):<br />
Error loading assembly &#8216;C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll&#8217;.<br />
    Could not load file or assembly &#8216;file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll&#8217; or one of its dep<br />
endencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.</p>
<p>Total time: 0.2 seconds.</p>
<p>Here is the Target:</p>
<p>		<code><br />
	&lt;script language="C#" prefix="MyWin32Calls"&gt;<br />
		&lt;references&gt;&lt;include name="system.dll"/&gt;&lt;/references&gt;<br />
		&lt;code&gt;<br />
			&lt;![CDATA[<br />
					[System.Runtime.InteropServices.DllImport("kernel32.dll")]<br />
					public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo);</p>
<p>					[Function("IsWow64Process")]<br />
					public bool IsWow64Process(){<br />
						bool retVal = false;<br />
						IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal);<br />
						return retVal;<br />
					}<br />
			]]&gt;<br />
		&lt;/code&gt;<br />
	&lt;/script&gt;<br />
	&lt;property name="IsWow64Process" value="${MyWin32Calls::IsWow64Process()}" /&gt;<br />
	&lt;property name="Is64BitProcess" value="${environment::get-variable('PROCESSOR_ARCHITECTURE')!='x86'}" /&gt;</p>
<p>	&lt;property name="Is64BitOperatingSystem" value="${IsWow64Process or Is64BitProcess}" /&gt;</p>
<p>	&lt;choose&gt;<br />
		&lt;when test="${Is64BitOperatingSystem}"&gt;<br />
			&lt;echo message="The operating system you are running is 64-bit." /&gt;<br />
		&lt;/when&gt;<br />
		&lt;otherwise&gt;<br />
			&lt;echo message="The operating system you are running is 32-bit." /&gt;<br />
		&lt;/otherwise&gt;<br />
	&lt;/choose&gt;</p>
<p>&lt;/target&gt;<br />
		</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boyan Kostadinov</title>
		<link>http://www.jaxidian.org/update/2009/07/16/50/comment-page-1/#comment-417</link>
		<dc:creator>Boyan Kostadinov</dc:creator>
		<pubDate>Tue, 07 Sep 2010 02:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaxidian.org/update/?p=50#comment-417</guid>
		<description>&lt;references&gt;
	&lt;include name=&quot;System.dll&quot; /&gt;
&lt;/references&gt;</description>
		<content:encoded><![CDATA[<p>&lt;references&gt;<br />
	&lt;include name=&#8221;System.dll&#8221; /&gt;<br />
&lt;/references&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boyan Kostadinov</title>
		<link>http://www.jaxidian.org/update/2009/07/16/50/comment-page-1/#comment-416</link>
		<dc:creator>Boyan Kostadinov</dc:creator>
		<pubDate>Tue, 07 Sep 2010 01:58:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaxidian.org/update/?p=50#comment-416</guid>
		<description>You are probably using a newer build of NAnt (0.91 Alpha 1/2) instead of 0.85. Just reference the System.dll like so:

	
</description>
		<content:encoded><![CDATA[<p>You are probably using a newer build of NAnt (0.91 Alpha 1/2) instead of 0.85. Just reference the System.dll like so:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Lam</title>
		<link>http://www.jaxidian.org/update/2009/07/16/50/comment-page-1/#comment-407</link>
		<dc:creator>Joseph Lam</dc:creator>
		<pubDate>Tue, 01 Jun 2010 00:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaxidian.org/update/?p=50#comment-407</guid>
		<description>I&#039;m getting this error on my Windows 7 64bit w/ .NET framework 4.0:
Compilation failed:
c:\Users\joseph\AppData\Local\Temp\r7m0eqss.0.cs(31,39) : error CS0234: The type or namespace name &#039;Process&#039; does not exist in the namespace &#039;System.Diagnostics
&#039; (are you missing an assembly reference?)
//------------------------------------------------------------------------------
// 
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.4927
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// 
//------------------------------------------------------------------------------

using NAnt.Core;
using NAnt.Core.Attributes;
using System;
using System.Collections;
using System.IO;
using System.Text;



[FunctionSet(&quot;MyWin32Calls&quot;, &quot;MyWin32Calls&quot;)]
public class nant23f3bc35e8124e1f98591b0f08c9e8c5 : NAnt.Core.FunctionSetBase {


   [System.Runtime.InteropServices.DllImport(&quot;kernel32.dll&quot;)]
   public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo);

   [Function(&quot;IsWow64Process&quot;)]
   public bool IsWow64Process()
   {
    bool retVal = false;
    IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal);
    return retVal;
   }


    public nant23f3bc35e8124e1f98591b0f08c9e8c5(NAnt.Core.Project project, NAnt.Core.PropertyDictionary propDict) :
            base(project, propDict) {
    }
}</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting this error on my Windows 7 64bit w/ .NET framework 4.0:<br />
Compilation failed:<br />
c:\Users\joseph\AppData\Local\Temp\r7m0eqss.0.cs(31,39) : error CS0234: The type or namespace name &#8216;Process&#8217; does not exist in the namespace &#8216;System.Diagnostics<br />
&#8216; (are you missing an assembly reference?)<br />
//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
//<br />
//     This code was generated by a tool.<br />
//     Runtime Version:2.0.50727.4927<br />
//<br />
//     Changes to this file may cause incorrect behavior and will be lost if<br />
//     the code is regenerated.<br />
//<br />
//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>using NAnt.Core;<br />
using NAnt.Core.Attributes;<br />
using System;<br />
using System.Collections;<br />
using System.IO;<br />
using System.Text;</p>
<p>[FunctionSet("MyWin32Calls", "MyWin32Calls")]<br />
public class nant23f3bc35e8124e1f98591b0f08c9e8c5 : NAnt.Core.FunctionSetBase {</p>
<p>   [System.Runtime.InteropServices.DllImport("kernel32.dll")]<br />
   public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo);</p>
<p>   [Function("IsWow64Process")]<br />
   public bool IsWow64Process()<br />
   {<br />
    bool retVal = false;<br />
    IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out retVal);<br />
    return retVal;<br />
   }</p>
<p>    public nant23f3bc35e8124e1f98591b0f08c9e8c5(NAnt.Core.Project project, NAnt.Core.PropertyDictionary propDict) :<br />
            base(project, propDict) {<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

