-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MONO_4_0 support #958
MONO_4_0 support #958
Conversation
Excuse my ignorance but are there any conditional compilation code blocks which might be affected from this change? |
Yes, I added 2 configurations for mono 2 and mono 4, and I tested building in both configurations (and also I corrected some conditional preprocessing directives) |
Thanks for this PR! To be consistent, we prefer:
Can you tell me how to change the nuspec for this? As you can see, mono isn't in nuspec yet. |
Thank you for your fast and valuable reply!
here: Lines 107 to 108 in 9bc000a
the problem is that there should be no such thing as "mono specific", because they should be byte by byte the same as .net version dlls. You can install it into mono2 and mono4. But why on the earth mono projects should use these libraries instead of libraries for their required frameworks (i.e. lib/net35, lib/net45) ? And this is your problem, not mine. Because I don't use NLog.proj file at all. I have portage bash script which builds my package from my separate nuspec (I build my version of nupkg with lib/net45/NLib.dll inside) Probably it is possible to build them into net35 and net45 (assuming that this is linux-hosted build and .net versions will not be built at the same machine). Or one need to check the underlaying build OS (if it is windows - then build mono assemblies with separate toolchain and place them into separate location).
https://github.com/NLog/NLog/blob/9bc000af0df388b409f7f34869df544b311d1716/src/NLog/NLog.mono.csproj but it should be NLog.mono2.csproj to be used in
Line 176 in 9bc000a
because of the value of ProjectFileSuffix property:
Lines 105 to 108 in 9bc000a
|
Thanks for the comprehensive response! 1+2) Yes, the .proj isn't good for Mono, but that has probably a cause.
The key question is, if MONO uses the .Net dll's, then we can: A) Make a separate nuget package for mono (has seen that before) At least, the usage of conditional compilation symbols are questionable. The up-side, we can build it with mono and knows that it works (mostly). But now I dunno what to do with Also, it's not clear to mean what the benefit is besides the current MONO_2. What are the features what aren't supported inn MONO2? |
Unfortunately I don't have xunit on my linux yet, because of xunit/xunit#548 So, I disabled build of tests in .sln file. error: file not found: ./build/bin/Release/Mono 2.x/NLog.UnitTests.dll and following The command "mono ./testrunner/xunit.runners.1.9.2/tools/xunit.console.clr4.exe "./build/bin/Release/Mono 2.x/NLog.UnitTests.dll"" exited with 255. Actually, I am working on issue gentoo/dotnet#115 Now I am going to reenable test projects in .sln files, and disable them locally with my portage patch |
Mono.targets was broken (because it can't work on linux in principle)
Line 4 in fb44621
the text of exception is
and here is it's source:
Line 39 in fb44621
Mono.targets was used in
This file was not tested in CI builds. (because another file with name NLog.UnitTests.mono.csproj was built with .sln) For now I have no opinion what to do with it... |
this kind of noncrossplatform code
NLog/tests/NLog.UnitTests/LogFactoryTests.cs Line 344 in aa7af2b
has no chances to pass, i guess... I have no future plans on improving this PR (works for me). |
my local version of mono is exactly travis's version is (too old): |
4c662b9
to
c3eb07f
Compare
@ArsenShnurkov I have no idea what to do with this PR. I can merge it (after resolve conflicts), but it's useless if we don't release it somewhere (nuget?) So need you opinion on that. Also I was wondering, why can't we use Mono2 and that should also work on mono4? |
"it's useless if we don't release it somewhere" it is usefull in linux distributions, which build software from sources (i.e. portage and paludis-based distributions, such as Gentoo Linux, Funtoo Linux, Calculate Linux, Sabayon Linux, Exherbo and others) The reason of this PR was the attempt to package (release) this project for portage. See gentoo/dotnet#137 for details "I was wondering, why can't we use Mono2 and that should also work on mono4" Mono4 introduces breaking changes, and old programs will not compile anymore (binaries would run, but it's different story) |
OK, thanks for the answers. Can you check the conflicts? I will merge it when it builds :) |
It builds. It's the unit tests what fails. |
Well it has a conflict now :( Can you rebase? You can fix VerifyProjectsInSync with
See https://github.com/NLog/NLog/blob/master/CONTRIBUTING.md |
I like to merge this for 4.3 (first waiting for 4.2.1 release) . Do you need help on fixing the last things? |
i have no enough physical resources now (i.e. money). may be later. sorry |
If you reopen this PR and add me as collaborator, I will fix these last things (iff you can answer some questions if i'm lost) |
We don't need this anymore with netstandard :) |
I added MONO_4_0 define for packaging with portage package manager
UPD: see also
http://stackoverflow.com/questions/33185770/older-version-of-net-not-installed-with-latest-mono