none
What is .Net standard RRS feed

  • Question

  • i heard this term but do not have idea what is .Net standard or .Net standard 2.0

    so it will be helpful if some one briefly discuss what is .Net standard and what is its usage ? i work with .net v4.5. so how can i use it ?

    give me a example or scenario where one need to use .Net standard. thanks

    Saturday, February 22, 2020 6:43 PM

Answers

  • What is .NET Standard? To me,  it's a .NET Framework that is a bridge framework that allows a project that was developed using .NET Framework 4.0 as an example to communicate with/consume  a project that was developed with .NET Core Framework.

    As an example,  lets say you have a Data Access Layer that was developed using .NET Core and you didn't want to rewrite the code for a .NET 4.0 project to use. You can use .NET Standard that allows the .NET 4.0 and the .NET Core projects to reference it. That's allows the communications between the two project one using non Core and the other one using Core.

     
    • Marked as answer by Sudip_inn Monday, February 24, 2020 3:09 PM
    Saturday, February 22, 2020 10:37 PM
    • Proposed as answer by cheong00Editor Monday, February 24, 2020 6:57 AM
    • Marked as answer by Sudip_inn Monday, February 24, 2020 3:09 PM
    Saturday, February 22, 2020 6:51 PM
  • Hi Sudip_inn,

    .Net Standard is a specification which dictates what the Base Class Libraries of different .  Regarding the .NET Framework,.NET Core,.NET Standard and their relationship and differences, you can refer to the following links.
    [Demystifying .NET Core and .NET Standard]
    [Differences Between .NET Framework, .NET Core, and .NET Standard]
    Note: 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.
    Hope these are helpful for you.
    Best Regards,
    Daniel Zhang


    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, February 24, 2020 6:43 AM
  • Or I would say, by declaring your code targeting .NET Standard, you're declaring your code would support corresponding versions of both ".NET Core" and "Full .NET Framework" runtime.

    Generally if you're writing libraries that are not hardware dependent, nor would need function calls from specific type (Full/Core) of .NET Framework (this is particularly common in cryptographic routines), you'll want to declare your target as .NET Standard versions.

    If you're creating libraries that is hardware dependent or need functions in specific .NET Framework type, or you're writing WinForm applications (.NET Core WinForm is still not completed, if you write for WinForm, you'll want to declare it as targeting Full Framework at least for now), you'll want to declare targeting ".NET Core" and "Full .NET Framework" in order to gain access to those specific things.

    • Marked as answer by Sudip_inn Monday, February 24, 2020 3:09 PM
    Monday, February 24, 2020 7:08 AM
    Answerer

All replies

    • Proposed as answer by cheong00Editor Monday, February 24, 2020 6:57 AM
    • Marked as answer by Sudip_inn Monday, February 24, 2020 3:09 PM
    Saturday, February 22, 2020 6:51 PM
  • What is .NET Standard? To me,  it's a .NET Framework that is a bridge framework that allows a project that was developed using .NET Framework 4.0 as an example to communicate with/consume  a project that was developed with .NET Core Framework.

    As an example,  lets say you have a Data Access Layer that was developed using .NET Core and you didn't want to rewrite the code for a .NET 4.0 project to use. You can use .NET Standard that allows the .NET 4.0 and the .NET Core projects to reference it. That's allows the communications between the two project one using non Core and the other one using Core.

     
    • Marked as answer by Sudip_inn Monday, February 24, 2020 3:09 PM
    Saturday, February 22, 2020 10:37 PM
  • are u trying to say if i developed any class library by .net 4.5 and if i need to reference that in .net core project then .net standard comes into scene ?

    can't we refer .net 4.5 library in .net core winform project ?

    Sunday, February 23, 2020 7:48 AM
  • are u trying to say if i developed any class library by .net 4.5 and if i need to reference that in .net core project then .net standard comes into scene ?

    can't we refer .net 4.5 library in .net core winform project ?

    No .NET Framework other than the .NET Standard Framework can reference a .NET Core Framework directly and expect that Core is going to work.
    Sunday, February 23, 2020 10:19 AM
  • Hi Sudip_inn,

    .Net Standard is a specification which dictates what the Base Class Libraries of different .  Regarding the .NET Framework,.NET Core,.NET Standard and their relationship and differences, you can refer to the following links.
    [Demystifying .NET Core and .NET Standard]
    [Differences Between .NET Framework, .NET Core, and .NET Standard]
    Note: 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.
    Hope these are helpful for you.
    Best Regards,
    Daniel Zhang


    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, February 24, 2020 6:43 AM
  • Or I would say, by declaring your code targeting .NET Standard, you're declaring your code would support corresponding versions of both ".NET Core" and "Full .NET Framework" runtime.

    Generally if you're writing libraries that are not hardware dependent, nor would need function calls from specific type (Full/Core) of .NET Framework (this is particularly common in cryptographic routines), you'll want to declare your target as .NET Standard versions.

    If you're creating libraries that is hardware dependent or need functions in specific .NET Framework type, or you're writing WinForm applications (.NET Core WinForm is still not completed, if you write for WinForm, you'll want to declare it as targeting Full Framework at least for now), you'll want to declare targeting ".NET Core" and "Full .NET Framework" in order to gain access to those specific things.

    • Marked as answer by Sudip_inn Monday, February 24, 2020 3:09 PM
    Monday, February 24, 2020 7:08 AM
    Answerer