MigraDoc and .NET Core 2.0 The Next CEO of Stack OverflowI am using .net core with C# on linux, lib System.Drawing is missingWhat is “.NET Core”?Newtonsoft.JSON v9.01 + FileNotFoundException (.NET Core Class library)Using R.NET.Community in .NET Core 2.0 Preview 1Type 'Object' is defined in an assembly that is not referenced (NET Standard 2.0/.NET Framework 4.6.1)Use .net core with legacy .net framework dllsFileNotFoundException for a .net core class library while referenced in a .net core console appCefSharp offscreen with .net core 2.0 Runtime Error , System.IO.FileNotFoundException: 'Could not load file or assembly 'CefSharp.Core,.NET Standard 2.0 library referenced by .NET 4.6.1 project - Wrong version of Drawing library referenced.NET Core 2.2 Assembly System.Windows.Forms missingHow to determine specific dll for 'using namespace' statement in C# dotnet core

Rotate a column

Sending manuscript to multiple publishers

Is "for causing autism in X" grammatical?

Won the lottery - how do I keep the money?

Why does the UK parliament need a vote on the political declaration?

What does "Its cash flow is deeply negative" mean?

How to start emacs in "nothing" mode (`fundamental-mode`)

Can you replace a racial trait cantrip when leveling up?

Does it take more energy to get to Venus or to Mars?

Which kind of appliances can one connect to electric sockets located in a airplane's toilet?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

How do I go from 300 unfinished/half written blog posts, to published posts?

Return the Closest Prime Number

Why am I allowed to create multiple unique pointers from a single object?

Why do professional authors make "consistency" mistakes? And how to avoid them?

Why don't programming languages automatically manage the synchronous/asynchronous problem?

How do I transpose the 1st and -1th levels of an arbitrarily nested array?

Why do remote companies require working in the US?

In excess I'm lethal

Why does standard notation not preserve intervals (visually)

Is it ever safe to open a suspicious html file (e.g. email attachment)?

Is there an analogue of projective spaces for proper schemes?

MessageLevel in QGIS3

How do I avoid eval and parse?



MigraDoc and .NET Core 2.0



The Next CEO of Stack OverflowI am using .net core with C# on linux, lib System.Drawing is missingWhat is “.NET Core”?Newtonsoft.JSON v9.01 + FileNotFoundException (.NET Core Class library)Using R.NET.Community in .NET Core 2.0 Preview 1Type 'Object' is defined in an assembly that is not referenced (NET Standard 2.0/.NET Framework 4.6.1)Use .net core with legacy .net framework dllsFileNotFoundException for a .net core class library while referenced in a .net core console appCefSharp offscreen with .net core 2.0 Runtime Error , System.IO.FileNotFoundException: 'Could not load file or assembly 'CefSharp.Core,.NET Standard 2.0 library referenced by .NET 4.6.1 project - Wrong version of Drawing library referenced.NET Core 2.2 Assembly System.Windows.Forms missingHow to determine specific dll for 'using namespace' statement in C# dotnet core










1















I have made a class library for PDF-generation. It is implemented using PDFshart-MigraDoc (the core package*). The class library itself is made with .NET Standard as its target framework.



I can use the class library in classic C# projects (like WinForms), but if I try to use it with .NET Core 2.0, I get the following error:




Could not load file or assembly 'System.Drawing.Common,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=xxxx'. The system
cannot find the file specified.




I guess the reason for this, could be that MigraDoc is using 'System.Drawing' in its implementation, which is (as far as I know) not supported by the .NET Core framework.



However, that doesn't really solve my problem, which is that I need the class library to work for all .NET frameworks. I have tried to include the NuGet package CoreCompat.System.Drawing, based on advise from this post. But this has been without effect, probably because MigraDoc is still trying to use the "original" System.Drawing library.



Is there any way, in which I can get my class library to work for .NET Core? Or am I out of luck...?



Note: The MigraDoc Core Package has nothing to do with the .NET Core Framework. The clash of names is merely a coincidence.










share|improve this question
























  • Do you target Windows only or other platforms also?

    – Vive la déraison
    Jul 4 '18 at 11:50











  • Currently the only target is Windows, yes. It was originally made for a WinForms project, but not a colleague of mine, also wants to use it in a .NET Core 2.0 project.

    – Noceo
    Jul 4 '18 at 12:00















1















I have made a class library for PDF-generation. It is implemented using PDFshart-MigraDoc (the core package*). The class library itself is made with .NET Standard as its target framework.



I can use the class library in classic C# projects (like WinForms), but if I try to use it with .NET Core 2.0, I get the following error:




Could not load file or assembly 'System.Drawing.Common,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=xxxx'. The system
cannot find the file specified.




I guess the reason for this, could be that MigraDoc is using 'System.Drawing' in its implementation, which is (as far as I know) not supported by the .NET Core framework.



However, that doesn't really solve my problem, which is that I need the class library to work for all .NET frameworks. I have tried to include the NuGet package CoreCompat.System.Drawing, based on advise from this post. But this has been without effect, probably because MigraDoc is still trying to use the "original" System.Drawing library.



Is there any way, in which I can get my class library to work for .NET Core? Or am I out of luck...?



Note: The MigraDoc Core Package has nothing to do with the .NET Core Framework. The clash of names is merely a coincidence.










share|improve this question
























  • Do you target Windows only or other platforms also?

    – Vive la déraison
    Jul 4 '18 at 11:50











  • Currently the only target is Windows, yes. It was originally made for a WinForms project, but not a colleague of mine, also wants to use it in a .NET Core 2.0 project.

    – Noceo
    Jul 4 '18 at 12:00













1












1








1








I have made a class library for PDF-generation. It is implemented using PDFshart-MigraDoc (the core package*). The class library itself is made with .NET Standard as its target framework.



I can use the class library in classic C# projects (like WinForms), but if I try to use it with .NET Core 2.0, I get the following error:




Could not load file or assembly 'System.Drawing.Common,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=xxxx'. The system
cannot find the file specified.




I guess the reason for this, could be that MigraDoc is using 'System.Drawing' in its implementation, which is (as far as I know) not supported by the .NET Core framework.



However, that doesn't really solve my problem, which is that I need the class library to work for all .NET frameworks. I have tried to include the NuGet package CoreCompat.System.Drawing, based on advise from this post. But this has been without effect, probably because MigraDoc is still trying to use the "original" System.Drawing library.



Is there any way, in which I can get my class library to work for .NET Core? Or am I out of luck...?



Note: The MigraDoc Core Package has nothing to do with the .NET Core Framework. The clash of names is merely a coincidence.










share|improve this question
















I have made a class library for PDF-generation. It is implemented using PDFshart-MigraDoc (the core package*). The class library itself is made with .NET Standard as its target framework.



I can use the class library in classic C# projects (like WinForms), but if I try to use it with .NET Core 2.0, I get the following error:




Could not load file or assembly 'System.Drawing.Common,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=xxxx'. The system
cannot find the file specified.




I guess the reason for this, could be that MigraDoc is using 'System.Drawing' in its implementation, which is (as far as I know) not supported by the .NET Core framework.



However, that doesn't really solve my problem, which is that I need the class library to work for all .NET frameworks. I have tried to include the NuGet package CoreCompat.System.Drawing, based on advise from this post. But this has been without effect, probably because MigraDoc is still trying to use the "original" System.Drawing library.



Is there any way, in which I can get my class library to work for .NET Core? Or am I out of luck...?



Note: The MigraDoc Core Package has nothing to do with the .NET Core Framework. The clash of names is merely a coincidence.







c# .net-core system.drawing migradoc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 4 '18 at 11:58







Noceo

















asked Jul 4 '18 at 10:15









NoceoNoceo

1,06711638




1,06711638












  • Do you target Windows only or other platforms also?

    – Vive la déraison
    Jul 4 '18 at 11:50











  • Currently the only target is Windows, yes. It was originally made for a WinForms project, but not a colleague of mine, also wants to use it in a .NET Core 2.0 project.

    – Noceo
    Jul 4 '18 at 12:00

















  • Do you target Windows only or other platforms also?

    – Vive la déraison
    Jul 4 '18 at 11:50











  • Currently the only target is Windows, yes. It was originally made for a WinForms project, but not a colleague of mine, also wants to use it in a .NET Core 2.0 project.

    – Noceo
    Jul 4 '18 at 12:00
















Do you target Windows only or other platforms also?

– Vive la déraison
Jul 4 '18 at 11:50





Do you target Windows only or other platforms also?

– Vive la déraison
Jul 4 '18 at 11:50













Currently the only target is Windows, yes. It was originally made for a WinForms project, but not a colleague of mine, also wants to use it in a .NET Core 2.0 project.

– Noceo
Jul 4 '18 at 12:00





Currently the only target is Windows, yes. It was originally made for a WinForms project, but not a colleague of mine, also wants to use it in a .NET Core 2.0 project.

– Noceo
Jul 4 '18 at 12:00












2 Answers
2






active

oldest

votes


















0














The MigraDoc/PDFsharp Core packages were created long before .NET Core was even announced. "Core" has a different meaning for those MigraDoc packages and they do use System.Drawing.



It's not a bug that the Core package uses System.Drawing.



There are third-party ports of PDFsharp for .NET Core like this one:
https://github.com/groege/PdfSharpCore

Maybe one of these ports is an option for you.



Maybe there are portable replacements for System.Drawing.






share|improve this answer























  • Thanks for your answer. I should have noted, that I am aware, that the MigraDoc Core is completely unrelated to .NET Core. I was looking for an alternative, which does not require a complete rewrite of my class library. I will try out some of the MigraDoc ports you mentioned. Replacing System.Drawing doesn't seem like its possible.

    – Noceo
    Jul 4 '18 at 11:56


















0














I found a port for PDFSharp & MigraDoc here on github which usesSystem.Drawing.Common and works with .Net Core.



I had the same and got it fully working.



Note: You may need to add System.Drawing.Common Nuget Package in your .Net Core project.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51171232%2fmigradoc-and-net-core-2-0%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The MigraDoc/PDFsharp Core packages were created long before .NET Core was even announced. "Core" has a different meaning for those MigraDoc packages and they do use System.Drawing.



    It's not a bug that the Core package uses System.Drawing.



    There are third-party ports of PDFsharp for .NET Core like this one:
    https://github.com/groege/PdfSharpCore

    Maybe one of these ports is an option for you.



    Maybe there are portable replacements for System.Drawing.






    share|improve this answer























    • Thanks for your answer. I should have noted, that I am aware, that the MigraDoc Core is completely unrelated to .NET Core. I was looking for an alternative, which does not require a complete rewrite of my class library. I will try out some of the MigraDoc ports you mentioned. Replacing System.Drawing doesn't seem like its possible.

      – Noceo
      Jul 4 '18 at 11:56















    0














    The MigraDoc/PDFsharp Core packages were created long before .NET Core was even announced. "Core" has a different meaning for those MigraDoc packages and they do use System.Drawing.



    It's not a bug that the Core package uses System.Drawing.



    There are third-party ports of PDFsharp for .NET Core like this one:
    https://github.com/groege/PdfSharpCore

    Maybe one of these ports is an option for you.



    Maybe there are portable replacements for System.Drawing.






    share|improve this answer























    • Thanks for your answer. I should have noted, that I am aware, that the MigraDoc Core is completely unrelated to .NET Core. I was looking for an alternative, which does not require a complete rewrite of my class library. I will try out some of the MigraDoc ports you mentioned. Replacing System.Drawing doesn't seem like its possible.

      – Noceo
      Jul 4 '18 at 11:56













    0












    0








    0







    The MigraDoc/PDFsharp Core packages were created long before .NET Core was even announced. "Core" has a different meaning for those MigraDoc packages and they do use System.Drawing.



    It's not a bug that the Core package uses System.Drawing.



    There are third-party ports of PDFsharp for .NET Core like this one:
    https://github.com/groege/PdfSharpCore

    Maybe one of these ports is an option for you.



    Maybe there are portable replacements for System.Drawing.






    share|improve this answer













    The MigraDoc/PDFsharp Core packages were created long before .NET Core was even announced. "Core" has a different meaning for those MigraDoc packages and they do use System.Drawing.



    It's not a bug that the Core package uses System.Drawing.



    There are third-party ports of PDFsharp for .NET Core like this one:
    https://github.com/groege/PdfSharpCore

    Maybe one of these ports is an option for you.



    Maybe there are portable replacements for System.Drawing.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 4 '18 at 11:50









    Vive la déraisonVive la déraison

    15.4k252116




    15.4k252116












    • Thanks for your answer. I should have noted, that I am aware, that the MigraDoc Core is completely unrelated to .NET Core. I was looking for an alternative, which does not require a complete rewrite of my class library. I will try out some of the MigraDoc ports you mentioned. Replacing System.Drawing doesn't seem like its possible.

      – Noceo
      Jul 4 '18 at 11:56

















    • Thanks for your answer. I should have noted, that I am aware, that the MigraDoc Core is completely unrelated to .NET Core. I was looking for an alternative, which does not require a complete rewrite of my class library. I will try out some of the MigraDoc ports you mentioned. Replacing System.Drawing doesn't seem like its possible.

      – Noceo
      Jul 4 '18 at 11:56
















    Thanks for your answer. I should have noted, that I am aware, that the MigraDoc Core is completely unrelated to .NET Core. I was looking for an alternative, which does not require a complete rewrite of my class library. I will try out some of the MigraDoc ports you mentioned. Replacing System.Drawing doesn't seem like its possible.

    – Noceo
    Jul 4 '18 at 11:56





    Thanks for your answer. I should have noted, that I am aware, that the MigraDoc Core is completely unrelated to .NET Core. I was looking for an alternative, which does not require a complete rewrite of my class library. I will try out some of the MigraDoc ports you mentioned. Replacing System.Drawing doesn't seem like its possible.

    – Noceo
    Jul 4 '18 at 11:56













    0














    I found a port for PDFSharp & MigraDoc here on github which usesSystem.Drawing.Common and works with .Net Core.



    I had the same and got it fully working.



    Note: You may need to add System.Drawing.Common Nuget Package in your .Net Core project.






    share|improve this answer





























      0














      I found a port for PDFSharp & MigraDoc here on github which usesSystem.Drawing.Common and works with .Net Core.



      I had the same and got it fully working.



      Note: You may need to add System.Drawing.Common Nuget Package in your .Net Core project.






      share|improve this answer



























        0












        0








        0







        I found a port for PDFSharp & MigraDoc here on github which usesSystem.Drawing.Common and works with .Net Core.



        I had the same and got it fully working.



        Note: You may need to add System.Drawing.Common Nuget Package in your .Net Core project.






        share|improve this answer















        I found a port for PDFSharp & MigraDoc here on github which usesSystem.Drawing.Common and works with .Net Core.



        I had the same and got it fully working.



        Note: You may need to add System.Drawing.Common Nuget Package in your .Net Core project.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 8 at 14:30









        kalehmann

        2,7331023




        2,7331023










        answered Mar 8 at 14:22









        Vikas RanaVikas Rana

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51171232%2fmigradoc-and-net-core-2-0%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

            Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

            How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page