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

Compatible with .net Core 2.0 and Linux? #132

Open
dsyno opened this issue May 17, 2018 · 8 comments
Open

Compatible with .net Core 2.0 and Linux? #132

dsyno opened this issue May 17, 2018 · 8 comments

Comments

@dsyno
Copy link

dsyno commented May 17, 2018

Is metadata-extractor-dotnet compatible with .net Core 2.0 running on Linux?

I am publishing .net Core 2.0 code to AWS Lambda, which runs on Linux. If I add MetadataExtractor 2.0.0 to my Visual Studio project, the publish to AWS fails.

I publish to AWS using the AWSSDK for Visual Studio 2017. It doesn't give any details on why the publish fails. It simply says "Error uploading function" and "Upload failed."

If I uninstall MetadataExtractor, then the project publishes fine.

Any idea what's going on, and how to resolve it?

@kwhopper
Copy link
Collaborator

It sounds like a local issue. You might check this and see if it helps:

https://forums.aws.amazon.com/thread.jspa?messageID=826759&tstart=0

@dsyno
Copy link
Author

dsyno commented May 17, 2018

I don't believe that's related, since I can publish just fine without MetadataExtractor. (And also publish just fine with several other external packages; e.g. SkiaSharp, ImageSharp, LibTiff.net).

Has anyone successfully uploaded MetadataExtractor 2.0.0 to AWS Lambda, running .net Core 2.0?

@dsyno
Copy link
Author

dsyno commented May 17, 2018

I may have discovered the issue. The following are the errors that Visual Studio is complaining about, when it attempts to publish MetadataExtractor.

And it seems "there's no other option than the package owner to upgrade their references": https://stackoverflow.com/questions/47712035/

... error NU1605: Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version. 
... error NU1605:  ProcessUpload -> Amazon.Lambda.Serialization.Json 1.2.0 -> Newtonsoft.Json 9.0.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.unix.System.IO.FileSystem 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0) 
... error NU1605:  ProcessUpload -> Amazon.Lambda.Serialization.Json 1.2.0 -> Newtonsoft.Json 9.0.1 -> System.Diagnostics.Debug (>= 4.0.11)
... error NU1605: Detected package downgrade: System.Diagnostics.Tracing from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version. 
... error NU1605:  ProcessUpload -> AWSSDK.S3 3.3.18.2 -> AWSSDK.Core 3.3.22.1 -> System.Net.Requests 4.0.11 -> System.Net.Primitives 4.0.11 -> runtime.unix.System.Net.Primitives 4.3.0 -> System.Diagnostics.Tracing (>= 4.3.0) 
... error NU1605:  ProcessUpload -> AWSSDK.S3 3.3.18.2 -> AWSSDK.Core 3.3.22.1 -> System.Net.Requests 4.0.11 -> System.Diagnostics.Tracing (>= 4.1.0)
... error NU1605: Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version. 
... error NU1605:  ProcessUpload -> AWSSDK.S3 3.3.18.2 -> AWSSDK.Core 3.3.22.1 -> System.Net.Requests 4.0.11 -> System.Net.Http 4.1.0 -> System.IO.FileSystem 4.0.1 -> runtime.unix.System.IO.FileSystem 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0) 
... error NU1605:  ProcessUpload -> AWSSDK.S3 3.3.18.2 -> AWSSDK.Core 3.3.22.1 -> System.Net.Requests 4.0.11 -> System.Diagnostics.Debug (>= 4.0.11)
... error NU1605: Detected package downgrade: System.Diagnostics.Tracing from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version. 
... error NU1605:  ProcessUpload -> AWSSDK.S3 3.3.18.2 -> AWSSDK.Core 3.3.22.1 -> System.Net.Requests 4.0.11 -> System.Net.Http 4.1.0 -> System.IO.FileSystem 4.0.1 -> runtime.unix.System.IO.FileSystem 4.3.0 -> System.Buffers 4.3.0 -> System.Diagnostics.Tracing (>= 4.3.0) 
... error NU1605:  ProcessUpload -> AWSSDK.S3 3.3.18.2 -> AWSSDK.Core 3.3.22.1 -> System.Net.Requests 4.0.11 -> System.Diagnostics.Tracing (>= 4.1.0)

So, is this something that MetadataExtractor has to fix?

@drewnoakes
Copy link
Owner

I've seen these errors in other situations before and IIRC got it working via assembly redirects in my consuming package. There may be better upstream solutions, as you say, but I'm not an expert.

You may find that this workaround gets things working for you:

dotnet/core#907 (comment)

If you need the library to change in some way, could you make a PR?

@dsyno
Copy link
Author

dsyno commented May 18, 2018

This error occurs when 'dotnet publish' is called, so yes, you should definitely fix it. I imagine it does/will effect a lot of people.

Replicate the issue by creating a .net Core 2.0 project that includes MetadataExtractor, then try to publish that project.

"If you need the library to change in some way, could you make a PR?"
I do not understand. I assume PR=pull request, which I've never done.

Is this a problem you can fix or not?

@drewnoakes
Copy link
Owner

Yes a PR is a pull request. No better time than the present to make your first.

Is this a problem you can fix or not?

I like to think I can fix any problem given enough time and focus. Unfortunately in this case I am focussed elsewhere, which is why I asked for your help. You know more about the issue than me. It seems that updating the packages to their latest versions is not a long term solution, as your other dependencies may update which then leads back to this situation again in future. The fix should address the root of the problem, not the symptom.

@dsyno
Copy link
Author

dsyno commented May 18, 2018

Well I appreciate the vote of confidence, but you're giving me too much credit. I have no idea where to even begin to fix the problem.

All I know is, include MetadataExtractor in your .net Core 2.0 project, and it will no longer publish to AWS.

So until someone is able to fix MetadataExtractor, it appears it will not work for any Amazon projects, yes?

@dsyno
Copy link
Author

dsyno commented May 21, 2018

FYI, I was able to resolve this by installing Microsoft.NETCore.Targets via NuGet in Visual Studio.

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

3 participants