diff --git a/Source.Silverlight/Moq.Silverlight.csproj b/Source.Silverlight/Moq.Silverlight.csproj
index acf19b51c..c28dba864 100644
--- a/Source.Silverlight/Moq.Silverlight.csproj
+++ b/Source.Silverlight/Moq.Silverlight.csproj
@@ -358,6 +358,9 @@
Poxy\IProxyFactory.cs
+
+ Poxy\ProxyGenerationHelpers.cs
+
Range.cs
@@ -414,4 +417,4 @@
-
\ No newline at end of file
+
diff --git a/Source/Mock.Generic.cs b/Source/Mock.Generic.cs
index 8a7659d31..953dccfc0 100644
--- a/Source/Mock.Generic.cs
+++ b/Source/Mock.Generic.cs
@@ -39,16 +39,18 @@
// http://www.opensource.org/licenses/bsd-license.php]
using System;
-using System.CodeDom;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
-using Microsoft.CSharp;
using Moq.Language.Flow;
using Moq.Proxy;
using Moq.Language;
-using Moq.Properties;
using System.Reflection;
+#if !SILVERLIGHT
+using System.CodeDom;
+using Microsoft.CSharp;
+#endif
+
namespace Moq
{
///
@@ -120,6 +122,7 @@ private string GenerateMockName()
var typeName = typeof (T).FullName;
+#if !SILVERLIGHT
if (typeof (T).IsGenericType)
{
using (var provider = new CSharpCodeProvider())
@@ -128,6 +131,7 @@ private string GenerateMockName()
typeName = provider.GetTypeOutput(typeRef);
}
}
+#endif
return "Mock<" + typeName + ":" + randomId + ">";
}
diff --git a/UnitTests/MockFixture.cs b/UnitTests/MockFixture.cs
index 6978a3fcc..1f56bd18c 100644
--- a/UnitTests/MockFixture.cs
+++ b/UnitTests/MockFixture.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using Xunit;
@@ -45,6 +44,7 @@ public void HasADefaultNameThatIncludesItsTypeAndThatItsAMock()
Assert.Contains("mock", mock.ToString().ToLower());
}
+#if !SILVERLIGHT
[Fact]
public void HasADefaultNameThatIncludesItsGenericParameters()
{
@@ -52,6 +52,7 @@ public void HasADefaultNameThatIncludesItsGenericParameters()
Assert.Contains("System.Collections.Generic.Dictionary", mock.ToString());
}
+#endif
[Fact]
public void PassesItsNameOnToTheResultingMockObjectWhenMockingInterfaces()
@@ -64,7 +65,7 @@ public void PassesItsNameOnToTheResultingMockObjectWhenMockingInterfaces()
[Fact]
public void PassesItsNameOnToTheResultingMockObjectWhenMockingClasses()
{
- var mock = new Mock();
+ var mock = new Mock();
Assert.Equal(mock.ToString() + ".Object", mock.Object.ToString());
}