diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..6512ed3a2
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "Common"]
+ path = Common
+ url = https://github.com/clariuslabs/common.git
diff --git a/Common b/Common
new file mode 160000
index 000000000..354e54dc6
--- /dev/null
+++ b/Common
@@ -0,0 +1 @@
+Subproject commit 354e54dc624d716b1b6adcbc78c166e03b6bd805
diff --git a/Moq-CI.msbuild b/Moq-CI.msbuild
deleted file mode 100644
index c11132e8f..000000000
--- a/Moq-CI.msbuild
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Moq.nuspec b/Moq.nuspec
new file mode 100644
index 000000000..ddb3c569c
--- /dev/null
+++ b/Moq.nuspec
@@ -0,0 +1,14 @@
+
+
+
+ Moq
+ 4.1
+ Daniel Cazzulino
+ Daniel Cazzulino, Clarius Labs
+ http://www.opensource.org/licenses/bsd-license.php
+ http://www.moqthis.com
+ false
+ The most popular and friendly mocking framework for .NET
+ tdd mocking mocks unittesting agile
+
+
\ No newline at end of file
diff --git a/Source.Silverlight/Moq.Silverlight.csproj b/Source.Silverlight/Moq.Silverlight.csproj
index b849974f1..c5125da44 100644
--- a/Source.Silverlight/Moq.Silverlight.csproj
+++ b/Source.Silverlight/Moq.Silverlight.csproj
@@ -1,416 +1,408 @@
-
-
-
- Debug
- AnyCPU
- 8.0.50727
- 2.0
- {5136C8E1-E17F-481F-B29A-C7FAB528BD2D}
- {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
- Library
- Properties
- Moq
- Moq.Silverlight
- Silverlight
- v4.0
- $(TargetFrameworkVersion)
- false
- true
- false
- true
- ..\Moq.snk
- false
-
-
-
- v3.5
-
-
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG;SILVERLIGHT
- TRACE;DEBUG;SILVERLIGHT;NET3x
- true
- true
- prompt
- 4
- bin\Debug\Moq.Silverlight.xml
- AllRules.ruleset
-
-
- pdbonly
- true
- bin\Release\
- TRACE;SILVERLIGHT
- TRACE;SILVERLIGHT;NET3x
- true
- true
- prompt
- 4
- bin\Release\Moq.Silverlight.xml
- AllRules.ruleset
-
-
- true
- bin\Debug\
- DEBUG;TRACE;SILVERLIGHT
- bin\Debug\Moq.Silverlight.xml
- true
- full
- x86
- true
- GlobalSuppressions.cs
- prompt
- AllRules.ruleset
-
-
- bin\Release\
- TRACE;SILVERLIGHT
- bin\Release\Moq.Silverlight.xml
- true
- true
- pdbonly
- x86
- true
- GlobalSuppressions.cs
- prompt
- AllRules.ruleset
-
-
-
- False
- ..\Lib\Castle\bin-SL4\Castle.Core.dll
-
-
-
-
-
-
-
-
- AdvancedMatcherAttribute.cs
-
-
- AsInterface.cs
-
-
- ConditionalContext.cs
-
-
- DefaultValue.cs
-
-
- EmptyDefaultValueProvider.cs
-
-
- Evaluator.cs
-
-
- ExpressionExtensions.cs
-
-
- ExpressionStringBuilder.cs
-
-
- Extensions.cs
-
-
- FluentMockContext.cs
-
-
- GlobalSuppressions.cs
-
-
- Guard.cs
-
-
- IDefaultValueProvider.cs
-
-
- IHideObjectMembers.cs
-
-
- IMatcher.cs
-
-
- IMocked.cs
-
-
- Interceptor.cs
-
-
- IProxyCall.cs
-
-
- It.cs
-
-
- Language\Flow\IReturnsResult.cs
-
-
- Language\Flow\ISetup.cs
-
-
- Language\ICallback.Generated.cs
-
-
- Language\IRaise.cs
-
-
- Language\IRaise.Generated.cs
-
-
- Language\IReturns.Generated.cs
-
-
- Language\ISetupConditionResult.cs
-
-
- Language\ISetupSequentialResult.cs
-
-
- Language\IVerifies.cs
-
-
- Language\IReturnsGetter.cs
-
-
- Language\ICallbackGetter.cs
-
-
- Language\Flow\IThrowsResult.cs
-
-
- Language\Flow\IReturnsThrows.cs
-
-
- Language\Flow\ICallbackResult.cs
-
-
- Language\ICallback.cs
-
-
- Language\ICallbackSetter.cs
-
-
- Language\IReturns.cs
-
-
- Language\IThrows.cs
-
-
- Linq\FluentMockVisitor.cs
-
-
- Linq\Mock.cs
-
-
- Linq\MockQuery.cs
-
-
- Linq\MockRepository.cs
-
-
- Linq\Mocks.cs
-
-
- Linq\MockSetupsBuilder.cs
-
-
- Match.cs
-
-
- MatcherAttribute.cs
-
-
- MatcherFactory.cs
-
-
- Matchers\ConstantMatcher.cs
-
-
- Matchers\ExpressionComparer.cs
-
-
- Matchers\ExpressionMatcher.cs
-
-
- Matchers\Matcher.cs
-
-
- Matchers\MatcherAttributeMatcher.cs
-
-
- Matchers\ParamArrayMatcher.cs
-
-
- Matchers\LazyEvalMatcher.cs
-
-
- Matchers\PredicateMatcher.cs
-
-
- MatchExpression.cs
-
-
- MemberInfoExtensions.cs
-
-
- MethodCall.cs
-
-
- MethodCall.Generated.cs
-
-
- MethodCallReturn.cs
-
-
- MethodCallReturn.Generated.cs
-
-
- Microsoft\Delegates.cs
-
-
- Microsoft\ExpressionVisitor.cs
-
-
- Mock.cs
-
-
- Mock.Generic.cs
-
-
- MockBehavior.cs
-
-
- MockDefaultValueProvider.cs
-
-
- MockException.cs
-
-
- MockRepository.cs
-
-
- MockSequence.cs
-
-
- Obsolete\IOccurrence.cs
-
-
- Obsolete\Mock.Generic.Legacy.cs
-
-
- Obsolete\Mock.Legacy.cs
-
-
- Obsolete\MockExtensions.cs
-
-
- Obsolete\MockFactory.cs
-
-
- PexProtector.cs
-
-
- Protected\IProtectedMock.cs
-
-
- Protected\ItExpr.cs
-
-
- Protected\ProtectedExtension.cs
-
-
- Protected\ProtectedMock.cs
-
-
- Properties\AssemblyInfo.cs
-
-
- Matchers\RefMatcher.cs
-
-
- Properties\Resources.Designer.cs
- True
- True
- Resources.resx
-
-
- Poxy\CastleProxyFactory.cs
-
-
- Poxy\ICallContext.cs
-
-
- Poxy\ICallInterceptor.cs
-
-
- Poxy\IProxyFactory.cs
-
-
- Range.cs
-
-
- SequenceExtensions.cs
-
-
- SetterMethodCall.cs
-
-
- SetupKind.cs
-
-
- SetupSequentialContext.cs
-
-
- Times.cs
-
-
-
-
- Properties\Resources.resx
- ResXFileCodeGenerator
- Designer
- Resources.Designer.cs
-
-
-
-
- Moq.snk
-
-
- Mock.xdoc
- Mock.cs
-
-
- It.xdoc
- It.cs
-
-
- Times.xdoc
- Times.cs
-
-
- Mock.Generic.xdoc
- Mock.Generic.cs
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {5136C8E1-E17F-481F-B29A-C7FAB528BD2D}
+ {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ Moq
+ Moq.Silverlight
+ Silverlight
+ v4.0
+ $(TargetFrameworkVersion)
+ false
+ true
+ false
+ true
+ ..\Moq.snk
+ false
+
+
+
+ v3.5
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG;SILVERLIGHT
+ TRACE;DEBUG;SILVERLIGHT;NET3x
+ true
+ true
+ prompt
+ 4
+ bin\Debug\Moq.Silverlight.xml
+ AllRules.ruleset
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE;SILVERLIGHT
+ TRACE;SILVERLIGHT;NET3x
+ true
+ true
+ prompt
+ 4
+ bin\Release\Moq.Silverlight.xml
+ AllRules.ruleset
+
+
+ true
+ bin\Debug\
+ DEBUG;TRACE;SILVERLIGHT
+ bin\Debug\Moq.Silverlight.xml
+ true
+ full
+ x86
+ true
+ GlobalSuppressions.cs
+ prompt
+ AllRules.ruleset
+
+
+ bin\Release\
+ TRACE;SILVERLIGHT
+ bin\Release\Moq.Silverlight.xml
+ true
+ true
+ pdbonly
+ x86
+ true
+ GlobalSuppressions.cs
+ prompt
+ AllRules.ruleset
+
+
+
+ False
+ ..\packages\Castle.Core.3.2.0\lib\sl4\Castle.Core.dll
+
+
+
+
+
+
+
+ AdvancedMatcherAttribute.cs
+
+
+ AsInterface.cs
+
+
+ ConditionalContext.cs
+
+
+ DefaultValue.cs
+
+
+ EmptyDefaultValueProvider.cs
+
+
+ Evaluator.cs
+
+
+ ExpressionExtensions.cs
+
+
+ ExpressionStringBuilder.cs
+
+
+ Extensions.cs
+
+
+ FluentMockContext.cs
+
+
+ GlobalSuppressions.cs
+
+
+ Guard.cs
+
+
+ IDefaultValueProvider.cs
+
+
+ IHideObjectMembers.cs
+
+
+ IMatcher.cs
+
+
+ IMocked.cs
+
+
+ Interceptor.cs
+
+
+ IProxyCall.cs
+
+
+ It.cs
+
+
+ Language\Flow\IReturnsResult.cs
+
+
+ Language\Flow\ISetup.cs
+
+
+ Language\ICallback.Generated.cs
+
+
+ Language\IRaise.cs
+
+
+ Language\IRaise.Generated.cs
+
+
+ Language\IReturns.Generated.cs
+
+
+ Language\ISetupConditionResult.cs
+
+
+ Language\ISetupSequentialResult.cs
+
+
+ Language\IVerifies.cs
+
+
+ Language\IReturnsGetter.cs
+
+
+ Language\ICallbackGetter.cs
+
+
+ Language\Flow\IThrowsResult.cs
+
+
+ Language\Flow\IReturnsThrows.cs
+
+
+ Language\Flow\ICallbackResult.cs
+
+
+ Language\ICallback.cs
+
+
+ Language\ICallbackSetter.cs
+
+
+ Language\IReturns.cs
+
+
+ Language\IThrows.cs
+
+
+ Linq\FluentMockVisitor.cs
+
+
+ Linq\Mock.cs
+
+
+ Linq\MockQuery.cs
+
+
+ Linq\MockRepository.cs
+
+
+ Linq\Mocks.cs
+
+
+ Linq\MockSetupsBuilder.cs
+
+
+ Match.cs
+
+
+ MatcherAttribute.cs
+
+
+ MatcherFactory.cs
+
+
+ Matchers\ConstantMatcher.cs
+
+
+ Matchers\ExpressionComparer.cs
+
+
+ Matchers\ExpressionMatcher.cs
+
+
+ Matchers\Matcher.cs
+
+
+ Matchers\MatcherAttributeMatcher.cs
+
+
+ Matchers\ParamArrayMatcher.cs
+
+
+ Matchers\LazyEvalMatcher.cs
+
+
+ Matchers\PredicateMatcher.cs
+
+
+ MatchExpression.cs
+
+
+ MemberInfoExtensions.cs
+
+
+ MethodCall.cs
+
+
+ MethodCall.Generated.cs
+
+
+ MethodCallReturn.cs
+
+
+ MethodCallReturn.Generated.cs
+
+
+ Microsoft\Delegates.cs
+
+
+ Microsoft\ExpressionVisitor.cs
+
+
+ Mock.cs
+
+
+ Mock.Generic.cs
+
+
+ MockBehavior.cs
+
+
+ MockDefaultValueProvider.cs
+
+
+ MockException.cs
+
+
+ MockRepository.cs
+
+
+ MockSequence.cs
+
+
+ Obsolete\IOccurrence.cs
+
+
+ Obsolete\Mock.Generic.Legacy.cs
+
+
+ Obsolete\Mock.Legacy.cs
+
+
+ Obsolete\MockExtensions.cs
+
+
+ Obsolete\MockFactory.cs
+
+
+ PexProtector.cs
+
+
+ Protected\IProtectedMock.cs
+
+
+ Protected\ItExpr.cs
+
+
+ Protected\ProtectedExtension.cs
+
+
+ Protected\ProtectedMock.cs
+
+
+ Properties\AssemblyInfo.cs
+
+
+ Matchers\RefMatcher.cs
+
+
+ Properties\Resources.Designer.cs
+ True
+ True
+ Resources.resx
+
+
+ Poxy\CastleProxyFactory.cs
+
+
+ Poxy\ICallContext.cs
+
+
+ Poxy\ICallInterceptor.cs
+
+
+ Poxy\IProxyFactory.cs
+
+
+ Range.cs
+
+
+ SequenceExtensions.cs
+
+
+ SetterMethodCall.cs
+
+
+ SetupKind.cs
+
+
+ SetupSequentialContext.cs
+
+
+ Times.cs
+
+
+
+
+ Properties\Resources.resx
+ ResXFileCodeGenerator
+ Designer
+ Resources.Designer.cs
+
+
+
+
+ Moq.snk
+
+
+ Mock.xdoc
+ Mock.cs
+
+
+ It.xdoc
+ It.cs
+
+
+ Times.xdoc
+ Times.cs
+
+
+ Mock.Generic.xdoc
+ Mock.Generic.cs
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Moq.csproj b/Source/Moq.csproj
index f41ee37cc..f5bbaec17 100644
--- a/Source/Moq.csproj
+++ b/Source/Moq.csproj
@@ -1,264 +1,266 @@
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {1C91AC30-5977-4BE5-BA67-8EB186C03514}
- Library
- Properties
- Moq
- Moq
- v4.0
- 512
- true
- ..\Moq.snk
-
- ..\
- true
-
-
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG;DESKTOP
- TRACE;DEBUG;DESKTOP;NET3x
- prompt
- 4
- bin\Debug\Moq.xml
- true
- AllRules.ruleset
- false
-
-
-
-
- full
- true
- bin\Release\
- TRACE;CODE_ANALYSIS
- TRACE;CODE_ANALYSIS;NET3x
- prompt
- 4
- bin\Release\Moq.xml
- true
- true
- true
- true
- AllRules.ruleset
-
-
-
- False
- ..\packages\Castle.Core.3.2.0\lib\net40-client\Castle.Core.dll
-
-
- False
- ..\packages\Castle.Core.3.2.0\lib\net35\Castle.Core.dll
- False
-
-
-
-
-
-
-
-
-
- True
- True
- ICallback.tt
-
-
-
- True
- True
- IRaise.tt
-
-
-
- True
- True
- IReturns.tt
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- MethodCall.tt
-
-
- True
- True
- MethodCallReturn.tt
-
-
- True
- True
- Delegates.tt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- Resources.resx
-
-
-
-
-
-
-
-
-
-
- ResXFileCodeGenerator
- Designer
- Resources.Designer.cs
-
-
-
-
- Moq.snk
-
-
- IDefaultValueProvider.cs
-
-
-
- It.cs
-
-
- TextTemplatingFileGenerator
- ICallback.Generated.cs
-
-
- TextTemplatingFileGenerator
- IRaise.Generated.cs
-
-
- TextTemplatingFileGenerator
- IReturns.Generated.cs
-
-
- Match.cs
-
-
- TextTemplatingFileGenerator
- MethodCallReturn.Generated.cs
-
-
- TextTemplatingFileGenerator
- Delegates.cs
-
-
- Mock.Generic.cs
- Designer
-
-
- Mock.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TextTemplatingFileGenerator
- MethodCall.Generated.cs
-
-
-
- Times.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {1C91AC30-5977-4BE5-BA67-8EB186C03514}
+ Library
+ Properties
+ Moq
+ Moq
+ v4.0
+ 512
+ true
+ ..\Moq.snk
+
+ ..\
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG;DESKTOP
+ TRACE;DEBUG;DESKTOP;NET3x
+ prompt
+ 4
+ bin\Debug\Moq.xml
+ true
+ AllRules.ruleset
+ false
+
+
+
+
+ full
+ true
+ bin\Release\
+ TRACE;CODE_ANALYSIS
+ TRACE;CODE_ANALYSIS;NET3x
+ prompt
+ 4
+ bin\Release\Moq.xml
+ true
+ true
+ true
+ true
+ AllRules.ruleset
+
+
+
+ False
+ ..\packages\Castle.Core.3.2.0\lib\net40-client\Castle.Core.dll
+
+
+ False
+ ..\packages\Castle.Core.3.2.0\lib\net35\Castle.Core.dll
+ False
+
+
+
+
+
+
+
+
+
+ True
+ True
+ ICallback.tt
+
+
+
+ True
+ True
+ IRaise.tt
+
+
+
+ True
+ True
+ IReturns.tt
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ MethodCall.tt
+
+
+ True
+ True
+ MethodCallReturn.tt
+
+
+ True
+ True
+ Delegates.tt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+
+
+
+
+
+ ResXFileCodeGenerator
+ Designer
+ Resources.Designer.cs
+
+
+
+
+ Moq.snk
+
+
+ IDefaultValueProvider.cs
+
+
+
+ It.cs
+
+
+ TextTemplatingFileGenerator
+ ICallback.Generated.cs
+
+
+ TextTemplatingFileGenerator
+ IRaise.Generated.cs
+
+
+ TextTemplatingFileGenerator
+ IReturns.Generated.cs
+
+
+ Match.cs
+
+
+ TextTemplatingFileGenerator
+ MethodCallReturn.Generated.cs
+
+
+ TextTemplatingFileGenerator
+ Delegates.cs
+
+
+ Mock.Generic.cs
+ Designer
+
+
+ Mock.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TextTemplatingFileGenerator
+ MethodCall.Generated.cs
+
+
+
+ Times.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs
index 64f434d19..a3f896a27 100644
--- a/Source/Properties/AssemblyInfo.cs
+++ b/Source/Properties/AssemblyInfo.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
@@ -9,8 +9,8 @@
[assembly: AssemblyProduct("Moq")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("4.0.10818.0")]
-[assembly: AssemblyFileVersion("4.0.0.0")]
+[assembly: AssemblyVersion("4.1.1308.2119")]
+[assembly: AssemblyFileVersion("4.1.1308.2119")]
[assembly: ComVisible(false)]
[assembly: NeutralResourcesLanguage("en")]
diff --git a/build.cmd b/build.cmd
new file mode 100644
index 000000000..1e8de8c99
--- /dev/null
+++ b/build.cmd
@@ -0,0 +1 @@
+%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild %~dp0\build.proj /verbosity:normal /nr:false
\ No newline at end of file
diff --git a/build.proj b/build.proj
new file mode 100644
index 000000000..9446eb481
--- /dev/null
+++ b/build.proj
@@ -0,0 +1,81 @@
+
+
+
+
+
+ Release
+ $(MSBuildThisFileDirectory)
+ $(BuildRoot)build\
+ $(BuildRoot).nuget\NuGet.exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $([System.DateTime]::UtcNow.ToString("yyMM"))
+
+ $([System.DateTime]::UtcNow.ToString("ddHH"))
+ $(Major).$(Minor).$(Build).$(Revision)
+
+
+
+
+ $(FileVersion)
+
+
+
+ <_VersionRegexTransform Include="Source\Properties\AssemblyInfo.cs">
+ AssemblyFileVersion\(".*?"\)
+ AssemblyFileVersion("$(FileVersion)")
+
+ <_VersionRegexTransform Include="Source\Properties\AssemblyInfo.cs">
+ AssemblyVersion\(".*?"\)
+ AssemblyVersion("$(FileVersion)")
+
+
+
+
+
+
+
\ No newline at end of file