none
reference DotNet Core Class Library in .Net Framework RRS feed

Answers

  • I'm sorry

    Seeing I have a WindowsFormProject .netframwork4.6 that i want add to that three referece project from .netcore2.1.1 .

    You can go ahead and set reference to the DLL(s),  do an Add Reference and the refences will be added to the project, but you won't be able to instance an object in the DLL from the Winnows form project that is not a Core solution. because you can't actually see the namespace for the Core DLL in a Non Core solution.

    You want to use a Windows form solution that is using a .NET Core DLL, then the Windows form program and the DLL must be .NET Core 3.0

    • Marked as answer by Ali_Lonbar Sunday, April 28, 2019 12:52 PM
    Sunday, April 28, 2019 11:42 AM

All replies

  • How to reference DotNet Core Class Library in .Net Framework WindowsForm?

    Sunday, April 28, 2019 7:46 AM
  • If you are not using .NET Core 3.0 that allows development of  a Windows Desktop program using Core technology, then I don't think you can use/set reference to the Core DLL in a non Core Desktop program.
    Sunday, April 28, 2019 9:09 AM
  • Maybe that  Add .netcore Refrence to .netframework projct?

    How?

    Where does it say that you can set reference to a .NET Core DLL from a Windows form solution and the Windows form solution is not .NET Core too? 

    Why don't you start by explain just what it is you have going one here. 

    Are you using .NET 3.0 or not?

    https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0

    • Marked as answer by Ali_Lonbar Sunday, April 28, 2019 10:26 AM
    • Unmarked as answer by Ali_Lonbar Sunday, April 28, 2019 10:27 AM
    • Marked as answer by Ali_Lonbar Sunday, April 28, 2019 10:27 AM
    • Unmarked as answer by Ali_Lonbar Sunday, April 28, 2019 10:27 AM
    Sunday, April 28, 2019 10:17 AM
  • I'm sorry

    Seeing I have a WindowsFormProject .netframwork4.6 that i want add to that three referece project from .netcore2.1.1 .

    Sunday, April 28, 2019 10:24 AM
  • I'm sorry

    Seeing I have a WindowsFormProject .netframwork4.6 that i want add to that three referece project from .netcore2.1.1 .

    You can go ahead and set reference to the DLL(s),  do an Add Reference and the refences will be added to the project, but you won't be able to instance an object in the DLL from the Winnows form project that is not a Core solution. because you can't actually see the namespace for the Core DLL in a Non Core solution.

    You want to use a Windows form solution that is using a .NET Core DLL, then the Windows form program and the DLL must be .NET Core 3.0

    • Marked as answer by Ali_Lonbar Sunday, April 28, 2019 12:52 PM
    Sunday, April 28, 2019 11:42 AM
  • tanksfull
    Sunday, April 28, 2019 12:51 PM
  • Hi Ali_Lonbar,

    Thank you for posting here.

    For your question, you could refer to the links below.

    https://www.youtube.com/watch?v=qc2WFaMfdp8

    https://www.hanselman.com/blog/HowToReferenceANETCoreLibraryInWinFormsOrNETStandardExplained.aspx

    Best Regards,

    WendyNote: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. 
    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet. 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 29, 2019 6:29 AM
    Moderator
  • Class libraries are generally not .NET Core, they are .NET Standard. Only apps target .NET Core or .NET Framework explicitly.

    If a class library targets .NET Standard then you can reference it just like you do any other .NET Framework assembly because .NET Framework is .NET Standard compatible. However it is really messed up on the versioning so you need to target the correct version of the framework to ensure compatibility with the version of .NET Standard the library needs. Here's the worksheet for that information.


    Michael Taylor http://www.michaeltaylorp3.net

    Monday, April 29, 2019 1:49 PM
    Moderator