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

Could not load file or assembly Newtonsoft.Json, Version=11.0.0.0 #5

Open
SeriousM opened this issue Dec 14, 2018 · 18 comments
Open

Could not load file or assembly Newtonsoft.Json, Version=11.0.0.0 #5

SeriousM opened this issue Dec 14, 2018 · 18 comments

Comments

@SeriousM
Copy link

Hi, the extension is throwing an error when it tries to send messages to Teams:

{
  "@t": "2018-12-14T07:33:39.3066813Z",
  "@mt": "The event {EventId} could not be sent to {AppInstanceTitle}.",
  "@m": "The event event-75f0bc30619608d6aa287c0000000000 could not be sent to Teams.",
  "@i": "e285b3dc",
  "@l": "Error",
  "@x": "System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)\nFile name: 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.\n   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)\n   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)\n   at System.Reflection.Assembly.LoadFrom(String assemblyFile)\n   at System.AppDomain.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)\n   at Seq.App.Teams.TeamsReactor.On(Event`1 evt)\n   at Seq.Apps.GenericHost.AppHost.SendAsync(String clef)\n\n",
  "EventId": "event-75f0bc30619608d6aa287c0000000000",
  "AppInstanceTitle": "Teams",
  "AppId": "hostedapp-161",
  "AppInstanceId": "appinstance-194"
}

We're using the extension version 1.0.16 with seq 5.0.2362 (docker image)

Do we have to add this missing dependency somewhere?

Thank you!

@AntoineGa
Copy link
Owner

Thanks for reporting!

@AntoineGa
Copy link
Owner

AntoineGa commented Dec 17, 2018

The package contains the dependency.

Do you use a Linux or Windows docker image ?

@SeriousM
Copy link
Author

The Linux image

@AntoineGa
Copy link
Owner

I have ported the code from .Net to .Net core 2.0 during the holidays.

the version 1.0.17 should solve your problem : https://www.nuget.org/packages/Seq.App.TeamsCore/1.0.17

@adamsmithkld
Copy link

I also ran into this issue when adding Seq.App.Teams, and can't add Seq.App.TeamsCore since it's not marked with the seq-app tag on nuget.org.

Could not install app
Package Seq.App.TeamsCore could not be interrogated for app configuration: no type marked with [SeqApp] could be found.

image

@nblumhardt
Copy link
Contributor

I think this is a Seq regression; on Windows, where we run apps under the full framework, the loader's quite happy to pull in the Newtonsoft.Json assembly that's included with Seq. On Linux under .NET Core for whatever reason we're not enabling this. I think it's something we should be able to fix and I'll raise a ticket on datalust/seq-tickets to cover it - thanks!

@AntoineGa
Copy link
Owner

thanks @adamsmithkld and @nblumhardt

i though it was because the nuget package was flagged net45 and not netstandard2.0

@SeriousM
Copy link
Author

SeriousM commented Feb 8, 2019

image

I really want to use it :)

@nblumhardt
Copy link
Contributor

Should be able to get a fix out in the next 5.1 pre-release build, fingers crossed for some traction on it this week :-)

@SeriousM
Copy link
Author

Hi @nblumhardt, is there any updates on the package?

image

@nblumhardt
Copy link
Contributor

Hi @SeriousM - I think the intention is that Seq.App.Teams will now work on core, so the "Core" package is probably unnecessary.

@AntoineGa
Copy link
Owner

ok, so it means that using the linux docker image datalust/seq:preview it should work using Seq.App.Teams package ?

@nblumhardt
Copy link
Contributor

Yes, that's the intention 👍

@AntoineGa
Copy link
Owner

@SeriousM : do you agree to close the issue ?

@SeriousM
Copy link
Author

do you agree to close the issue ?

@AntoineGa The issue is still present as the nuget package isn't updated since the issue was opened.

@JonesAbramoff
Copy link

Please upgrade to include Newtonsoft most recent version:
System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (0x80131621)
File name: 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
---> System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
at System.Runtime.Loader.AssemblyLoadContext.OnAssemblyResolve(RuntimeAssembly assembly, String assemblyFullName)
at Seq.App.DigestEmail.DigestEmailReactor.On(Event`1 evt)
at SeqCli.Apps.Hosting.AppContainer.SendTypedEventAsync(String clef) in C:\projects\seqcli\src\SeqCli\Apps\Hosting\AppContainer.cs:line 109

@nblumhardt
Copy link
Contributor

@JonesAbramoff Hi 👋 - which Seq version are you running?

@JonesAbramoff
Copy link

JonesAbramoff commented Aug 17, 2021 via email

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

No branches or pull requests

5 participants