New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for CoreCLR #404
Comments
Not yet, at least. What is DNX? |
Haha.. it's the new cross-platform asp.net framework. https://github.com/aspnet/DNX the runtime is "dnx451" instead of "net451", etc. |
What does "support for" mean in this context? Are you saying that it's impossible to test ASP.NET 5 from a test library with a dependency on a .NET 4 library? |
ASPNET 5 runs on multiple platforms. We're only writing ASPNET 5 on the dnx platform right now, so it is a different set of runtime libraries. Our code currently is not compiled for "net451", so the libraries are effectively targeting incompatible platforms |
My tests run just fine with this project.json: {
} |
interesting. I'll have to bug the guy that's working on this to see what the difference is. |
Not really, no. IIRC Autofixture always worked with aspnet 5 but in the past I had trouble with the xUnit extension. Now that xUnit 2 support for AF is out and DNX & xUnit play together nicely it just works. |
Seems to the the idea here is really "support for CoreCLR", not DNX. Anything that works for the .NET Framework 4.5 will work for 4.5 on DNX. CoreCLR will likely require some effort to support, but I have no idea how much. The best way to find out is to try building it for CoreCLR and see what breaks. |
Yes, I should have been clear. I meant CoreCLR, not just DNX. |
From just looking in the coreclr repo, it's difficult for me to glean the status of the project. Is it in preview? Beta? Released? Without having tried it at all, if CoreCLR is anything like Portable Class Libraries in that the supported features is an intersection of available features on various platforms, it's quite unlikely that it would be possible to retrofit AutoFixture to run on CoreCLR without breaking changes. Recently, @moodmosaic was so kind to make the analysis for AtomEventStore (a much smaller project than AutoFixture), and here the outcome was that a PCL version was infeasible. |
Without having looked at AutoFixture sources at all, I agree with your assessment: breaking changes are likely. |
CoreCLR is, more or less, up an Running since Windows Phone 8. ASP.NET 5 will be RC in November, CoreCLR for Linux and Mac will also be RC in November 2015. Alongside with CoreFX. Release 1.0 for everything planned for 1Q2016. |
It would surprise me tremendously if it was possible to add support for CoreCLR without introducing breaking changes, so I've added the 4.0 milestone to this issue. |
Out of curiosity, I run the API Portability Analyzer on the Wait before you open the Champagne. That rough 3% of unsupported symbols, unfortunately, accounts for some rather fundamental ones:
However, there are a few solutions:
This is only a first pass and things might change as CoreCLR is still being developed. At least we got a general idea of what it would take to make AutoFixture compatible with it. |
Wow, thank you, @ecampidoglio, for performing this analysis 👍 Some of the incompatible types (e.g. The idea of replacing |
Not sure if the "Jump In" label is appropriate for this issue. Usually it is used to indicate small, isolated, bite sized issues that are fairly easy and new contributer friendly. It seems this issue would require a fairly good understanding of a large part of the code base and it's history. |
@chaitanyagurrapu, perhaps you're right. The reason I added the jump in label was that I consider this work somewhat unrelated to AutoFixture details. Yes: decisions will have to be made on how to address various incompatibilities, but there's also a great deal of work simply figuring out how the entire code/build infrastructure works related to CorCLR, and that part is completely unrelated to AutoFixture. At the moment, I don't have these skills, so I would love getting help with this. The decisions that need to be made regarding compatibility issues we can discuss here, or in dedicated Github issues. |
I've started working on this. Questions to come :) |
Sounds good to me 👍 |
@lbargaoanu Sounds good 👍 Remember, if at all possible, keep it small. |
I would like to move MailAddressGenerator to a different project that targets the full framework in the v4 branch, so I can build AutoFixture for .NET Core. I could also declare a placeholder type for .NET Core, but I've avoided conditional compilation until now. And there will always be things supported only in the full framework. |
It's in the works. But meanwhile... |
Work is afoot to support .NET core, but since it's not heavily used in this project it's easier to remove it. See AutoFixture/AutoFixture#404
Was bitten by the error "Package AutoFixture 3.50.5 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1)" today when starting to add tests to a number of .NET Core projects. I'm asking for a "state of autofixture for .net core" kind of reply that gives a direction for when this extremely useful nuget package will be available for this platform (and .net core 2.0 is already rtm and pending release ..). What's holding it back? (thanks in advance) |
We are currently working on that and you can track the progress in #773. Notice, this PR is about the .NET Core support will be released as v4, you can find the whole scope here. I'd expect a couple of months before everything is ready. In the meanwhile, we are also working on the Dev NuGet feed (#762), so you will be able to participate in early product testing 😉 |
@zvirja thanks for the detailed update. I'm sure it'll come in handy for other developers as well. I'd be happy to participate in early product testing. |
@zvirja so just to clarify - the current (temporary) approach to writing unit tests against .NET Core applications/libraries is using Is this the suggested workaround for the time being? (as long as the app I'm writing is allowed to be fully .NET Core, it's actually not a big issue to write the tests in a regular |
@andersborum I never thought about the temporary workaround. I'm not sure that all the API we use in v3 (packages, published to NuGet) are .Net Standard 2.0 compliant (to use a new feature of .NET Standard). Let us know if you found a way to combine both v3 and .Net Core, so we could advice that to other people 😉 |
Just to notify everybody - .Net Standard support for AutoFixture PR (#773) has been merged to the Notice, only AutoFixture library has been migrated. Other glue libraries will follow up later. |
It is possible to move the v4 to the nuget.org, even the alpha version? Couldn't find anything comparable to autofixture until now that support .netstandard. |
@RomanKernSW Not at this moment - we haven't migrated even a half of the projects yet (like xUnit, NUnit, NSubstitute support), so it's too early. Also we have a plan to change the namespace, so I'd prefer to do that before we release something publicly as that would be a major break between releases. On other hand, I want to change namespace as later as possible, as we constantly merge Do you have any issues with the private feed? You can add the feed via |
hm I have to check if it possible to use nuget.config for nuget restore (.Net Core 2 - preview Task in VSO). Right now, we have one private Feed (VSO) with nuget.org without any nuget.config files. Need time to test this... |
.Net Standard 2.0 has a compatibility mode for .Net Framework NuGets.
I have written .Net Core tests with AutoFixture 3.50.x and no problems so
far.
|
@roarwrecker Awesome, thanks for sharing! Meaning we have larger time buffer till we roll out the official support to NuGet 😉 |
@roarwrecker thanks... this was not the issue on .netstandard 1.6. I could install the nuget, but it never compile without error |
Hey Guys, not sure how far along the .NetCore work is, but is it possible to get an alpha version on NuGet? |
@selmendorfFrontline Copying the reply from here:
Please use the package from the preview feed in the meanwhile. You can tune your |
I'm going to close this issue after the #857 is finally merged. Our final .NET Compatibility table would be following:
All the unsupported libraries except Unless anybody have other vision, I'm going follow this plan 😃I also feel how close we are to the release and how much is behind 😊 |
Go go go! |
Have you tried switching to a newer F# version on that one? IIRC, it's on F# 3.1 and this might be the case. |
Great work @zvirja. Do you think we can get v4 out? The closer we get, the more excited i feel :) I wish i could offer you a beer :) |
@moodmosaic Yep. If you check FsCheck 2.9.0 you will find that it depends on <PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
.....
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FsCheck" Version="[0.9.2,3.0.0)" Condition=" '$(TargetFramework)'=='net452' " />
<PackageReference Include="FSharp.Core" Version="3.1.2" Condition=" '$(TargetFramework)'=='net452' " />
<PackageReference Include="FsCheck" Version="[2.9.0,3.0.0)" Condition=" '$(TargetFramework)'=='netstandard2.0' " />
<PackageReference Include="FSharp.Core" Version="4.1.17" Condition=" '$(TargetFramework)'=='netstandard2.0' " />
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
</ItemGroup> Everything is fine with the project - the issue is somewhere in F# SDK. That's why I'd like to postpone .NET Core support by FsCheck till the better times. @Kralizek Please see the reply a few answers above. |
Just checked in VS 2017.4 and still cannot target multiple frameworks for F# project. Therefore, I'm closing this issue for now as we support .NET Core for all other projects. |
JFYI: I released v4 rc1 to the NuGet, so you can consume and test without need to play with a custom feed. |
It seems that AutoFixture currently doesn't support the new DNX platform.
Are there plans to add support this?
The text was updated successfully, but these errors were encountered: