Closed red4cape closed 3 years ago
Tagging subscribers to this area: @safern, @tarekgh See info in area-owners.md if you want to be subscribed.
Author: | red4cape |
---|---|
Assignees: | - |
Labels: | `area-System.Drawing`, `untriaged` |
Milestone: | - |
@red4cape, so to understand correctly, you are building on OSX and then trying to deploy to your Ubuntu machine? How are you building/deploying the app?
Could you provide a small example app and some steps to reproduce?
I develop using Visual Studio for Mac (not VS Code).
Steps to reproduce:
An assembly specified in the application dependencies manifest (Entry.deps.json) was not found: package: 'System.Drawing.Common', version: '5.0.2' path: 'runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll'
Sample code to add in program.cs Main():
var path = "/local/path/file.svg"; var pngPath = "/local/path/converted.png"; var svgDocument = SvgDocument.Open<SvgDocument>(path); var bitmap = svgDocument.Draw(); bitmap.Save(pngPath, ImageFormat.Png);
PS: System.Drawing.Common only is the dependency causing these issues. I have used various Azure .Net libraries such as Storage, Computer Vision etc; with no problems when deployed and ran on Ubuntu. Searching online, it appears there are a fair number of people who have been experiencing these problems with System.Drawing namespace.
Added a symbolic link to "/usr/share/dotnet/shared/Microsoft.AspNetCore.App/5.0.5" from "runtimes/unix/lib/netcoreapp3.0". That fixed the problem. Good enough for now to unblock me.
I have been getting the below error while trying to start my application on Ubuntu 20.04, with .Net 5.0 installed.
An assembly specified in the application dependencies manifest (Entry.deps.json) was not found: package: 'System.Drawing.Common', version: '5.0.2' path: 'runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll'
The project builds and runs without any errors on Mac OSx... However when I publish the Release to Ubuntu, I get the above error.
Note: I am using package Svg version 3.2.3, which is dependent on System.Drawing.Common.
I have already tried adding "System.Drawing.Common" nuget to the project but no luck. Any help is appreciated.