Hi,

I decided to send the patches one by one, may be a bit more manageable.
Here I completely removed the hard reference to nunit, and replaced it by
the nuget package(without monodevelop is not recognizing the project as
nunit testproject and the integration is not working)

problem was, you assumend with dotnet45 passing the defaultvalues of a
parameter works. well mono 4 "is" dotnet45 and doesn't support that.

BR
Ralph

Ralph Alexander Bariz <ralph.ba...@gmail.com> schrieb am Sa., 4. Juli 2015
um 19:40 Uhr:

> Hi Jonathon,
>
> I cloned the repo locally and finally I'm able to run the tests with mono
> 4.0.2 in ubuntu 15.04. At least with nunit-console from bash. Monodevelop
> is not recognizing the tests for some reasons.
>
> I'll commit in my local repo, in the attachments you get the diff file.
> * I introduced a new configuration mono43(now after they released mono
> 4.0.2 where everything is working I expected from 4.3, it's not really
> right... well I'll change later),
> * I commented out the test exclusions and I updated the nunit framework.
> * Also I had to remove a few <choice> tags from the project files,
> monodevelop had a problem with them. need to test that with vs, but I fear,
> for the tests and the logging not for the lib itself, the 2.0 and 3.5
> support is gone. lets see, I'll try to investigate further solve that. For
> the moment fixing the real problems has a higher prio.
> * Also for mono I had to remove the "treat warnings as errors" thing. But
> as I remember, also vs.net is throwing warnings when finding unused
> variables, right? Yeah, maybe you can take a look. When I've done what I
> can, I'll send a final patch.
>
> Best Regards
> Ralph
>
> -----------------------------------------------------------------------------------------------------
> ralph@ralph-laptop:~/Projects/Castle.Core$ git pull
> Already up-to-date.
> ralph@ralph-laptop:~/Projects/Castle.Core$ git commit --dry-run -am
> "modified things for building with mono 4.0.2 on ubuntu"
> Auf Branch master
> Ihr Branch ist auf dem selben Stand wie 'origin/master'.
> zum Commit vorgemerkte Änderungen:
>   (benutzen Sie "git reset HEAD <Datei>..." zum Entfernen aus der
> Staging-Area)
>
>     geändert:       Castle.Core.sln
>     geändert:       lib/nunit.framework.dll
>     geändert:       src/Castle.Core.Tests-SL/Castle.Core.Tests-SL.csproj
>     geändert:       src/Castle.Core.Tests/Castle.Core.Tests.csproj
>     geändert:       src/Castle.Core.Tests/GenericClassProxyTestCase.cs
>     geändert:       src/Castle.Core.Tests/GenericMethodsProxyTestCase.cs
>     geändert:       src/Castle.Core.Tests/TraceLoggerTests.cs
>     geändert:       src/Castle.Core/Castle.Core.csproj
>     geändert:
> src/Castle.Services.Logging.NLogIntegration/Castle.Services.Logging.NLogIntegration.csproj
>     geändert:
> src/Castle.Services.Logging.SerilogIntegration/Castle.Services.Logging.SerilogIntegration.csproj
>     geändert:
> src/Castle.Services.Logging.log4netIntegration/Castle.Services.Logging.log4netIntegration.csproj
>
> Unbeobachtete Dateien:
>   (benutzen Sie "git add <Datei>...", um die Änderungen zum Commit
> vorzumerken)
>
>     Castle.Core.userprefs
>     TestResult.xml
>     lib/nunit.framework.xml
>     tests.sh
>
>
> Jonathon Rossi <j...@jonorossi.com> schrieb am Do., 25. Juni 2015 um
> 15:07 Uhr:
>
>> Great, thanks.
>>
>> On Thu, Jun 25, 2015 at 5:17 PM, Ralph Alexander Bariz <
>> ralph.ba...@gmail.com> wrote:
>>
>>> Good Morning,
>>>
>>> From my side there is no further bug. Just this two, the one I sugessted
>>> a workaround here and the assertion problem you already mentioned and is
>>> fixed in 4.3.0.
>>>
>>> BR
>>>
>>> Am Mittwoch, 24. Juni 2015 14:13:12 UTC+2 schrieb Jonathon Rossi:
>>>>
>>>> Ah, thanks. I didn't quite notice you trimmed all of the stack traces.
>>>>
>>>> So back to the question I was trying to answer, you mentioned another
>>>> mono crash which I was trying to make sure we've got listed so, does that
>>>> issue remind you what the issue was:
>>>>
>>>> > The other crash happening when bypassed this, is fixed with mono 4.3.0
>>>>
>>>> > the generics thing, yes. the type thing fixed with this, no... at
>>>> least not from me.
>>>>
>>>> On Wed, Jun 24, 2015 at 6:27 PM, Ralph Alexander Bariz <
>>>> ralph...@gmail.com> wrote:
>>>>
>>>>> Good Morning
>>>>>
>>>>> No, as you can see in the stacktrace, this assertion affects OpenTKs
>>>>> Cloo. It has nothing to do with Castle.Core and also shows up only in
>>>>> mono-snapshot (4.3.0).
>>>>>
>>>>> BR
>>>>> Ralph
>>>>>
>>>>> Am Mittwoch, 24. Juni 2015 06:20:20 UTC+2 schrieb Jonathon Rossi:
>>>>>>
>>>>>> I just went to the Advanced Search and put your email address into
>>>>>> the second option for "Search By People".
>>>>>> https://bugzilla.xamarin.com/query.cgi?format=advanced
>>>>>>
>>>>>> In that bug report are you saying that the "Assertion at
>>>>>> sgen-alloc.c:460, condition `*p == NULL' not met" assertion occurs in 
>>>>>> 4.0.1
>>>>>> (which we are already aware of and is fixed in
>>>>>> https://bugzilla.xamarin.com/show_bug.cgi?id=28182), but with the CI
>>>>>> builds post-4.0.1 that another assertion occurs "Assertion at
>>>>>> method-to-ir.c:13533, condition `ins->opcode >= MONO_CEE_LAST' not met"? 
>>>>>> If
>>>>>> so, then that one is new to me and we'll need to add that to the list in
>>>>>> https://github.com/castleproject/Core/issues/94.
>>>>>>
>>>>>> On Tue, Jun 23, 2015 at 11:48 PM, Ralph Alexander Bariz <
>>>>>> ralph...@gmail.com> wrote:
>>>>>>
>>>>>>> yes it is, where did you find my bug report overview?
>>>>>>>
>>>>>>> Am Dienstag, 23. Juni 2015 15:05:12 UTC+2 schrieb Jonathon Rossi:
>>>>>>>>
>>>>>>>> Looks like you are only listed as a person on two issues, is this
>>>>>>>> the issue?
>>>>>>>>
>>>>>>>> https://bugzilla.xamarin.com/show_bug.cgi?id=31109
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Jun 23, 2015 at 10:32 PM, Ralph Alexander Bariz <
>>>>>>>> ralph...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> @https://bugzilla.xamarin.com/
>>>>>>>>>
>>>>>>>>> Wasn't a "Castle.Core not working with Mono 4", but the problem I
>>>>>>>>> faced when debugging the whole (My app contains another proxying 
>>>>>>>>> mechanism
>>>>>>>>> I didn't exchage with castle.core unitl now facing similar problems).
>>>>>>>>>
>>>>>>>>> Am Dienstag, 23. Juni 2015 14:24:55 UTC+2 schrieb Jonathon Rossi:
>>>>>>>>>>
>>>>>>>>>> I can't find any issues logged by you on our issue tracker, did
>>>>>>>>>> you log it on the mono or ours?
>>>>>>>>>>
>>>>>>>>>> https://github.com/castleproject/Core/issues/created_by/RalphBariz
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Tue, Jun 23, 2015 at 10:17 PM, Ralph Alexander Bariz <
>>>>>>>>>> ralph...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> To do so, I would need to find it. Since it's a time ago, the
>>>>>>>>>>> bugtracking system lack of a reporterassignment list and I do not 
>>>>>>>>>>> know
>>>>>>>>>>> exactly what I wrote... I simply do not find it :( Sorry.
>>>>>>>>>>>
>>>>>>>>>>> Am Dienstag, 23. Juni 2015 13:17:45 UTC+2 schrieb Jonathon Rossi:
>>>>>>>>>>>>
>>>>>>>>>>>> Can you post a link to the logged issue for what you are
>>>>>>>>>>>> referring to by "the type thing fixed with this, no".
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue, Jun 23, 2015 at 6:43 PM, Ralph Alexander Bariz <
>>>>>>>>>>>> ralph...@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> the generics thing, yes. the type thing fixed with this, no...
>>>>>>>>>>>>> at least not from me.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Ralph
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am Montag, 22. Juni 2015 15:27:05 UTC+2 schrieb Jonathon Rossi:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Just for future sake do you know if that issue was ever
>>>>>>>>>>>>>> logged in the mono issue tracker because I couldn't find 
>>>>>>>>>>>>>> anything relevant.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Mon, Jun 22, 2015 at 11:25 PM, Jonathon Rossi <
>>>>>>>>>>>>>> jo...@jonorossi.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi Ralph,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> See https://github.com/castleproject/Core/issues/81 for the
>>>>>>>>>>>>>>> issue that was already logged and the progress we are making.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Sun, Jun 14, 2015 at 5:18 AM, Ralph Alexander Bariz <
>>>>>>>>>>>>>>> ralph...@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> The other crash happening when bypassed this, is fixed with
>>>>>>>>>>>>>>>> mono 4.3.0
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> contributing a patch would not make sense, since adding the
>>>>>>>>>>>>>>>> fix is a one line thing. simplyreplace constraints[i] = 
>>>>>>>>>>>>>>>> Adjust... with
>>>>>>>>>>>>>>>> something like retConstraints[i] = Adjust... where 
>>>>>>>>>>>>>>>> retConstraints is a new
>>>>>>>>>>>>>>>> Type[constraints.Length]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Kind Regards
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> PS: a message when this is implemented would be nice so I
>>>>>>>>>>>>>>>> can stop carrying a castle.core fork around
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>>>>> Google Groups "Castle Project Users" group.
>>>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails
>>>>>>>>>>>>>>>> from it, send an email to
>>>>>>>>>>>>>>>> castle-project-users+unsubscr...@googlegroups.com.
>>>>>>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>>>>>>> castle-pro...@googlegroups.com.
>>>>>>>>>>>>>>>> Visit this group at
>>>>>>>>>>>>>>>> http://groups.google.com/group/castle-project-users.
>>>>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Jono
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Jono
>>>>>>>>>>>>>>
>>>>>>>>>>>>>  --
>>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>>> Google Groups "Castle Project Users" group.
>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>>>> it, send an email to
>>>>>>>>>>>>> castle-project-users+unsubscr...@googlegroups.com.
>>>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>>>> castle-pro...@googlegroups.com.
>>>>>>>>>>>>> Visit this group at
>>>>>>>>>>>>> http://groups.google.com/group/castle-project-users.
>>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Jono
>>>>>>>>>>>>
>>>>>>>>>>>  --
>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>> Google Groups "Castle Project Users" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>> it, send an email to
>>>>>>>>>>> castle-project-users+unsubscr...@googlegroups.com.
>>>>>>>>>>> To post to this group, send email to
>>>>>>>>>>> castle-pro...@googlegroups.com.
>>>>>>>>>>> Visit this group at
>>>>>>>>>>> http://groups.google.com/group/castle-project-users.
>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Jono
>>>>>>>>>>
>>>>>>>>>  --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "Castle Project Users" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to castle-project-users+unsubscr...@googlegroups.com
>>>>>>>>> .
>>>>>>>>> To post to this group, send email to
>>>>>>>>> castle-pro...@googlegroups.com.
>>>>>>>>> Visit this group at
>>>>>>>>> http://groups.google.com/group/castle-project-users.
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Jono
>>>>>>>>
>>>>>>>  --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Castle Project Users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to castle-project-users+unsubscr...@googlegroups.com.
>>>>>>> To post to this group, send email to castle-pro...@googlegroups.com.
>>>>>>> Visit this group at
>>>>>>> http://groups.google.com/group/castle-project-users.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jono
>>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Castle Project Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to castle-project-users+unsubscr...@googlegroups.com.
>>>>> To post to this group, send email to castle-pro...@googlegroups.com.
>>>>> Visit this group at
>>>>> http://groups.google.com/group/castle-project-users.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Jono
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Castle Project Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to castle-project-users+unsubscr...@googlegroups.com.
>>>
>> To post to this group, send email to
>>> castle-project-users@googlegroups.com.
>>>
>>
>>> Visit this group at http://groups.google.com/group/castle-project-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Jono
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/Castle.Core.Tests/Castle.Core.Tests.csproj b/src/Castle.Core.Tests/Castle.Core.Tests.csproj
index 8e90d29..e592849 100644
--- a/src/Castle.Core.Tests/Castle.Core.Tests.csproj
+++ b/src/Castle.Core.Tests/Castle.Core.Tests.csproj
@@ -188,6 +188,9 @@
     <Reference Include="NLog">
       <HintPath>..\..\lib\net45\NLog.dll</HintPath>
     </Reference>
+    <Reference Include="nunit.framework">
+      <HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
+    </Reference>
   </ItemGroup>
   <Choose>
     <When Condition="$(TargetFrameworkVersion)!='v3.5'">
@@ -207,31 +210,6 @@
     <Reference Include="System.Core" />
     <Reference Include="System.Xml" />
   </ItemGroup>
-  <Choose>
-    <When Condition="$(MSBuildTargets)!='Silverlight 5.0' and $(MSBuildTargets)!='Silverlight 4.0'">
-      <ItemGroup>
-        <Reference Include="System.Data" />
-        <Reference Include="nunit.framework">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath>..\..\lib\nunit.framework.dll</HintPath>
-        </Reference>
-      </ItemGroup>
-    </When>
-  </Choose>
-  <Choose>
-    <When Condition="$(MSBuildTargets) == 'Silverlight 5.0' or $(MSBuildTargets) == 'Silverlight 4.0'">
-      <ItemGroup>
-        <Reference Include="NUnit.Silverlight.Framework">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath>$(RootPath)\lib\$(BuildConfigKey)\NUnit.Silverlight.Framework.dll</HintPath>
-        </Reference>
-        <Reference Include="NUnit.Silverlight.Compatibility">
-          <SpecificVersion>False</SpecificVersion>
-          <HintPath>$(RootPath)\lib\$(BuildConfigKey)\NUnit.Silverlight.Compatibility.dll</HintPath>
-        </Reference>
-      </ItemGroup>
-    </When>
-  </Choose>
   <ItemGroup>
     <Compile Include="AccessLevelTestCase.cs" />
     <Compile Include="BasePEVerifyTestCase.cs" />
@@ -428,6 +406,7 @@
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
+    <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Components.DictionaryAdapter.Tests\AdaptingNameValueCollectionsTestCase.cs" />
diff --git a/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithMethodsWithOptionalParametersTestCase.cs b/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithMethodsWithOptionalParametersTestCase.cs
index 3966682..cdbc944 100644
--- a/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithMethodsWithOptionalParametersTestCase.cs
+++ b/src/Castle.Core.Tests/DynamicProxy.Tests/ClassProxyWithMethodsWithOptionalParametersTestCase.cs
@@ -1,38 +1,33 @@
-// Copyright 2004-2015 Castle Project - http://www.castleproject.org/
-// 
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// 
-//     http://www.apache.org/licenses/LICENSE-2.0
-// 
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#if !DOTNET35 && !SILVERLIGHT
-namespace Castle.DynamicProxy.Tests
-{
-	using CastleTests.DynamicProxy.Tests.Classes;
-
-	using NUnit.Framework;
-
-	[TestFixture]
-	public class ClassProxyWithMethodsWithOptionalParametersTestCase
-	{
-		[Test]
-#if __MonoCS__
-		// Seems like mono is too strict, and doesn't handle a nullable default parameter in ParameterBuilder
-		// https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs#L101
-		[Ignore("System.ArgumentException : Constant does not match the defined type.")]
-#endif
-		public void CanCreateClassProxy()
-		{
-			var proxyGenerator = new ProxyGenerator();
-			proxyGenerator.CreateClassProxy<ClassWithMethodsWithAllKindsOfOptionalParameters>();
-		}
-	}
-}
+// Copyright 2004-2015 Castle Project - http://www.castleproject.org/
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//     http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#if !DOTNET35 && !SILVERLIGHT
+namespace Castle.DynamicProxy.Tests
+{
+	using CastleTests.DynamicProxy.Tests.Classes;
+
+	using NUnit.Framework;
+
+	[TestFixture]
+	public class ClassProxyWithMethodsWithOptionalParametersTestCase
+	{
+		[Test]
+		public void CanCreateClassProxy()
+		{
+			var proxyGenerator = new ProxyGenerator();
+			proxyGenerator.CreateClassProxy<ClassWithMethodsWithAllKindsOfOptionalParameters>();
+		}
+	}
+}
 #endif
\ No newline at end of file
diff --git a/src/Castle.Core.Tests/packages.config b/src/Castle.Core.Tests/packages.config
new file mode 100644
index 0000000..09300da
--- /dev/null
+++ b/src/Castle.Core.Tests/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="NUnit" version="2.6.4" targetFramework="net45" />
+</packages>
\ No newline at end of file
diff --git a/src/Castle.Core/DynamicProxy/Generators/Emitters/MethodEmitter.cs b/src/Castle.Core/DynamicProxy/Generators/Emitters/MethodEmitter.cs
index af1a548..44772be 100644
--- a/src/Castle.Core/DynamicProxy/Generators/Emitters/MethodEmitter.cs
+++ b/src/Castle.Core/DynamicProxy/Generators/Emitters/MethodEmitter.cs
@@ -156,7 +156,7 @@ namespace Castle.DynamicProxy.Generators.Emitters
 				{
 					parameterBuilder.SetCustomAttribute(attribute);
 				}
-#if DOTNET45
+#if DOTNET45 && !__MonoCS__
 				if (parameter.HasDefaultValue && parameter.DefaultValue != null)
 				{
 					if (parameter.ParameterType == typeof(decimal) || parameter.ParameterType == typeof(decimal?))

Reply via email to