diff --git a/src/Castle.Windsor.Tests/Registration/UsingFactoryMethodTestCase.cs b/src/Castle.Windsor.Tests/Registration/UsingFactoryMethodTestCase.cs index 7a8839a62..1efcf2ede 100644 --- a/src/Castle.Windsor.Tests/Registration/UsingFactoryMethodTestCase.cs +++ b/src/Castle.Windsor.Tests/Registration/UsingFactoryMethodTestCase.cs @@ -451,10 +451,16 @@ public void Proxying_type_with_no_default_ctor_throws_helpful_message() var exception = Assert.Throws(() => Kernel.Resolve()); +#if NET462_OR_GREATER var expected = "Can not instantiate proxy of class: Castle.MicroKernel.Tests.Configuration.Components.ClassWithConstructors." + Environment.NewLine + "Could not find a parameterless constructor.\r\n" + "Parameter name: constructorArguments"; +#else + var expected = + "Can not instantiate proxy of class: Castle.MicroKernel.Tests.Configuration.Components.ClassWithConstructors." + Environment.NewLine + + "Could not find a parameterless constructor. (Parameter 'constructorArguments')"; +#endif Assert.AreEqual(expected, exception.Message); }