diff --git a/NTwain.Net35/NTwain.Net35.csproj b/NTwain.Net35/NTwain.Net35.csproj
index 444e373..efa01ff 100644
--- a/NTwain.Net35/NTwain.Net35.csproj
+++ b/NTwain.Net35/NTwain.Net35.csproj
@@ -18,7 +18,7 @@
full
false
..\NTwain\bin\Debug\Net35\
- DEBUG;TRACE
+ TRACE;DEBUG;NET35
prompt
4
@@ -26,7 +26,7 @@
pdbonly
true
..\NTwain\bin\Release\Net35\
- TRACE
+ TRACE;NET35
prompt
4
..\NTwain\bin\Release\Net35\NTwain.XML
diff --git a/NTwain/Internals/WrappedManualResetEvent.cs b/NTwain/Internals/WrappedManualResetEvent.cs
index a263bc8..a99a401 100644
--- a/NTwain/Internals/WrappedManualResetEvent.cs
+++ b/NTwain/Internals/WrappedManualResetEvent.cs
@@ -8,36 +8,36 @@ namespace NTwain.Internals
class WrappedManualResetEvent : IDisposable
{
-#if NET4
- ManualResetEventSlim _slim;
-#else
+#if NET35
ManualResetEvent _mre;
+#else
+ ManualResetEventSlim _slim;
#endif
public WrappedManualResetEvent()
{
-#if NET4
- _slim = new ManualResetEventSlim();
-#else
+#if NET35
_mre = new ManualResetEvent(false);
+#else
+ _slim = new ManualResetEventSlim();
#endif
}
public void Wait()
{
-#if NET4
- _slim.Wait();
-#else
+#if NET35
_mre.WaitOne();
+#else
+ _slim.Wait();
#endif
}
public void Set()
{
-#if NET4
- _slim.Set();
-#else
+#if NET35
_mre.Set();
+#else
+ _slim.Set();
#endif
}
@@ -45,10 +45,10 @@ namespace NTwain.Internals
public void Dispose()
{
-#if NET4
- _slim.Dispose();
-#else
+#if NET35
_mre.Close();
+#else
+ _slim.Dispose();
#endif
}
diff --git a/NTwain/PlatformInfo.cs b/NTwain/PlatformInfo.cs
index 8194d5e..f94f8d6 100644
--- a/NTwain/PlatformInfo.cs
+++ b/NTwain/PlatformInfo.cs
@@ -34,7 +34,11 @@ namespace NTwain
if (IsWindows)
{
var newDsmPath = Path.Combine(Environment.SystemDirectory, Dsm.WIN_NEW_DSM_NAME);
- var oldDsmPath = Path.Combine(Environment.SystemDirectory, Dsm.WIN_OLD_DSM_NAME);
+#if NET35
+ var oldDsmPath = Path.Combine(Environment.GetEnvironmentVariable("windir"), Dsm.WIN_OLD_DSM_NAME);
+#else
+ var oldDsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), Dsm.WIN_OLD_DSM_NAME);
+#endif
if (IsApp64Bit)
{
diff --git a/NTwain/Properties/VersionInfo.cs b/NTwain/Properties/VersionInfo.cs
index 2abbd90..6f7a16f 100644
--- a/NTwain/Properties/VersionInfo.cs
+++ b/NTwain/Properties/VersionInfo.cs
@@ -23,7 +23,7 @@ namespace NTwain
///
/// The build release version number.
///
- public const string Build = "3.2.1"; // change this for each nuget release
+ public const string Build = "3.2.3"; // change this for each nuget release
}