James Lewis
James Lewis

Reputation: 69

CoreCompact.System.Drawing implementation

I know I'm being thick but I am having trouble implementing a new 'using' directory for my .NET Core project.

I have downloaded the necessary files for CoreCompact.System.Drawing (https://github.com/CoreCompat/CoreCompat)

I simply have no idea how to implement the folders so that I can start using this directory and subsequently use the system.drawing objects that are not supported in Core projects.

I am new to ASP.Net but have been studying C# for long enough that I don't need too detailed a guide.

Upvotes: 2

Views: 7100

Answers (3)

Jochen
Jochen

Reputation: 420

Since System.Drawing.Common doesn't work with .NET 7 on linux any more (see https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only), I'm facing problems with my 3rd party libraries still belong to System.Drawing. Unfortunately, there is no upgrade available for that 3rd-party library.

So, I'm finding myself searching for an alternative and found this reference to CoreCompat.System.Drawing as well as https://github.com/zkweb-framework/zkweb.system.drawing . Maybe it's worthy to revive those components - at least when running applications on Linux?

Upvotes: 1

CRoberts
CRoberts

Reputation: 326

You may need to add it as a reference to your project first. Do this by right clicking on the "References" file in your solution, and click add reference. Then press the "Browse..." Button in the bottom right of the pop up window and navigate to the desired DLL.

Upvotes: 1

ProgrammingLlama
ProgrammingLlama

Reputation: 38767

There's no need to use CoreCompat.System.Drawing anymore. In fact, the author says you shouldn't. The reason? Microsoft provides an official System.Drawing.Common NuGet package now.

To install:

  1. Select the Tools menu
  2. NuGet package manager
  3. Manage NuGet packages for solution
  4. Click Browse tab
  5. Search for System.Drawing.Common
  6. Select the Microsoft package
  7. Tick/check your project on the right-hand panel.
  8. Click Install
  9. Agree to the licence agreement.

Upvotes: 12

Related Questions