Skip to content
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

Support CoreCLR / .NET Core #641

Closed
meriturva opened this issue Mar 17, 2015 · 223 comments
Closed

Support CoreCLR / .NET Core #641

meriturva opened this issue Mar 17, 2015 · 223 comments
Labels
Milestone

Comments

@meriturva
Copy link

Any idea when NLog will support CoreCLR?
So thanks.
Meriturva

@304NotModified
Copy link
Member

Do you have an idea what we should change to support coreclr? (Process, code, build)

Correct me if wrong, I think with visual studio 2015 it would be easier to support coreCLR.

@meriturva
Copy link
Author

I don't have an idea, i have installed VisualStudo 2015 CTP 6 last week....it is completely based on new environments.... coreFx and coreClr.
I think that there are a lot of changes specially for the System.IO namespace....and coreClr is not finished right now.

@304NotModified
Copy link
Member

I'm pretty sure we will support coreCLR. Probably the next release after 4.0.

@304NotModified
Copy link
Member

Moved to feature request.

@ShaneCourtrille
Copy link

Has there been any further discussion around this?

@304NotModified
Copy link
Member

Well I tried PCL, and it was really a major task to get that working. We never got that working due to the many things that are missing.

I thought the same problem was for coreCLR. We like to support it, but if we have to rewrite a lot of stuff, it will take a lot of time.

@304NotModified
Copy link
Member

Related is this branch (UAP10)

https://github.com/304NotModified/NLog/tree/UAP10

But is has still some compile errors. UAP <> coreclr, but is not fully clear what the relation is between them.

(The term should by UWP10 and not UAP10?).

Let see what the showstoppers are in this project:

  1. MUST: Attribute.GetCustomAttribute won't work - all layout, layout renderers and targets are using
  2. MUST: some threading stuff isn't working in LoggerImpl.Write, which is the core of NLog.
  3. MUST: we cannot use stacktrace for GetCurrentClassLogger?
  4. Should: We can't use StackFrame and so we cannot use this for `${stacktrace}
  5. Should: Assembly.LoadFrom we cannot load other assemblies (NLog building blocks) in runtime?

edit: now 57 compile errors. NLog.uap10.sln

We really need some help on this.

@304NotModified
Copy link
Member

46 38 errors.

19 errors with some runtime exceptions

@304NotModified
Copy link
Member

But real stuck now.

@ShaneCourtrille
Copy link

Well CoreCLR won't have issue 3 or 4 as Stackframes are available. That said I'm only vaguely aware of supporting multiple environments so I'm not sure how adding dnxcore50 without going the PCL is any different then supporting Silverlight without PCL.

If someone picks up this issue at some point it'd be good to be aware of https://github.com/aspnet/Logging

@304NotModified
Copy link
Member

Well CoreCLR won't have issue 3 or 4 as Stackframes are available.

Any idea what about 5?

That said I'm only vaguely aware of supporting multiple environments so I'm not sure how adding dnxcore50 without going the PCL is any different then supporting Silverlight without PCL.

We use multiple solution/project files and compiler conditionals (e.g. #if NET3_5)

But I don't have any experience with CoreCLR, yet. I also still in beta? How do I create a CoreCLR supported library in Visual Studio (2015)?

If someone picks up this issue at some point it'd be good to be aware of https://github.com/aspnet/Logging

I think we should also write an adapter for that. Do we need coreCLR support for it?

@damageboy
Copy link
Contributor

My 2 cents here:
At least when it comes to projects/solutions...

Part of this whole new world is also a new build system (aka project.json)
which is capable of targeting both the standard framework and the new
dnx/coreclr one.

So, at least in theory, it should be possible to covert to the new build
system while still targeting the normal framework, while building out the
the coreclr one
On Oct 10, 2015 6:07 PM, "Julian Verdurmen" notifications@github.com
wrote:

Well CoreCLR won't have issue 3 or 4 as Stackframes are available.

Any idea what about 5?

That said I'm only vaguely aware of supporting multiple environments so
I'm not sure how adding dnxcore50 without going the PCL is any different
then supporting Silverlight without PCL.

We use multiple solution/project files and compiler conditionals (e.g. #if
NET3_5)

But I don't have any experience with CoreCLR, yet. I also still in beta?
How do I create a CoreCLR supported library in Visual Studio (2015)?

If someone picks up this issue at some point it'd be good to be aware of
https://github.com/aspnet/Logging

I think we should also write an adapter for that. Do we need coreCLR
support for it?


Reply to this email directly or view it on GitHub
#641 (comment).

@304NotModified
Copy link
Member

Thanks @damageboy , so I don't need a new project file (csproj), but only a project.json?

PS analysis result of this cool extension

image

@304NotModified
Copy link
Member

I see that .Net core is planned in Q1 2016.

https://github.com/dotnet/core/blob/master/roadmap.md

image

@304NotModified
Copy link
Member

note5 : Use AssemblyLoadContext

@damageboy
Copy link
Contributor

Basically, once you switch to project.json, your main build system is a
command line build, through the dot net utility (dnu),
so you build/pack with dnu build / dnu pack

Of course, microsoft being microsoft, the GUI is never far behind.
So there's a new project extension .xproj, which really just references the
project.json file for more native support through VS UI.

Right now, the whole thing is shipped with VS 2015 RTM as beta5, there's a
beta7 package out there for anyone to install:
http://www.microsoft.com/en-us/download/details.aspx?id=48738&fa43d42b-25b5-4a42-fe9b-1634f450f5ee=True

And there's supposed to be a beta8 release anyday now (October 12th right
now, but it's being pushed back every couple of days)

The portability analyzer is a great tool, although currently the biggest
hurdle is when your project is dependent on other critical packages that
don't support corclr yet.

In NLog's case I think the situation is actually pretty great (which is
really uncommon): You have no critical package dependencies except for
XUnit which is actually supported (version 2.0 only) under coreclr!

Shechter.

On Sat, Oct 10, 2015 at 6:41 PM, Julian Verdurmen notifications@github.com
wrote:

note5 : Use AssemblyLoadContext


Reply to this email directly or view it on GitHub
#641 (comment).

@damageboy
Copy link
Contributor

I should point out though, that one of the nicer aspects of the new system,
is that once you do that switch, each target platform that your project
targets gets built every build...
So essentially, you start hacking NLog for coreclr while using the new
project.json system, and every build you issue through VS shows build
errors from all your targets (coreclr + regular .net), which really helps
streamline development...

Shechter.

On Sat, Oct 10, 2015 at 6:41 PM, Julian Verdurmen notifications@github.com
wrote:

note5 : Use AssemblyLoadContext


Reply to this email directly or view it on GitHub
#641 (comment).

@304NotModified
Copy link
Member

Thanks @damageboy !

I'm now trying to get the UAP10 build working. After that, I will check on coreCLR.

@304NotModified 304NotModified changed the title Support CoreCLR Support CoreCLR / .NET Core Oct 13, 2015
@senj
Copy link

senj commented Nov 13, 2015

any news?

@304NotModified
Copy link
Member

Yes,

we have a plan now:

  1. We will fix first Xamarin (see Xamarin (iOS, Android) and Windows Phone 8 #1009) - this is now for 80% done
  2. Then we will fix UAP10 - done for 60%
  3. And after that or .Net Core, of PCL. We will decide then, but PCL has a lot more up-votes: http://nlog.userecho.com/list/44388-general/#module_994254/search/support

Because .Net Core isn't released yet, we find it has less prio.

If you think the .Net Core should be done earlier, help will be boost the development!

@pauldotknopf
Copy link

CoreCLR is now RC1, which is "go-live". It is at a good state to start switching over.

@304NotModified
Copy link
Member

Can you help with porting NLog?

@pauldotknopf
Copy link

Would you be willing to change the build system to use dnx project.json? It is a big change from typical .proj in terms of development, deployment, etc.

@304NotModified
Copy link
Member

@jeremymeng
Copy link

Thank you @304NotModified and @phenixdotnet! The beta1 package works like a charm!

@yyjdelete
Copy link

4.4.0-alpha2~4.4.0-beta1 is failed to install to project target dotnet451+(csproj only, not xproj) in VS due to an issue NuGet/Home#1855
Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global Assembly Cache.
Seems an workaroud is set it to "type": "build" for net451
refer
"System.Runtime": { "type": "build", "version": ""}

@304NotModified
Copy link
Member

@yyjdelete

Hi! Do we need to change that or the project using NLog? This only needed for "System.Runtime" ?

@phenixdotnet
Copy link

This should be changed in the NLog project.json file.
The reference entry could be a complex object instead of a simple string.

@304NotModified
Copy link
Member

I'm working on this (and testing it). Can confirm that 4.4.0-beta1 can't be installed net451 (it does install on net45)

@304NotModified
Copy link
Member

@phenixdotnet can we chat on gitter ? I need your expertise :)

edit: you need to sign in first with your github account before I can add you to a room

@phenixdotnet
Copy link

I'm online :)

@304NotModified
Copy link
Member

@yyjdelete
Copy link

@304NotModified
Thanks, it works now.

But it's so strange that the new package can only be found at nuget v2(https://www.nuget.org/api/v2/) and web(https://www.nuget.org/packages/NLog/4.4.0-beta2), not v3(http://api.nuget.org/v3/index.json ).And the newest version in v3 is still 4.4.0-beta1(https://api.nuget.org/v3/registration1/nlog/index.json).

@jonorossi
Copy link

@yyjdelete the nuget.org v3 feeds have an outage to the services that update them, they are still visible because the static files are served via an Azure storage account.

@304NotModified
Copy link
Member

It looks like beta2 is still not in the v3 index. I have updated the meta-data, so maybe some luck in a few minutes

@jonorossi
Copy link

@304NotModified @yyjdelete nope, also looks like Serilog 2.0.0-beta-509 still hasn't made it into the index yet either. It worked fine just changing the project.json to the version I needed to get the changes I made to Serilog into Castle Core yesterday, which it sounds like you've done.

@304NotModified
Copy link
Member

Looks like .net core rc2 is finally released!

@304NotModified
Copy link
Member

304NotModified commented May 20, 2016

Let continue discussion at #1458

@NLog NLog locked and limited conversation to collaborators May 20, 2016
@304NotModified
Copy link
Member

304NotModified commented Jul 25, 2016

This thread is large, so closing this let continue the discussion at #1559

@304NotModified 304NotModified modified the milestones: 4.4, 5.0 Aug 5, 2016
@snakefoot snakefoot modified the milestones: 5.0 - OLD, 4.5 beta 7 Jan 15, 2021
@snakefoot snakefoot modified the milestones: 4.5 beta 7, 4.5 Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests