AutoMoq icon indicating copy to clipboard operation
AutoMoq copied to clipboard

Is AutoMoq should work with asp.net core?

Open arielcloud opened this issue 9 years ago • 25 comments

when trying install it i got: "Package AutoMoq 2.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package AutoMoq 2.0.0 supports: net45 (.NETFramework,Version=v4.5)"

arielcloud avatar Jun 30 '16 18:06 arielcloud

Hmm... I think.

Guess it's time I learn how to port these libraries over. :smile:

darrencauthon avatar Jun 30 '16 20:06 darrencauthon

Installed dot net core. So long as I can map unity and Moq to this library, this is gonna work.

darrencauthon avatar Jul 01 '16 12:07 darrencauthon

@arielcloud I started the work to port to core, and it seems that it won't be too difficult.

However, AutoMoq is very dependent on Moq, which doesn't seem to have a working version in core yet. The copy of core-supporting Moq that I'm using comes from https://www.myget.org/F/aspnetcidev/api/v3/index.json, which is fine for development but can't be released.

I'll get this core version ready to go, but until moq is updated I won't release.

darrencauthon avatar Jul 01 '16 13:07 darrencauthon

Thanks a lot! please update here or at #36 once i can use it on core. (also before release). 10x!

arielcloud avatar Jul 02 '16 20:07 arielcloud

@darrencauthon moq is updated :) can u release?

arielcloud avatar Sep 20 '16 06:09 arielcloud

I'll take a look soon, thanks!

darrencauthon avatar Sep 20 '16 10:09 darrencauthon

You can use Moq with net core, you need in your project.json:

 "dependencies": { 
        "NUnit": "3.5.0",
        "dotnet-test-nunit": "3.4.0-beta-3",
        "Moq": "4.6.25-alpha"
    },
    "frameworks": {
        "netcoreapp1.0": {
            "imports": [ 
                "dotnet54",
                "portable-net45+win8" ,
                "dnxcore50",
                "netcoreapp1.0"        
            ],
            "dependencies": {
                "Microsoft.NETCore.App": {
                    "type": "platform",
                    "version": "1.0.1"
                }
            }
        }
    },

JPBlancoDB avatar Nov 15 '16 01:11 JPBlancoDB

Thank you @JPBlancoDB ! :smile:

darrencauthon avatar Nov 17 '16 16:11 darrencauthon

They are already at 4.6.38-alpha :)

MihaMarkic avatar Dec 02 '16 15:12 MihaMarkic

I did see a video on Dot Net Core on Youtube... I think this is going to be easy to do this weekend.

Or did I just doom myself?

darrencauthon avatar Dec 02 '16 16:12 darrencauthon

@darrencauthon That's it. You promised it over the weekend. Now you just have to! :)

MihaMarkic avatar Dec 02 '16 16:12 MihaMarkic

I will give it an honest try! :smile:

darrencauthon avatar Dec 02 '16 16:12 darrencauthon

I had a wonderful weekend with the kids... I barely touched a computer.

I'm going to do the 24 pull request challenge this December, and this is going to be a big piece of it. So I will get to this ASAP. :smile:

darrencauthon avatar Dec 05 '16 15:12 darrencauthon

Any news on this?

Thanks

NicolaasVB avatar Jan 05 '17 08:01 NicolaasVB

@darrencauthon Have you progressed on .NET Core port ? It really interest us

cdie avatar Feb 03 '17 12:02 cdie

I have, in a way. I've gotten tons of help with porting another one of my libraries to Core, and it's shown me another strategy.  It's just a matter of time. The last few months have been pretty hectic for me, as can be noted by my github stats. As soon as I can sit in front of a computer for 2-3 hours, I think I can knock it out. 

On Fri, Feb 3, 2017 at 6:53 AM -0600, "Christophe" [email protected] wrote:

@darrencauthon Have you progressed on .NET Core port ? It really interest us

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

darrencauthon avatar Feb 03 '17 12:02 darrencauthon

Could you catch up some time to spend on porting the libraries to .Net Core?

onlyforkbj avatar Mar 16 '17 08:03 onlyforkbj

Eventually, I'm really sorry... juggling a lot of stuff these days. 🤹‍♂️

darrencauthon avatar Mar 17 '17 14:03 darrencauthon

+1 for having support for .NET Core

farzadmf avatar May 20 '17 16:05 farzadmf

+1 for .Net Core support. I discovered this package from Mathew Renze's Writing Testable Code course on PluralSight. Now it is less fun to develop without.

careLearning avatar Jun 24 '17 04:06 careLearning

meanwhile u can try autoFixture

arielcloud avatar Jun 25 '17 15:06 arielcloud

I was just checking up on the status of the .NET Core port and saw that @careLearning mentioned my Clean Architecture course. Good to see that it's generating interest in AutoMoq! : )

matthewrenze avatar Sep 22 '17 22:09 matthewrenze

Not my repo, but I found a "fork" that supports .net standard 2.0: https://github.com/ThomasHenrique2/AutoMoqCore

celluj34 avatar Feb 07 '18 20:02 celluj34

Thanks, @celluj34. I migrated to AutoMoqCore.

giggio avatar Aug 08 '18 17:08 giggio

Moq has added Moq.AutoMocker. The method names are different but its basically a drop in replacement and appears to be active.

collinprice avatar Sep 25 '19 13:09 collinprice