Discussion:
Mono support for Castle Core
Jonathon Rossi
2014-12-29 04:39:52 UTC
Permalink
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
on Ubuntu on our new Ubuntu TeamCity agent:

Missing method .ctor in assembly
/home/teamcity/buildagent/work/16de7b8c88ab14af/lib/net45/NLog.dll, type
System.Runtime.CompilerServices.ExtensionAttribute
Can't find custom attr constructor image:
/home/teamcity/buildagent/work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken:
0x0a000018

http://builds.castleproject.org/viewType.html?buildTypeId=Core_MasterMono310

I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?

The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Hari Menon
2015-01-02 15:37:20 UTC
Permalink
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.

What is the version of Ubuntu and Mono running on the Ubuntu agent on the
CI server?

It looks like the latest Mono available as Ubuntu packages are for 3.2.8
<http://packages.ubuntu.com/search?keywords=mono-complete> - but since the
build configuration is named Master - Mono 3.10, I am guessing we are
building Mono 3.10 ourselves.

Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
Missing method .ctor in assembly
/home/teamcity/buildagent/work/16de7b8c88ab14af/lib/net45/NLog.dll, type
System.Runtime.CompilerServices.ExtensionAttribute
0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Jonathon Rossi
2015-01-04 07:28:46 UTC
Permalink
Yes, I think I saw that one and that they haven't had problems with any
recent Mono version.

The agent is a fresh install, I set it up in December with Ubuntu 14.04 and
installed Mono 3.10 as per these instructions:
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives

$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)
Post by Hari Menon
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.
What is the version of Ubuntu and Mono running on the Ubuntu agent on the
CI server?
It looks like the latest Mono available as Ubuntu packages are for 3.2.8
<http://packages.ubuntu.com/search?keywords=mono-complete> - but since
the build configuration is named Master - Mono 3.10, I am guessing we are
building Mono 3.10 ourselves.
Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
Missing method .ctor in assembly /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll, type System.Runtime.
CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken: 0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=
Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Hari Menon
2015-06-12 20:41:33 UTC
Permalink
I would like to try and reproduce this at my end - could you please let me
know how the 'xbuild' looked for you along with the arguments on both Mac
and Linux?
Post by Jonathon Rossi
Yes, I think I saw that one and that they haven't had problems with any
recent Mono version.
The agent is a fresh install, I set it up in December with Ubuntu 14.04
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)
Post by Hari Menon
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.
What is the version of Ubuntu and Mono running on the Ubuntu agent on the
CI server?
It looks like the latest Mono available as Ubuntu packages are for 3.2.8
<http://packages.ubuntu.com/search?keywords=mono-complete> - but since
the build configuration is named Master - Mono 3.10, I am guessing we are
building Mono 3.10 ourselves.
Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
Missing method .ctor in assembly /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll, type System.Runtime.
CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken: 0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=
Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Jonathon Rossi
2015-06-16 04:34:56 UTC
Permalink
Sorry for the delay in getting back to you, I wanted to upgrade Mono from
3.10 to 4.0.1 to see if the issue had been resolved.

After upgrading to Mono 4.0.1 the MSBuildCommunityTasks wouldn't work
anymore because Mono 4 removed the old 2.x assemblies which allows it to
work. I removed the use of those tasks in this branch:
https://github.com/castleproject/Core/tree/mono-support

This is the command that I'm running:
xbuild /p:Configuration=NET45-Release /t:RunAllTests buildscripts/Build.proj

It works well on OSX without any errors (and without those "Can't find
custom attr constructor image" ones from earlier), I get to the point of
having heaps of unit tests failing, but that is fine I want to go through
all the conditional compilation and fix them for today's mono not from mono
5 years ago.

I upgraded the castle CI mono agent to 4.0.1 and get some strange compile
errors where it can't find types from mscorlib.dll but only when building
the SerilogIntegration project, not sure what is different about it.
Running it on the machine it specifies /nostdlib but sometimes doesn't
reference an mscorlib.dll assembly. Looking at the run from TeamCity seems
to still have the "Can't find custom attr constructor image" error.

http://builds.castleproject.org/viewLog.html?buildId=10702&tab=buildResultsDiv&buildTypeId=Core_MasterMono

Do you get these errors on Linux, if not I'll look at rebuilding our CI
agent.
Post by Hari Menon
I would like to try and reproduce this at my end - could you please let me
know how the 'xbuild' looked for you along with the arguments on both Mac
and Linux?
Post by Jonathon Rossi
Yes, I think I saw that one and that they haven't had problems with any
recent Mono version.
The agent is a fresh install, I set it up in December with Ubuntu 14.04
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)
Post by Hari Menon
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.
What is the version of Ubuntu and Mono running on the Ubuntu agent on
the CI server?
It looks like the latest Mono available as Ubuntu packages are for 3.2.8
<http://packages.ubuntu.com/search?keywords=mono-complete> - but since
the build configuration is named Master - Mono 3.10, I am guessing we are
building Mono 3.10 ourselves.
Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
Missing method .ctor in assembly /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll, type System.Runtime.
CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken: 0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=
Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google
Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Hari Menon
2015-06-19 12:37:11 UTC
Permalink
Thank you - I was trying to build the configuration named "MONO310-Release"

With Mono 4.0.1, I can also build on Mac (and it fails when running the
tests). But on Ubuntu, I am getting a different error:
(BuildProject target) ->
: error : Error initializing task RegexMatch: Could not load file or
assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

This is the version of Ubuntu I have:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
Post by Jonathon Rossi
Sorry for the delay in getting back to you, I wanted to upgrade Mono from
3.10 to 4.0.1 to see if the issue had been resolved.
After upgrading to Mono 4.0.1 the MSBuildCommunityTasks wouldn't work
anymore because Mono 4 removed the old 2.x assemblies which allows it to
https://github.com/castleproject/Core/tree/mono-support
xbuild /p:Configuration=NET45-Release /t:RunAllTests
buildscripts/Build.proj
It works well on OSX without any errors (and without those "Can't find
custom attr constructor image" ones from earlier), I get to the point of
having heaps of unit tests failing, but that is fine I want to go through
all the conditional compilation and fix them for today's mono not from mono
5 years ago.
I upgraded the castle CI mono agent to 4.0.1 and get some strange compile
errors where it can't find types from mscorlib.dll but only when building
the SerilogIntegration project, not sure what is different about it.
Running it on the machine it specifies /nostdlib but sometimes doesn't
reference an mscorlib.dll assembly. Looking at the run from TeamCity seems
to still have the "Can't find custom attr constructor image" error.
http://builds.castleproject.org/viewLog.html?buildId=10702&tab=buildResultsDiv&buildTypeId=Core_MasterMono
Do you get these errors on Linux, if not I'll look at rebuilding our CI
agent.
Post by Hari Menon
I would like to try and reproduce this at my end - could you please let
me know how the 'xbuild' looked for you along with the arguments on both
Mac and Linux?
Post by Jonathon Rossi
Yes, I think I saw that one and that they haven't had problems with any
recent Mono version.
The agent is a fresh install, I set it up in December with Ubuntu 14.04
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)
Post by Hari Menon
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.
What is the version of Ubuntu and Mono running on the Ubuntu agent on
the CI server?
It looks like the latest Mono available as Ubuntu packages are for
3.2.8 <http://packages.ubuntu.com/search?keywords=mono-complete> - but
since the build configuration is named Master - Mono 3.10, I am guessing we
are building Mono 3.10 ourselves.
Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
Missing method .ctor in assembly /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll, type System.Runtime.
CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken: 0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=
Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google
Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/castle-project-devel
.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Jonathon Rossi
2015-06-19 14:33:40 UTC
Permalink
I was also using the MONO310-Release configuration earlier (months ago) to
just get stuff going, but also got things going with NET45-Release so kept
going with it as we shouldn't need a separate configuration, I do intend to
remove anything Mono specific I can.

Did you use the mono-support branch I mentioned above? As I mentioned
MSBuildCommunityTasks isn't working anymore because the MSBuild 2.0.0.0
assemblies were removed from Mono 4.x, so I've removed them in that branch.
Post by Hari Menon
Thank you - I was trying to build the configuration named "MONO310-Release"
With Mono 4.0.1, I can also build on Mac (and it fails when running the
(BuildProject target) ->
: error : Error initializing task RegexMatch: Could not load file or
assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
Post by Jonathon Rossi
Sorry for the delay in getting back to you, I wanted to upgrade Mono from
3.10 to 4.0.1 to see if the issue had been resolved.
After upgrading to Mono 4.0.1 the MSBuildCommunityTasks wouldn't work
anymore because Mono 4 removed the old 2.x assemblies which allows it to
https://github.com/castleproject/Core/tree/mono-support
xbuild /p:Configuration=NET45-Release /t:RunAllTests
buildscripts/Build.proj
It works well on OSX without any errors (and without those "Can't find
custom attr constructor image" ones from earlier), I get to the point of
having heaps of unit tests failing, but that is fine I want to go through
all the conditional compilation and fix them for today's mono not from mono
5 years ago.
I upgraded the castle CI mono agent to 4.0.1 and get some strange compile
errors where it can't find types from mscorlib.dll but only when building
the SerilogIntegration project, not sure what is different about it.
Running it on the machine it specifies /nostdlib but sometimes doesn't
reference an mscorlib.dll assembly. Looking at the run from TeamCity seems
to still have the "Can't find custom attr constructor image" error.
http://builds.castleproject.org/viewLog.html?buildId=10702&tab=buildResultsDiv&buildTypeId=Core_MasterMono
Do you get these errors on Linux, if not I'll look at rebuilding our CI
agent.
Post by Hari Menon
I would like to try and reproduce this at my end - could you please let
me know how the 'xbuild' looked for you along with the arguments on both
Mac and Linux?
Post by Jonathon Rossi
Yes, I think I saw that one and that they haven't had problems with any
recent Mono version.
The agent is a fresh install, I set it up in December with Ubuntu 14.04
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)
Post by Hari Menon
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.
What is the version of Ubuntu and Mono running on the Ubuntu agent on
the CI server?
It looks like the latest Mono available as Ubuntu packages are for
3.2.8 <http://packages.ubuntu.com/search?keywords=mono-complete> -
but since the build configuration is named Master - Mono 3.10, I am
guessing we are building Mono 3.10 ourselves.
Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
Missing method .ctor in assembly /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll, type System.Runtime.
CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken: 0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=
Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google
Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at
http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Hari Menon
2015-06-19 16:56:29 UTC
Permalink
Ah, my bad. I did switch to mono-support on the Mac, but was still trying
it out on the master branch from the Ubuntu VM.

It looks like that latest on mono-support branch does compile with mono
4.0.1 on the Ubuntu and is failing on the unit tests (like the Mac build).

Here is my build log on Ubuntu: http://paste.ubuntu.com/11741152/
Post by Jonathon Rossi
I was also using the MONO310-Release configuration earlier (months ago) to
just get stuff going, but also got things going with NET45-Release so kept
going with it as we shouldn't need a separate configuration, I do intend to
remove anything Mono specific I can.
Did you use the mono-support branch I mentioned above? As I mentioned
MSBuildCommunityTasks isn't working anymore because the MSBuild 2.0.0.0
assemblies were removed from Mono 4.x, so I've removed them in that branch.
Post by Hari Menon
Thank you - I was trying to build the configuration named
"MONO310-Release"
With Mono 4.0.1, I can also build on Mac (and it fails when running the
(BuildProject target) ->
: error : Error initializing task RegexMatch: Could not load file or
assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
Post by Jonathon Rossi
Sorry for the delay in getting back to you, I wanted to upgrade Mono
from 3.10 to 4.0.1 to see if the issue had been resolved.
After upgrading to Mono 4.0.1 the MSBuildCommunityTasks wouldn't work
anymore because Mono 4 removed the old 2.x assemblies which allows it to
https://github.com/castleproject/Core/tree/mono-support
xbuild /p:Configuration=NET45-Release /t:RunAllTests
buildscripts/Build.proj
It works well on OSX without any errors (and without those "Can't find
custom attr constructor image" ones from earlier), I get to the point of
having heaps of unit tests failing, but that is fine I want to go through
all the conditional compilation and fix them for today's mono not from mono
5 years ago.
I upgraded the castle CI mono agent to 4.0.1 and get some strange
compile errors where it can't find types from mscorlib.dll but only when
building the SerilogIntegration project, not sure what is different about
it. Running it on the machine it specifies /nostdlib but sometimes doesn't
reference an mscorlib.dll assembly. Looking at the run from TeamCity seems
to still have the "Can't find custom attr constructor image" error.
http://builds.castleproject.org/viewLog.html?buildId=10702&tab=buildResultsDiv&buildTypeId=Core_MasterMono
Do you get these errors on Linux, if not I'll look at rebuilding our CI
agent.
Post by Hari Menon
I would like to try and reproduce this at my end - could you please let
me know how the 'xbuild' looked for you along with the arguments on both
Mac and Linux?
Post by Jonathon Rossi
Yes, I think I saw that one and that they haven't had problems with
any recent Mono version.
The agent is a fresh install, I set it up in December with Ubuntu
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)
Post by Hari Menon
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.
What is the version of Ubuntu and Mono running on the Ubuntu agent on
the CI server?
It looks like the latest Mono available as Ubuntu packages are for
3.2.8 <http://packages.ubuntu.com/search?keywords=mono-complete> -
but since the build configuration is named Master - Mono 3.10, I am
guessing we are building Mono 3.10 ourselves.
Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX and
Ubuntu. I've got things working on OSX, but am getting the following error
Missing method .ctor in assembly /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll, type System.Runtime.
CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken: 0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=
Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google
Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at
http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/castle-project-devel
.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Jonathon Rossi
2015-06-22 13:38:44 UTC
Permalink
I've posted some updates in:
https://github.com/castleproject/Core/issues/79

Thanks
Post by Hari Menon
Ah, my bad. I did switch to mono-support on the Mac, but was still trying
it out on the master branch from the Ubuntu VM.
It looks like that latest on mono-support branch does compile with mono
4.0.1 on the Ubuntu and is failing on the unit tests (like the Mac build).
Here is my build log on Ubuntu: http://paste.ubuntu.com/11741152/
Post by Jonathon Rossi
I was also using the MONO310-Release configuration earlier (months ago)
to just get stuff going, but also got things going with NET45-Release so
kept going with it as we shouldn't need a separate configuration, I do
intend to remove anything Mono specific I can.
Did you use the mono-support branch I mentioned above? As I mentioned
MSBuildCommunityTasks isn't working anymore because the MSBuild 2.0.0.0
assemblies were removed from Mono 4.x, so I've removed them in that branch.
Post by Hari Menon
Thank you - I was trying to build the configuration named
"MONO310-Release"
With Mono 4.0.1, I can also build on Mac (and it fails when running the
(BuildProject target) ->
: error : Error initializing task RegexMatch: Could not load file or
assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
Post by Jonathon Rossi
Sorry for the delay in getting back to you, I wanted to upgrade Mono
from 3.10 to 4.0.1 to see if the issue had been resolved.
After upgrading to Mono 4.0.1 the MSBuildCommunityTasks wouldn't work
anymore because Mono 4 removed the old 2.x assemblies which allows it to
https://github.com/castleproject/Core/tree/mono-support
xbuild /p:Configuration=NET45-Release /t:RunAllTests
buildscripts/Build.proj
It works well on OSX without any errors (and without those "Can't find
custom attr constructor image" ones from earlier), I get to the point of
having heaps of unit tests failing, but that is fine I want to go through
all the conditional compilation and fix them for today's mono not from mono
5 years ago.
I upgraded the castle CI mono agent to 4.0.1 and get some strange
compile errors where it can't find types from mscorlib.dll but only when
building the SerilogIntegration project, not sure what is different about
it. Running it on the machine it specifies /nostdlib but sometimes doesn't
reference an mscorlib.dll assembly. Looking at the run from TeamCity seems
to still have the "Can't find custom attr constructor image" error.
http://builds.castleproject.org/viewLog.html?buildId=10702&tab=buildResultsDiv&buildTypeId=Core_MasterMono
Do you get these errors on Linux, if not I'll look at rebuilding our CI
agent.
Post by Hari Menon
I would like to try and reproduce this at my end - could you please
let me know how the 'xbuild' looked for you along with the arguments on
both Mac and Linux?
Post by Jonathon Rossi
Yes, I think I saw that one and that they haven't had problems with
any recent Mono version.
The agent is a fresh install, I set it up in December with Ubuntu
http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
$ mono --version
Mono JIT compiler version 3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)
Post by Hari Menon
You might have already seen this answer
<http://stackoverflow.com/questions/14831371/extension-methods-on-mono-2-10-8-1> on
Stack Overflow - they seem to have success with Mono 3.2.8.
What is the version of Ubuntu and Mono running on the Ubuntu agent
on the CI server?
It looks like the latest Mono available as Ubuntu packages are for
3.2.8 <http://packages.ubuntu.com/search?keywords=mono-complete> -
but since the build configuration is named Master - Mono 3.10, I am
guessing we are building Mono 3.10 ourselves.
Thanks
Post by Jonathon Rossi
I've attempted to get our build running on Mono 3.10 on both OSX
and Ubuntu. I've got things working on OSX, but am getting the following
Missing method .ctor in assembly /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll, type System.Runtime.
CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /home/teamcity/buildagent/
work/16de7b8c88ab14af/lib/net45/NLog.dll mtoken: 0x0a000018
http://builds.castleproject.org/viewType.html?buildTypeId=
Core_MasterMono310
I've read mentions that this type of error is caused by the fact
ExtensionAttribute moved assembly between .NET 4.0 and 4.5 via a
TypeForwardedTo, but I'm trying to avoid building log4net, NLog and Serilog
from source in our build. Anyone got any ideas?
The plan is to get this working so that I can add a unit test for
https://github.com/castleproject/Core/issues/72.
--
Jono
--
You received this message because you are subscribed to the Google
Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at
http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at
http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Hari Menon
2015-06-27 17:02:35 UTC
Permalink
Jono - have you seen any line endings issue especially when seeing the diff from Mac or Linux?

I was looking into adding some more options into the '.editorconfig' and this thread on stackoverflow was a good read - http://stackoverflow.com/questions/170961/whats-the-best-crlf-carriage-return-line-feed-handling-strategy-with-git

What are your thoughts?
--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Jonathon Rossi
2015-06-29 03:26:31 UTC
Permalink
Not since I added a .gitattributes file to the mono-support branch (which I
just merged to master).

It isn't the .gitattributes set up I'd like, but it is basically the same
as Windsor's and means I don't need to normalise all the line endings in
the Git object database at the moment. In the future we'll probably want to
normalise the line endings to LF, but I didn't want to make that change
with many open PRs.

Personally I think Git should manage line endings and not editorconfig,
unless we are going with LF in all files on all platforms. I think VS still
rewrites certain files with CRLF even if they only had LFs, IIRC solution
files and generated cs files like Resources.Designer.cs.
Post by Hari Menon
Jono - have you seen any line endings issue especially when seeing the
diff from Mac or Linux?
I was looking into adding some more options into the '.editorconfig' and
this thread on stackoverflow was a good read -
http://stackoverflow.com/questions/170961/whats-the-best-crlf-carriage-return-line-feed-handling-strategy-with-git
What are your thoughts?
--
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Oskar Berggren
2015-06-29 10:37:26 UTC
Permalink
Post by Jonathon Rossi
Personally I think Git should manage line endings and not editorconfig,
unless we are going with LF in all files on all platforms. I think VS still
rewrites certain files with CRLF even if they only had LFs, IIRC solution
files and generated cs files like Resources.Designer.cs.
Having dealt the line-ending setup for the NHibernate project etc. it's my
experiance also that Visual Studio cannot be trusted. While its editor
appears to detect and respect consistent line endings of a certain type,
this seems to be unreliable. The issue might be that certain plugins (e.g.
Resharper) might insert CRLF even if the file is otherwise LF. In
NHibernate we eventually settled on having GIT normalize to LF in repo and
native on checkout.

/Oskar
--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Hari Menon
2015-06-29 16:22:18 UTC
Permalink
Sounds good - then we might not have anything more to add to the current
version of the '.editorconfig' file.

Jono - could you have inadvertently removed the '.gitattributes' file
before committing?
Post by Oskar Berggren
Post by Jonathon Rossi
Personally I think Git should manage line endings and not editorconfig,
unless we are going with LF in all files on all platforms. I think VS still
rewrites certain files with CRLF even if they only had LFs, IIRC solution
files and generated cs files like Resources.Designer.cs.
Having dealt the line-ending setup for the NHibernate project etc. it's my
experiance also that Visual Studio cannot be trusted. While its editor
appears to detect and respect consistent line endings of a certain type,
this seems to be unreliable. The issue might be that certain plugins (e.g.
Resharper) might insert CRLF even if the file is otherwise LF. In
NHibernate we eventually settled on having GIT normalize to LF in repo and
native on checkout.
/Oskar
--
You received this message because you are subscribed to the Google Groups "Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Jonathon Rossi
2015-06-29 16:30:52 UTC
Permalink
Hmmm, now that I think about it I did have one committed and it was causing
me problems so I rebased it out.

Currently my core.autocrlf setting is unset which allowed things to just
work, however it isn't a solution.

Once we get through the current open PRs I think we just need to bite the
bullet and do the right thing and normalise the git object db, I've had no
problems with repos working that way.
Post by Hari Menon
Sounds good - then we might not have anything more to add to the current
version of the '.editorconfig' file.
Jono - could you have inadvertently removed the '.gitattributes' file
before committing?
Post by Oskar Berggren
Post by Jonathon Rossi
Personally I think Git should manage line endings and not editorconfig,
unless we are going with LF in all files on all platforms. I think VS still
rewrites certain files with CRLF even if they only had LFs, IIRC solution
files and generated cs files like Resources.Designer.cs.
Having dealt the line-ending setup for the NHibernate project etc. it's
my experiance also that Visual Studio cannot be trusted. While its editor
appears to detect and respect consistent line endings of a certain type,
this seems to be unreliable. The issue might be that certain plugins (e.g.
Resharper) might insert CRLF even if the file is otherwise LF. In
NHibernate we eventually settled on having GIT normalize to LF in repo and
native on checkout.
/Oskar
--
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an
.
Visit this group at http://groups.google.com/group/castle-project-devel.
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 Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-devel+***@googlegroups.com.
To post to this group, send email to castle-project-***@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...