Search code examples
c#asp.net-core-mvcexif

using System.Drawing.Imaging; Imaging does not exist in the System.Drawing


I am attempting to pull metadata from photos in a .Net Core App by using this library:

https://www.codeproject.com/Articles/27242/ExifTagCollection-An-EXIF-metadata-extraction-libr

However while implementing the ExifTagCollection class I am getting the Error listed in the title.

enter image description here

I have successfully referenced System.Drawing but it is not recognizing its drawing extension. Any help would be great. Also open to suggestions for other libraries to accomplish my goal. Thx


Solution

  • If you take a look at the site of microsoft you will see:

    "Classes within the System.Drawing.Imaging namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions."

    You are creating a web application with ASP.net so this class isn't supported for your project