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

Error with newer version of Common.Logging #3

Closed
nelittle opened this issue Jul 28, 2015 · 8 comments
Closed

Error with newer version of Common.Logging #3

nelittle opened this issue Jul 28, 2015 · 8 comments
Assignees

Comments

@nelittle
Copy link

I got an error when using a newer version of Common.Logging and Common.Logging.Core System.TypeInitializationException : The type initializer for 'Gridsum.DataflowEx.LogHelper' threw an exception.
----> System.TypeLoadException : Could not load type 'Common.Logging.LogManager' from assembly 'Common.Logging.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e'.
at Gridsum.DataflowEx.LogHelper.get_Logger()
at Gridsum.DataflowEx.Dataflow.d__18.MoveNext()

i got the same issue using 3.1 and 3.2 of the frameworks.

i was able to get past that issue by revering Common.Logging.Core to 2.2 and updating my app.config.
It looks like they had similar problems with an earlier version: net-commons/common-logging#23

but that should be fixed in 2.2 according to that thread. Not sure what the root problem is here or if maybe a new version of DataflowEx should be published with updated references to the logging frameworks.

@nelittle
Copy link
Author

here is the full stack trace:
System.TypeInitializationException : The type initializer for 'Gridsum.DataflowEx.LogHelper' threw an exception.
----> System.TypeLoadException : Could not load type 'Common.Logging.LogManager' from assembly 'Common.Logging.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e'.
at Gridsum.DataflowEx.LogHelper.get_Logger()
at Gridsum.DataflowEx.Dataflow.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Dataflow.Tests.AvailableScheduleBlockFlowTests.d__1.MoveNext() in C:\Projects\AdvancedHealth\skedge.service\Tests\Dataflow.Tests\AvailableScheduleBlockFlowTests.cs:line 28
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__4(Object state)
at NUnit.Framework.AsyncSynchronizationContext.AsyncOperation.Invoke()
at NUnit.Framework.AsyncSynchronizationContext.AsyncOperationQueue.InvokePendingOperations()
at NUnit.Framework.AsyncSynchronizationContext.AsyncOperationQueue.InvokeAll()
at NUnit.Framework.AsyncInvocationRegion.AsyncVoidInvocationRegion.WaitForPendingOperationsToComplete(Object invocationResult)
at NUnit.Framework.AsyncInvocationRegion.AsyncVoidInvocationRegion.WaitForPendingOperationsToComplete(Object invocationResult)
at NUnit.Core.NUnitAsyncTestMethod.RunTestMethod()
--TypeLoadException
at Gridsum.DataflowEx.LogHelper..cctor()

@karldodd
Copy link
Contributor

Thanks for reporting the issue @nelittle .

The reason behind the issue is a common.logging breaking change: the LogManager class has moved from Common.Logging.Core to Common.Logging, a different assembly.

Honestly DataflowEx may not update its common.logging dependency until next major version. So, if downgrading to 2.2 is acceptable in your scenario, this is probably the best way to work around. Do you need any particular feature in common.logging 3.0+?

@hangy
Copy link

hangy commented Jan 7, 2016

Would it make sense to update the NuGet package to explicitly depend on Common.Logging >= 2.2.0 && < 3.0 in order to disallow incompatible upgrades?

@nelittle
Copy link
Author

nelittle commented Jan 7, 2016

i'm no longer working on this project, but the issue we had is that another package we were using was on a much newer version, hence us having that version already installed, so we ended up having to degrade several component's version of Common.Logging. It seemed to work for us, but if any of those other components had a min version dependency that was higher, i'm not sure what we would have done.

@karldodd
Copy link
Contributor

karldodd commented Mar 8, 2016

Recently I am planning to upgrade to Common.Logging 3.x and publish a new version : )

Btw, porting the whole DataflowEx to .NET Core is also on the roadmap. This project will evolve.

@karldodd karldodd self-assigned this Mar 8, 2016
@stristan
Copy link

I'm also have an issues with Common.Logging. So wait for the new version. Can you update a status?

@karldodd
Copy link
Contributor

karldodd commented Jul 9, 2017

@nelittle @hangy @stristan Hi guys, a brand new version of DataflowEx is out with the help of .Net Core preview 2 ! Please try out the preview release to see if it solves your problem (Common.Logging upgraded to 3.4.0) :

https://www.nuget.org/packages/Gridsum.DataflowEx/2.0.0-alpha

Related pr is #13 .

Cheers,

@karldodd karldodd added the done label Sep 21, 2017
@karldodd
Copy link
Contributor

DataflowEx 2.0.0 with Common.Logging 3.4 was released. So close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants