0

so i started trying out the new ASP.NET 5 Platform and have the following dependencies in my Project.json

"dependencies": {
    "System.Collections": "4.0.10-beta-23019",
    "System.Linq": "4.0.0-beta-23019",
    "System.Threading": "4.0.10-beta-23019",
    "System.Runtime": "4.0.10-beta-23019",
    "Microsoft.CSharp": "4.0.0-beta-23019",
    "PetaPoco.Core": "5.1.141-beta"
},

"frameworks": {
    "dnx451": { "dependencies": { "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta5" } },
    "dnxcore50": { "dependencies": { "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta5" } }
}

Everything builds fine but when i try to access anything from the PetaPoco namespace. Everything fails with the message.

The type or namespace PetaPoco could not be found, are you missing a using directive or an assembly reference.

I know what this means but even trying to import the namespace causes the same issue and I can see the library right there in the DNX4.5.1 AND DNX5.0 References

Please what Am i missing here

Thanks in advance

Magnus Karlsson
  • 3,549
  • 3
  • 31
  • 57
Paul Plato
  • 1,471
  • 6
  • 28
  • 36
  • Did you make sure that all packages are restored (i.e. no yellow icon on References)? – DPac Feb 11 '16 at 15:39
  • Yep, There are no yellow icons whatsoever on either of references – Paul Plato Feb 11 '16 at 15:48
  • A PetaPoco maintainer here. I'm waiting for RC2 before adding support. asp5/dnxcore50 (now ASP.NET CORE 1.0 and.NET CORE 1.0) is missing parts from the ado stack. Plus with all the renaming that going to happening between RC1 and RC2, I feel it'll be better for PP if we wait. That said, I don't see why you can't use it with dnx451 ;) – Plebsori Feb 11 '16 at 21:31

3 Answers3

2

You should be able to use PetaPoco with dnx451. However, you'll need to use the compiled nuget package, as the project structure has changed and the single file deploy won't be copying the source file to a valid location (My guess).

In addition and as per my comment, dnxcore50 (now .Net Core 1.0) is missing a component or two from the ado stack, which means PetaPoco won't work. However, targeting dnx451 should work.

Lastly, we'll mostly likely see PetaPoco builds for .NET/Asp.Net Core 1.0 after they release the RC2.

Plebsori
  • 1,075
  • 9
  • 23
0

You are missing that PetaPoco won't work with dnxcore50. Remove the following line to try out ASP.NET5 (or asp.net core as the new name is):

  "dnxcore50": { "dependencies": { "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta5
Magnus Karlsson
  • 3,549
  • 3
  • 31
  • 57
  • Tried that, it still did not work even with the absence of the yellow warning icons – Paul Plato Feb 11 '16 at 18:18
  • It appears the latest stable build for PetaPoco is not even supported in DNX4.5.1. Looking for some other ORM – Paul Plato Feb 11 '16 at 18:27
  • Well, I think it should work, and if you want to try it out you could test "restore packages" when right clicking the references in your solution. A bigger problem is probably that you are using an 8 month old beta. Why not try out the latest Asp net 5/core? Its in RC1 now and supported for production environments. You could use Entity framework with it as well. If you go for RC2 nightly builds I think you can use EF7 which might work with .net core as well. – Magnus Karlsson Feb 11 '16 at 19:02
0

https://github.com/JCKodel/Core.ORM

In the folder __PETAPOCO/XCore there is a functional PetaPoco version that runs on dnxCore. All tests pass.

JCKödel
  • 723
  • 9
  • 19