Refactor with intermediate connection factory that will instantiate the correct 32-bit or 64-bit version of the ZMQ provider library.
Fixes [AMQNET-333]. (See https://issues.apache.org/jira/browse/AMQNET-333)

diff --git a/src/main/csharp/CommonAssemblyInfo.cs b/src/main/csharp/CommonAssemblyInfo.cs
index 9200195..03f373c 100644
--- a/src/main/csharp/CommonAssemblyInfo.cs
+++ b/src/main/csharp/CommonAssemblyInfo.cs
@@ -20,7 +20,7 @@
 [assembly: AssemblyConfigurationAttribute("SNAPSHOT")]

 [assembly: AssemblyCompanyAttribute("http://activemq.apache.org/nms")]

 [assembly: AssemblyProductAttribute("Apache NMS for ZMQ Class Library")]

-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2011 Apache Software Foundation")]

+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2011 Apache Software Foundation")]

 [assembly: AssemblyTrademarkAttribute("")]

 [assembly: AssemblyCultureAttribute("")]

 [assembly: AssemblyVersionAttribute("1.0.0.1")]

diff --git a/src/main/csharp/CommonConnectionFactory.cs b/src/main/csharp/CommonConnectionFactory.cs
new file mode 100644
index 0000000..c7adbf8
--- /dev/null
+++ b/src/main/csharp/CommonConnectionFactory.cs
@@ -0,0 +1,149 @@
+/*

+ * Licensed to the Apache Software Foundation (ASF) under one or more

+ * contributor license agreements.  See the NOTICE file distributed with

+ * this work for additional information regarding copyright ownership.

+ * The ASF licenses this file to You under the Apache License, Version 2.0

+ * (the "License"); you may not use this file except in compliance with

+ * the License.  You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+

+using System;

+using System.Reflection;

+

+namespace Apache.NMS.ZMQ

+{

+	/// <summary>

+	/// A Factory that will instantiate a 32-bit or 64-bit version of the provider

+	/// as determined by the runtime environment.  This factory delegates instantiation responsibilities

+	/// to the real factory.  This is only in place so that the correct bit-version can be loaded.

+	/// This factory indirection is necessary due to the low-level dependency on a 32-bit or 64-bit native DLL.

+	/// To avoid a DLL load failure, we have to ensure we dynamically link to the correct version.

+	/// </summary>

+	public class ConnectionFactory : IConnectionFactory

+	{

+		// Checking the runtime size of an IntPtr will tell us our runtime environment.

+		// 32-bit runtime's IntPtr size is 4.

+		// 64-bit runtimes' ItrPtr size is 8.

+		static private bool is32bit = (IntPtr.Size == 4);

+

+		private static Type factoryType = null;

+		private IConnectionFactory connFactory = null;

+

+		private const string DEFAULT_BROKER_URL = "tcp://localhost:5556";

+		private const string ENV_BROKER_URL = "ZMQ_BROKER_URL";

+

+		/// <summary>

+		/// Static class constructor that is executed only once before any normal object constructors.

+		/// This is the type constructor.

+		/// </summary>

+		static ConnectionFactory()

+		{

+			// Load the assembly and get the type.

+			string assemblyFileName = (is32bit ? "Apache.NMS.ZMQ32.dll" : "Apache.NMS.ZMQ64.dll");

+			Assembly assembly;

+

+			try

+			{

+				assembly = Assembly.Load(assemblyFileName);

+				if(null != assembly)

+				{

+					Tracer.DebugFormat("Succesfully loaded provider: {0}", assemblyFileName);

+					factoryType = assembly.GetType("Apache.NMS.ZMQ.ConnectionFactory", true, true);

+				}

+			}

+			catch(Exception ex)

+			{

+				Tracer.ErrorFormat("Exception loading assembly {0} failed: {1}", assemblyFileName, ex.Message);

+				factoryType = null;

+			}

+		}

+

+		private static string GetDefaultBrokerUrl()

+		{

+			string brokerUrl = Environment.GetEnvironmentVariable(ENV_BROKER_URL);

+

+			if(string.IsNullOrEmpty(brokerUrl))

+			{

+				brokerUrl = DEFAULT_BROKER_URL;

+			}

+

+			return brokerUrl;

+		}

+

+		public ConnectionFactory()

+			: this(GetDefaultBrokerUrl())

+		{

+		}

+

+		public ConnectionFactory(string brokerUri)

+			: this(brokerUri, null)

+		{

+		}

+

+		public ConnectionFactory(string brokerUri, string clientID)

+			: this(new Uri(brokerUri), clientID)

+		{

+		}

+

+		public ConnectionFactory(Uri brokerUri)

+			: this(brokerUri, null)

+		{

+		}

+

+		public ConnectionFactory(Uri brokerUri, string clientID)

+		{

+			if(null == factoryType)

+			{

+				throw new ApplicationException("Could not load the ZMQ connection factory assembly.");

+			}

+

+			connFactory = (IConnectionFactory) Activator.CreateInstance(factoryType, new object[] { brokerUri, clientID });

+		}

+

+		#region IConnectionFactory Members

+

+		public Uri BrokerUri

+		{

+			get { return connFactory.BrokerUri; }

+			set { connFactory.BrokerUri = value; }

+		}

+

+		public ConsumerTransformerDelegate ConsumerTransformer

+		{

+			get { return connFactory.ConsumerTransformer; }

+			set { connFactory.ConsumerTransformer = value; }

+		}

+

+		public IConnection CreateConnection(string userName, string password)

+		{

+			return connFactory.CreateConnection(userName, password);

+		}

+

+		public IConnection CreateConnection()

+		{

+			return connFactory.CreateConnection();

+		}

+

+		public ProducerTransformerDelegate ProducerTransformer

+		{

+			get { return connFactory.ProducerTransformer; }

+			set { connFactory.ProducerTransformer = value; }

+		}

+

+		public IRedeliveryPolicy RedeliveryPolicy

+		{

+			get { return connFactory.RedeliveryPolicy; }

+			set { connFactory.RedeliveryPolicy = value; }

+		}

+

+		#endregion

+	}

+}

diff --git a/src/main/csharp/ConnectionFactory.cs b/src/main/csharp/ConnectionFactory.cs
index 8902bf7..61afa0e 100644
--- a/src/main/csharp/ConnectionFactory.cs
+++ b/src/main/csharp/ConnectionFactory.cs
@@ -24,41 +24,9 @@
 	/// </summary>

 	public class ConnectionFactory : IConnectionFactory

 	{

-		public const string DEFAULT_BROKER_URL = "zmq://localhost";

-		public const string ENV_BROKER_URL = "ZMQ_BROKER_URL";

 		private Uri brokerUri;

-		private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();

 		private string clientID;

-

-		public static string GetDefaultBrokerUrl()

-		{

-			string answer = Environment.GetEnvironmentVariable(ENV_BROKER_URL);

-			if(answer == null)

-			{

-				answer = DEFAULT_BROKER_URL;

-			}

-			return answer;

-		}

-

-		public ConnectionFactory()

-			: this(GetDefaultBrokerUrl())

-		{

-		}

-

-		public ConnectionFactory(string brokerUri)

-			: this(brokerUri, null)

-		{

-		}

-

-		public ConnectionFactory(string brokerUri, string clientID)

-			: this(new Uri(brokerUri), clientID)

-		{

-		}

-

-		public ConnectionFactory(Uri brokerUri)

-			: this(brokerUri, null)

-		{

-		}

+		private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();

 

 		public ConnectionFactory(Uri brokerUri, string clientID)

 		{

diff --git a/src/test/csharp/ZMQTest.cs b/src/test/csharp/ZMQTest.cs
index f3f492c..189e248 100644
--- a/src/test/csharp/ZMQTest.cs
+++ b/src/test/csharp/ZMQTest.cs
@@ -69,8 +69,8 @@
 			////////////////////////////

 			// Factory check

 			////////////////////////////

-			Apache.NMS.ZMQ.ConnectionFactory factory = new Apache.NMS.ZMQ.ConnectionFactory("zmq:tcp://localhost:5556", "");

-			Assert.IsNotNull(factory);

+			IConnectionFactory factory = new ConnectionFactory("tcp://localhost:5556", "");

+			Assert.IsNotNull(factory, "Error creating connection factory.");

 

 			////////////////////////////

 			// Connection check

@@ -96,7 +96,7 @@
 			////////////////////////////

 			// Consumer check

 			////////////////////////////

-			IQueue testQueue = new Queue("ZMQTestQueue");

+			IQueue testQueue = session.GetQueue("ZMQTestQueue");

 			Assert.IsNotNull(testQueue, "Error creating test queue.");

 			IMessageConsumer consumer = session.CreateConsumer(testQueue);

 			Assert.IsNotNull(consumer, "Error creating consumer.");

@@ -107,7 +107,7 @@
 			// Producer check

 			////////////////////////////

 			IMessageProducer producer = session.CreateProducer(testQueue);

-			Assert.IsNotNull(consumer);

+			Assert.IsNotNull(consumer, "Error creating producer.");

 

 			ITextMessage testMsg = producer.CreateTextMessage("Zero Message.");

 			Assert.IsNotNull(testMsg, "Error creating test message.");

diff --git a/vs2010-zmq-net-4.0-test.csproj b/vs2010-zmq-net-4.0-test.csproj
index 9c2eca8..2b01eb7 100644
--- a/vs2010-zmq-net-4.0-test.csproj
+++ b/vs2010-zmq-net-4.0-test.csproj
@@ -90,12 +90,6 @@
     <Compile Include="src\test\csharp\ZMQTest.cs" />

   </ItemGroup>

   <ItemGroup>

-    <ProjectReference Include="vs2010-zmq-net-4.0.csproj">

-      <Project>{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}</Project>

-      <Name>vs2008-msmq</Name>

-    </ProjectReference>

-  </ItemGroup>

-  <ItemGroup>

     <BootstrapperPackage Include="Microsoft.Net.Client.3.5">

       <Visible>False</Visible>

       <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>

@@ -127,6 +121,12 @@
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

     </None>

   </ItemGroup>

+  <ItemGroup>

+    <ProjectReference Include="vs2010-zmq-net-4.0.csproj">

+      <Project>{5AA5A595-FF56-444D-A7BD-988001619FDC}</Project>

+      <Name>vs2010-zmq-net-4.0</Name>

+    </ProjectReference>

+  </ItemGroup>

   <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />

   <PropertyGroup>

     <PostBuildEvent>

diff --git a/vs2010-zmq-net-4.0.csproj b/vs2010-zmq-net-4.0.csproj
index 5df4ec7..48c01a0 100644
--- a/vs2010-zmq-net-4.0.csproj
+++ b/vs2010-zmq-net-4.0.csproj
@@ -1,51 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

   <PropertyGroup>

     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

-    <ProductVersion>9.0.30729</ProductVersion>

+    <ProductVersion>8.0.30703</ProductVersion>

     <SchemaVersion>2.0</SchemaVersion>

-    <ProjectGuid>{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}</ProjectGuid>

+    <ProjectGuid>{5AA5A595-FF56-444D-A7BD-988001619FDC}</ProjectGuid>

     <OutputType>Library</OutputType>

+    <AppDesignerFolder>Properties</AppDesignerFolder>

     <RootNamespace>Apache.NMS.ZMQ</RootNamespace>

     <AssemblyName>Apache.NMS.ZMQ</AssemblyName>

-    <WarningLevel>4</WarningLevel>

-    <StartupObject>

-    </StartupObject>

-    <SignAssembly>true</SignAssembly>

-    <AssemblyOriginatorKeyFile>

-    </AssemblyOriginatorKeyFile>

-    <FileUpgradeFlags>

-    </FileUpgradeFlags>

-    <OldToolsVersion>3.5</OldToolsVersion>

-    <UpgradeBackupLocation>

-    </UpgradeBackupLocation>

-    <PublishUrl>publish\</PublishUrl>

-    <Install>true</Install>

-    <InstallFrom>Disk</InstallFrom>

-    <UpdateEnabled>false</UpdateEnabled>

-    <UpdateMode>Foreground</UpdateMode>

-    <UpdateInterval>7</UpdateInterval>

-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>

-    <UpdatePeriodically>false</UpdatePeriodically>

-    <UpdateRequired>false</UpdateRequired>

-    <MapFileExtensions>true</MapFileExtensions>

-    <ApplicationRevision>0</ApplicationRevision>

-    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>

-    <IsWebBootstrapper>false</IsWebBootstrapper>

-    <UseApplicationTrust>false</UseApplicationTrust>

-    <BootstrapperEnabled>true</BootstrapperEnabled>

-    <SccProjectName>

-    </SccProjectName>

-    <SccLocalPath>

-    </SccLocalPath>

-    <SccAuxPath>

-    </SccAuxPath>

-    <SccProvider>

-    </SccProvider>

-    <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>

     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

-    <TargetFrameworkProfile />

+    <FileAlignment>512</FileAlignment>

     <BaseIntermediateOutputPath>obj\net-4.0</BaseIntermediateOutputPath>

   </PropertyGroup>

   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

@@ -53,89 +19,39 @@
     <DebugType>full</DebugType>

     <Optimize>false</Optimize>

     <OutputPath>bin\net-4.0\Debug\</OutputPath>

-    <DefineConstants>TRACE;DEBUG;NET</DefineConstants>

-    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>

-    <RegisterForComInterop>false</RegisterForComInterop>

-    <PlatformTarget>AnyCPU</PlatformTarget>

-    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>

+    <DefineConstants>DEBUG;TRACE</DefineConstants>

+    <ErrorReport>prompt</ErrorReport>

+    <WarningLevel>4</WarningLevel>

   </PropertyGroup>

   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

-    <DebugSymbols>true</DebugSymbols>

+    <DebugType>pdbonly</DebugType>

     <Optimize>true</Optimize>

     <OutputPath>bin\net-4.0\Release\</OutputPath>

-    <DefineConstants>TRACE;NET</DefineConstants>

-    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>

-    <DebugType>full</DebugType>

+    <DefineConstants>TRACE</DefineConstants>

+    <ErrorReport>prompt</ErrorReport>

+    <WarningLevel>4</WarningLevel>

   </PropertyGroup>

   <ItemGroup>

-    <Reference Include="Apache.NMS, Version=1.5.0.2363, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">

+    <Reference Include="Apache.NMS, Version=1.5.1.2378, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">

       <SpecificVersion>False</SpecificVersion>

       <HintPath>lib\Apache.NMS\net-4.0\Apache.NMS.dll</HintPath>

     </Reference>

-    <Reference Include="clrzmq64">

-      <HintPath>lib\clrzmq\net-4.0\clrzmq64.dll</HintPath>

-    </Reference>

     <Reference Include="System" />

+    <Reference Include="System.Core" />

+    <Reference Include="Microsoft.CSharp" />

     <Reference Include="System.Data" />

-    <Reference Include="System.Messaging" />

     <Reference Include="System.Xml" />

   </ItemGroup>

   <ItemGroup>

-    <Compile Include="src\main\csharp\BaseMessage.cs" />

-    <Compile Include="src\main\csharp\BytesMessage.cs">

-      <SubType>Code</SubType>

-    </Compile>

     <Compile Include="src\main\csharp\CommonAssemblyInfo.cs" />

-    <Compile Include="src\main\csharp\Connection.cs" />

-    <Compile Include="src\main\csharp\ConnectionFactory.cs" />

-    <Compile Include="src\main\csharp\ConnectionMetaData.cs" />

-    <Compile Include="src\main\csharp\TemporaryTopic.cs" />

-    <Compile Include="src\main\csharp\Topic.cs" />

-    <Compile Include="src\main\csharp\TemporaryQueue.cs" />

-    <Compile Include="src\main\csharp\DefaultMessageConverter.cs" />

-    <Compile Include="src\main\csharp\Destination.cs" />

-    <Compile Include="src\main\csharp\IMessageConverter.cs" />

-    <Compile Include="src\main\csharp\MapMessage.cs" />

-    <Compile Include="src\main\csharp\MessageConsumer.cs" />

-    <Compile Include="src\main\csharp\MessageProducer.cs" />

-    <Compile Include="src\main\csharp\ObjectMessage.cs" />

-    <Compile Include="src\main\csharp\Queue.cs" />

-    <Compile Include="src\main\csharp\Session.cs" />

-    <Compile Include="src\main\csharp\StreamMessage.cs">

-      <SubType>Code</SubType>

-    </Compile>

-    <Compile Include="src\main\csharp\TextMessage.cs" />

-    <Compile Include="src\main\csharp\ZmqSubscriber.cs" />

-    <Compile Include="src\main\csharp\ZmqMessage.cs" />

+    <Compile Include="src\main\csharp\CommonConnectionFactory.cs" />

   </ItemGroup>

-  <ItemGroup>

-    <Content Include="lib\clrzmq\net-4.0\libzmq64.dll">

-      <Link>libzmq64.dll</Link>

-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

-    </Content>

-  </ItemGroup>

-  <ItemGroup>

-    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">

-      <Visible>False</Visible>

-      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>

-      <Install>true</Install>

-    </BootstrapperPackage>

-    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">

-      <Visible>False</Visible>

-      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>

-      <Install>false</Install>

-    </BootstrapperPackage>

-    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">

-      <Visible>False</Visible>

-      <ProductName>.NET Framework 3.5</ProductName>

-      <Install>false</Install>

-    </BootstrapperPackage>

-  </ItemGroup>

-  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />

-  <PropertyGroup>

-    <PreBuildEvent>

-    </PreBuildEvent>

-    <PostBuildEvent>

-    </PostBuildEvent>

-  </PropertyGroup>

+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

+       Other similar extension points exist, see Microsoft.Common.targets.

+  <Target Name="BeforeBuild">

+  </Target>

+  <Target Name="AfterBuild">

+  </Target>

+  -->

 </Project>
\ No newline at end of file
diff --git a/vs2010-zmq-net-4.0x64.csproj b/vs2010-zmq-net-4.0x64.csproj
new file mode 100644
index 0000000..68c55a7
--- /dev/null
+++ b/vs2010-zmq-net-4.0x64.csproj
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>

+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

+  <PropertyGroup>

+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

+    <ProductVersion>9.0.30729</ProductVersion>

+    <SchemaVersion>2.0</SchemaVersion>

+    <ProjectGuid>{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}</ProjectGuid>

+    <OutputType>Library</OutputType>

+    <RootNamespace>Apache.NMS.ZMQ</RootNamespace>

+    <AssemblyName>Apache.NMS.ZMQ64</AssemblyName>

+    <WarningLevel>4</WarningLevel>

+    <StartupObject>

+    </StartupObject>

+    <SignAssembly>true</SignAssembly>

+    <AssemblyOriginatorKeyFile>

+    </AssemblyOriginatorKeyFile>

+    <FileUpgradeFlags>

+    </FileUpgradeFlags>

+    <OldToolsVersion>3.5</OldToolsVersion>

+    <UpgradeBackupLocation>

+    </UpgradeBackupLocation>

+    <PublishUrl>publish\</PublishUrl>

+    <Install>true</Install>

+    <InstallFrom>Disk</InstallFrom>

+    <UpdateEnabled>false</UpdateEnabled>

+    <UpdateMode>Foreground</UpdateMode>

+    <UpdateInterval>7</UpdateInterval>

+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>

+    <UpdatePeriodically>false</UpdatePeriodically>

+    <UpdateRequired>false</UpdateRequired>

+    <MapFileExtensions>true</MapFileExtensions>

+    <ApplicationRevision>0</ApplicationRevision>

+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>

+    <IsWebBootstrapper>false</IsWebBootstrapper>

+    <UseApplicationTrust>false</UseApplicationTrust>

+    <BootstrapperEnabled>true</BootstrapperEnabled>

+    <SccProjectName>

+    </SccProjectName>

+    <SccLocalPath>

+    </SccLocalPath>

+    <SccAuxPath>

+    </SccAuxPath>

+    <SccProvider>

+    </SccProvider>

+    <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>

+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

+    <TargetFrameworkProfile />

+    <BaseIntermediateOutputPath>obj\net-4.0</BaseIntermediateOutputPath>

+  </PropertyGroup>

+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

+    <DebugSymbols>true</DebugSymbols>

+    <DebugType>full</DebugType>

+    <Optimize>false</Optimize>

+    <OutputPath>bin\net-4.0\Debug\</OutputPath>

+    <DefineConstants>TRACE;DEBUG;NET</DefineConstants>

+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>

+    <RegisterForComInterop>false</RegisterForComInterop>

+    <PlatformTarget>AnyCPU</PlatformTarget>

+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>

+  </PropertyGroup>

+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

+    <DebugSymbols>true</DebugSymbols>

+    <Optimize>true</Optimize>

+    <OutputPath>bin\net-4.0\Release\</OutputPath>

+    <DefineConstants>TRACE;NET</DefineConstants>

+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>

+    <DebugType>full</DebugType>

+  </PropertyGroup>

+  <ItemGroup>

+    <Reference Include="Apache.NMS, Version=1.5.0.2363, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">

+      <SpecificVersion>False</SpecificVersion>

+      <HintPath>lib\Apache.NMS\net-4.0\Apache.NMS.dll</HintPath>

+    </Reference>

+    <Reference Include="clrzmq64">

+      <HintPath>lib\clrzmq\net-4.0\clrzmq64.dll</HintPath>

+    </Reference>

+    <Reference Include="System" />

+    <Reference Include="System.Data" />

+    <Reference Include="System.Messaging" />

+    <Reference Include="System.Xml" />

+  </ItemGroup>

+  <ItemGroup>

+    <Compile Include="src\main\csharp\BaseMessage.cs" />

+    <Compile Include="src\main\csharp\BytesMessage.cs">

+      <SubType>Code</SubType>

+    </Compile>

+    <Compile Include="src\main\csharp\CommonAssemblyInfo.cs" />

+    <Compile Include="src\main\csharp\Connection.cs" />

+    <Compile Include="src\main\csharp\ConnectionFactory.cs" />

+    <Compile Include="src\main\csharp\ConnectionMetaData.cs" />

+    <Compile Include="src\main\csharp\TemporaryTopic.cs" />

+    <Compile Include="src\main\csharp\Topic.cs" />

+    <Compile Include="src\main\csharp\TemporaryQueue.cs" />

+    <Compile Include="src\main\csharp\DefaultMessageConverter.cs" />

+    <Compile Include="src\main\csharp\Destination.cs" />

+    <Compile Include="src\main\csharp\IMessageConverter.cs" />

+    <Compile Include="src\main\csharp\MapMessage.cs" />

+    <Compile Include="src\main\csharp\MessageConsumer.cs" />

+    <Compile Include="src\main\csharp\MessageProducer.cs" />

+    <Compile Include="src\main\csharp\ObjectMessage.cs" />

+    <Compile Include="src\main\csharp\Queue.cs" />

+    <Compile Include="src\main\csharp\Session.cs" />

+    <Compile Include="src\main\csharp\StreamMessage.cs">

+      <SubType>Code</SubType>

+    </Compile>

+    <Compile Include="src\main\csharp\TextMessage.cs" />

+    <Compile Include="src\main\csharp\ZmqSubscriber.cs" />

+    <Compile Include="src\main\csharp\ZmqMessage.cs" />

+  </ItemGroup>

+  <ItemGroup>

+    <Content Include="lib\clrzmq\net-4.0\libzmq64.dll">

+      <Link>libzmq64.dll</Link>

+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+    </Content>

+  </ItemGroup>

+  <ItemGroup>

+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">

+      <Visible>False</Visible>

+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>

+      <Install>true</Install>

+    </BootstrapperPackage>

+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">

+      <Visible>False</Visible>

+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>

+      <Install>false</Install>

+    </BootstrapperPackage>

+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">

+      <Visible>False</Visible>

+      <ProductName>.NET Framework 3.5</ProductName>

+      <Install>false</Install>

+    </BootstrapperPackage>

+  </ItemGroup>

+  <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />

+  <PropertyGroup>

+    <PreBuildEvent>

+    </PreBuildEvent>

+    <PostBuildEvent>

+    </PostBuildEvent>

+  </PropertyGroup>

+</Project>
\ No newline at end of file
diff --git a/vs2010-zmq.sln b/vs2010-zmq.sln
index 7613c62..d580289 100644
--- a/vs2010-zmq.sln
+++ b/vs2010-zmq.sln
@@ -1,11 +1,17 @@
 

 Microsoft Visual Studio Solution File, Format Version 11.00

 # Visual Studio 2010

-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2010-zmq-net-4.0", "vs2010-zmq-net-4.0.csproj", "{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}"

+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2010-zmq-net-4.0x64", "vs2010-zmq-net-4.0x64.csproj", "{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}"

 EndProject

 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2010-zmq-net-4.0-test", "vs2010-zmq-net-4.0-test.csproj", "{2F31ED5C-44A2-464A-BD55-2B5B010654E8}"

 EndProject

+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2010-zmq-net-4.0", "vs2010-zmq-net-4.0.csproj", "{5AA5A595-FF56-444D-A7BD-988001619FDC}"

+EndProject

 Global

+	GlobalSection(SubversionScc) = preSolution

+		Svn-Managed = True

+		Manager = AnkhSVN - Subversion Support for Visual Studio

+	EndGlobalSection

 	GlobalSection(SolutionConfigurationPlatforms) = preSolution

 		Debug|Any CPU = Debug|Any CPU

 		Release|Any CPU = Release|Any CPU

@@ -19,12 +25,12 @@
 		{2F31ED5C-44A2-464A-BD55-2B5B010654E8}.Debug|Any CPU.Build.0 = Debug|Any CPU

 		{2F31ED5C-44A2-464A-BD55-2B5B010654E8}.Release|Any CPU.ActiveCfg = Release|Any CPU

 		{2F31ED5C-44A2-464A-BD55-2B5B010654E8}.Release|Any CPU.Build.0 = Release|Any CPU

+		{5AA5A595-FF56-444D-A7BD-988001619FDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

+		{5AA5A595-FF56-444D-A7BD-988001619FDC}.Debug|Any CPU.Build.0 = Debug|Any CPU

+		{5AA5A595-FF56-444D-A7BD-988001619FDC}.Release|Any CPU.ActiveCfg = Release|Any CPU

+		{5AA5A595-FF56-444D-A7BD-988001619FDC}.Release|Any CPU.Build.0 = Release|Any CPU

 	EndGlobalSection

 	GlobalSection(SolutionProperties) = preSolution

 		HideSolutionNode = FALSE

 	EndGlobalSection

-	GlobalSection(SubversionScc) = preSolution

-		Svn-Managed = True

-		Manager = AnkhSVN - Subversion Support for Visual Studio

-	EndGlobalSection

 EndGlobal