Fake dll in .net core RRS feed

  • Question

  • Hi Team,

    I am doing a migration asp.net project 4.5 frameworks to asp.net core 3.1.

    I can see fake dll is used in 4.5 framework so this is feature of Visual studio enterprise edition in asp.net core also we can generate fake dll

    so want to know is fake dll is supported in .net core?

    any suggestion and help will be highly appreciated on how to proceed further on this.

    Wednesday, June 3, 2020 12:26 PM

All replies

  • using Pose;

    Shim dateTimeShim = Shim.Replace(() => DateTime.Now).With(() => new DateTime(2004, 4, 4));

    // This block executes immediately
    PoseContext.Isolate(() =>
        // All code that executes within this block
        // is isolated and shimmed methods are replaced

        // Outputs "4/4/04 12:00:00 AM"

    }, dateTimeShim);
    Wednesday, June 3, 2020 2:43 PM
  • Hi sam000123,

    Thank you for posting here.

    As the following document shows, Microsoft Fakes now supports .NET Core in Visual Studio 2019 version 16.6.0.

    Microsoft Fakes for .NET Core and SDK-style projects

    Hope it could be helpful.

    Best Regards,

    Xingyu Zhao

    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.

    Tuesday, June 9, 2020 1:36 AM