Update to zeroMQ 4.0.3 with CLRZMQ 3.0 wrapper library. It now internally supports dynamic loading of 32-bit/64-bit native DLL at runtime.
diff --git a/src/main/csharp/CommonAssemblyInfo.cs b/src/main/csharp/CommonAssemblyInfo.cs
index 03f373c..0523c0e 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) 2011 Apache Software Foundation")]

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

 [assembly: AssemblyTrademarkAttribute("")]

 [assembly: AssemblyCultureAttribute("")]

 [assembly: AssemblyVersionAttribute("1.0.0.1")]

diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index b1af4e0..7dfb45c 100644
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -16,7 +16,7 @@
  */

 

 using System;

-using ZContext = ZMQ.Context;

+using ZeroMQ;

 

 namespace Apache.NMS.ZMQ

 {

@@ -36,7 +36,7 @@
         /// <summary>

         /// ZMQ context

         /// </summary>

-        static private ZContext _context = new ZContext(1);

+		private ZmqContext _context = ZmqContext.Create();

 

         /// <summary>

         /// Starts message delivery for this connection.

@@ -152,7 +152,7 @@
         /// <summary>

         /// Gets ZMQ connection context

         /// </summary>

-        static internal ZContext Context

+        internal ZmqContext Context

         {

             get { return _context; }

         }

diff --git a/src/main/csharp/ConnectionFactory.cs b/src/main/csharp/ConnectionFactory.cs
index 61afa0e..41cd808 100644
--- a/src/main/csharp/ConnectionFactory.cs
+++ b/src/main/csharp/ConnectionFactory.cs
@@ -28,6 +28,24 @@
 		private string clientID;

 		private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();

 

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

+		private const string ENV_BROKER_URL = "ZMQ_BROKER_URL";

+

+		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, string clientID)

 		{

 			this.brokerUri = brokerUri;

@@ -35,6 +53,26 @@
 		}

 

 		/// <summary>

+		/// Get the default connection Uri if none is specified.

+		/// The environment variable is checked first.

+		/// </summary>

+		/// <returns></returns>

+		private static string GetDefaultBrokerUrl()

+		{

+			string brokerUrl = Environment.GetEnvironmentVariable(ENV_BROKER_URL);

+

+			if(string.IsNullOrEmpty(brokerUrl))

+			{

+				brokerUrl = DEFAULT_BROKER_URL;

+			}

+

+			return brokerUrl;

+		}

+

+		#region IConnectionFactory Members

+

+

+		/// <summary>

 		/// Creates a new connection to ZMQ.

 		/// </summary>

 		public IConnection CreateConnection()

@@ -106,5 +144,7 @@
 			get { return this.producerTransformer; }

 			set { this.producerTransformer = value; }

 		}

+

+		#endregion

 	}

 }

diff --git a/src/main/csharp/MessageConsumer.cs b/src/main/csharp/MessageConsumer.cs
index 8a82978..85752cd 100644
--- a/src/main/csharp/MessageConsumer.cs
+++ b/src/main/csharp/MessageConsumer.cs
@@ -19,9 +19,9 @@
 using System.Text;

 using System.Threading;

 using Apache.NMS.Util;

-using ZSendRecvOpt = ZMQ.SendRecvOpt;

-using ZSocket = ZMQ.Socket;

-using ZSocketType = ZMQ.SocketType;

+using ZeroMQ;

+//using ZSendRecvOpt = ZMQ.SendRecvOpt;

+//using ZSocketType = ZeroMQ.SocketType;

 

 namespace Apache.NMS.ZMQ

 {

@@ -37,7 +37,7 @@
 		/// <summary>

 		/// Socket object

 		/// </summary>

-		private ZSocket messageSubscriber = null;

+		private ZmqSocket messageSubscriber = null;

 		/// <summary>

 		/// Context binding string

 		/// </summary>

@@ -58,14 +58,14 @@
 

 		public MessageConsumer(Session session, AcknowledgementMode acknowledgementMode, IDestination destination, string selector)

 		{

-			if(null == Connection.Context)

+			if(null == session.Connection.Context)

 			{

 				throw new NMSConnectionException();

 			}

 

 			this.session = session;

 			this.acknowledgementMode = acknowledgementMode;

-			this.messageSubscriber = Connection.Context.Socket(ZSocketType.SUB);

+			this.messageSubscriber = session.Connection.Context.CreateSocket(SocketType.SUB);

 			if(null == this.messageSubscriber)

 			{

 				throw new ResourceAllocationException();

@@ -77,11 +77,18 @@
 			this.destination = new Queue(this.contextBinding);

 			if(!string.IsNullOrEmpty(clientId))

 			{

-				this.messageSubscriber.StringToIdentity(clientId, Encoding.Unicode);

+				this.messageSubscriber.Identity = Encoding.Unicode.GetBytes(clientId);

 			}

 

 			this.messageSubscriber.Connect(contextBinding);

-			this.messageSubscriber.Subscribe(selector ?? string.Empty, Encoding.ASCII);

+			byte[] prefix = null;

+

+			if(!string.IsNullOrWhiteSpace(selector))

+			{

+				prefix = Encoding.ASCII.GetBytes(selector);

+			}

+

+			this.messageSubscriber.Subscribe(prefix);

 		}

 

 		public event MessageListener Listener

@@ -117,7 +124,7 @@
 		public IMessage Receive()

 		{

 			// TODO: Support decoding of all message types + all meta data (e.g., headers and properties)

-			return ToNmsMessage(messageSubscriber.Recv(Encoding.ASCII, ZSendRecvOpt.NONE));

+			return ToNmsMessage(messageSubscriber.Receive(Encoding.ASCII));

 		}

 

 		/// <summary>

@@ -129,7 +136,7 @@
 		public IMessage Receive(TimeSpan timeout)

 		{

 			// TODO: Support decoding of all message types + all meta data (e.g., headers and properties)

-			return ToNmsMessage(messageSubscriber.Recv(Encoding.ASCII, timeout.Milliseconds));

+			return ToNmsMessage(messageSubscriber.Receive(Encoding.ASCII, timeout));

 		}

 

 		/// <summary>

diff --git a/src/main/csharp/MessageProducer.cs b/src/main/csharp/MessageProducer.cs
index 3aa908c..4d1c56e 100644
--- a/src/main/csharp/MessageProducer.cs
+++ b/src/main/csharp/MessageProducer.cs
@@ -16,9 +16,8 @@
  */

 

 using System;

-using ZSocket = ZMQ.Socket;

-using ZSocketType = ZMQ.SocketType;

 using System.Text;

+using ZeroMQ;

 

 namespace Apache.NMS.ZMQ

 {

@@ -33,7 +32,7 @@
 		/// <summary>

 		/// Socket object

 		/// </summary>

-		private ZSocket messageProducer = null;

+		private ZmqSocket messageProducer = null;

 		private MsgDeliveryMode deliveryMode;

 		private TimeSpan timeToLive;

 		private MsgPriority priority;

@@ -49,19 +48,19 @@
 

 		public MessageProducer(Connection connection, Session session, IDestination destination)

 		{

-			if(null == Connection.Context)

+			if(null == connection.Context)

 			{

 				throw new NMSConnectionException();

 			}

 

 			this.session = session;

 			this.destination = destination;

-			this.messageProducer = Connection.Context.Socket(ZSocketType.SUB);

+			this.messageProducer = connection.Context.CreateSocket(SocketType.SUB);

 

 			string clientId = connection.ClientId;

 			if(!string.IsNullOrEmpty(clientId))

 			{

-				this.messageProducer.StringToIdentity(clientId, Encoding.Unicode);

+				this.messageProducer.Identity = Encoding.Unicode.GetBytes(clientId);

 			}

 

 			this.messageProducer.Connect(connection.BrokerUri.LocalPath);

diff --git a/src/main/csharp/Session.cs b/src/main/csharp/Session.cs
index 7a2a02a..7cc02b6 100644
--- a/src/main/csharp/Session.cs
+++ b/src/main/csharp/Session.cs
@@ -195,9 +195,12 @@
 

         #region Transaction State Events

 

+		// The following delegates are not used, but are required to exist.

+		#pragma warning disable 0067

         public event SessionTxEventDelegate TransactionStartedListener;

         public event SessionTxEventDelegate TransactionCommittedListener;

         public event SessionTxEventDelegate TransactionRolledBackListener;

+		#pragma warning restore 0067

 

         #endregion

 

diff --git a/src/test/csharp/ZMQTest.cs b/src/test/csharp/ZMQTest.cs
index 957850d..0abdf12 100644
--- a/src/test/csharp/ZMQTest.cs
+++ b/src/test/csharp/ZMQTest.cs
@@ -16,10 +16,9 @@
  */

 

 using System;

-using System.Messaging;

-using NUnit.Framework;

-using System.Threading;

 using System.IO;

+using System.Threading;

+using NUnit.Framework;

 

 namespace Apache.NMS.ZMQ

 {

@@ -52,10 +51,12 @@
 			string libFolder = System.Environment.CurrentDirectory;

 			string libFileName;

 

-			libFileName = Path.Combine(libFolder, "libzmq.dll");

-			Assert.IsTrue(File.Exists(libFileName), "Missing zmq library file: {0}", libFileName);

 			libFileName = Path.Combine(libFolder, "clrzmq.dll");

 			Assert.IsTrue(File.Exists(libFileName), "Missing zmq wrapper file: {0}", libFileName);

+			libFileName = Path.Combine(libFolder, "libzmq.dll");

+			Assert.IsTrue(File.Exists(libFileName), "Missing zmq library file: {0}", libFileName);

+			libFileName = Path.Combine(libFolder, "libzmq64.dll");

+			Assert.IsTrue(File.Exists(libFileName), "Missing 64-bit zmq library file: {0}", libFileName);

 			libFileName = Path.Combine(libFolder, "Apache.NMS.dll");

 			Assert.IsTrue(File.Exists(libFileName), "Missing Apache.NMS library file: {0}", libFileName);

 			libFileName = Path.Combine(libFolder, "Apache.NMS.ZMQ.dll");

diff --git a/vs2010-zmq-net-4.0-test.csproj b/vs2010-zmq-net-4.0-test.csproj
index b66f666..8494ee4 100644
--- a/vs2010-zmq-net-4.0-test.csproj
+++ b/vs2010-zmq-net-4.0-test.csproj
@@ -57,7 +57,7 @@
   </ItemGroup>

   <ItemGroup>

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

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

+      <Project>{624AA430-2EEF-4251-8700-B71A6D770A3B}</Project>

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

     </ProjectReference>

   </ItemGroup>

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

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

+<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>8.0.30703</ProductVersion>

+    <ProductVersion>9.0.30729</ProductVersion>

     <SchemaVersion>2.0</SchemaVersion>

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

+    <ProjectGuid>{624AA430-2EEF-4251-8700-B71A6D770A3B}</ProjectGuid>

     <OutputType>Library</OutputType>

-    <AppDesignerFolder>Properties</AppDesignerFolder>

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

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

     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

@@ -19,32 +18,67 @@
     <DebugType>full</DebugType>

     <Optimize>false</Optimize>

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

-    <DefineConstants>DEBUG;TRACE</DefineConstants>

-    <ErrorReport>prompt</ErrorReport>

-    <WarningLevel>4</WarningLevel>

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

+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>

+    <RegisterForComInterop>false</RegisterForComInterop>

+    <PlatformTarget>AnyCPU</PlatformTarget>

+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>

   </PropertyGroup>

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

-    <DebugType>pdbonly</DebugType>

+    <DebugSymbols>true</DebugSymbols>

     <Optimize>true</Optimize>

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

-    <DefineConstants>TRACE</DefineConstants>

-    <ErrorReport>prompt</ErrorReport>

-    <WarningLevel>4</WarningLevel>

+    <DefineConstants>TRACE;NET</DefineConstants>

+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>

+    <DebugType>full</DebugType>

   </PropertyGroup>

   <ItemGroup>

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

+    <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="clrzmq, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">

+      <SpecificVersion>False</SpecificVersion>

+      <HintPath>lib\clrzmq\net-4.0\clrzmq.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\CommonConnectionFactory.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\Destination.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" />

+  </ItemGroup>

+  <ItemGroup>

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

+      <Link>libzmq.dll</Link>

+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+    </Content>

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

+      <Link>libzmq64.dll</Link>

+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

+    </Content>

   </ItemGroup>

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

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

diff --git a/vs2010-zmq-net-4.0x64.csproj b/vs2010-zmq-net-4.0x64.csproj
deleted file mode 100644
index f0da816..0000000
--- a/vs2010-zmq-net-4.0x64.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-<?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>

-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

-    <FileAlignment>512</FileAlignment>

-    <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\Destination.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" />

-  </ItemGroup>

-  <ItemGroup>

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

-      <Link>libzmq64.dll</Link>

-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

-    </Content>

-  </ItemGroup>

-  <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.0x86.csproj b/vs2010-zmq-net-4.0x86.csproj
deleted file mode 100644
index 2080938..0000000
--- a/vs2010-zmq-net-4.0x86.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-<?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>{624AA430-2EEF-4251-8700-B71A6D770A3B}</ProjectGuid>

-    <OutputType>Library</OutputType>

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

-    <AssemblyName>Apache.NMS.ZMQ32</AssemblyName>

-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

-    <FileAlignment>512</FileAlignment>

-    <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="clrzmq">

-      <HintPath>lib\clrzmq\net-4.0\clrzmq.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\Destination.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" />

-  </ItemGroup>

-  <ItemGroup>

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

-      <Link>libzmq.dll</Link>

-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

-    </Content>

-  </ItemGroup>

-  <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.sln b/vs2010-zmq.sln
index 4cf0ad8..dc6bcee 100644
--- a/vs2010-zmq.sln
+++ b/vs2010-zmq.sln
@@ -1,21 +1,12 @@
 

 Microsoft Visual Studio Solution File, Format Version 11.00

 # Visual Studio 2010

-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}"

 	ProjectSection(ProjectDependencies) = postProject

-		{A5FCA129-991B-4CB2-987A-B25E43B0F5EC} = {A5FCA129-991B-4CB2-987A-B25E43B0F5EC}

 		{624AA430-2EEF-4251-8700-B71A6D770A3B} = {624AA430-2EEF-4251-8700-B71A6D770A3B}

 	EndProjectSection

 EndProject

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

-	ProjectSection(ProjectDependencies) = postProject

-		{A5FCA129-991B-4CB2-987A-B25E43B0F5EC} = {A5FCA129-991B-4CB2-987A-B25E43B0F5EC}

-		{624AA430-2EEF-4251-8700-B71A6D770A3B} = {624AA430-2EEF-4251-8700-B71A6D770A3B}

-	EndProjectSection

-EndProject

-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2010-zmq-net-4.0x86", "vs2010-zmq-net-4.0x86.csproj", "{624AA430-2EEF-4251-8700-B71A6D770A3B}"

+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vs2010-zmq-net-4.0", "vs2010-zmq-net-4.0.csproj", "{624AA430-2EEF-4251-8700-B71A6D770A3B}"

 EndProject

 Global

 	GlobalSection(SubversionScc) = preSolution

@@ -27,18 +18,10 @@
 		Release|Any CPU = Release|Any CPU

 	EndGlobalSection

 	GlobalSection(ProjectConfigurationPlatforms) = postSolution

-		{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

-		{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}.Debug|Any CPU.Build.0 = Debug|Any CPU

-		{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}.Release|Any CPU.ActiveCfg = Release|Any CPU

-		{A5FCA129-991B-4CB2-987A-B25E43B0F5EC}.Release|Any CPU.Build.0 = Release|Any CPU

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

 		{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

 		{624AA430-2EEF-4251-8700-B71A6D770A3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

 		{624AA430-2EEF-4251-8700-B71A6D770A3B}.Debug|Any CPU.Build.0 = Debug|Any CPU

 		{624AA430-2EEF-4251-8700-B71A6D770A3B}.Release|Any CPU.ActiveCfg = Release|Any CPU