Reputation: 1329
I cannot get packages to be recognized in source files of ASP.NET application.
It doesn't matter if it is something generated using ASP.NET5 web starter, .NET team music store app, or my own from scratch.
What is wrong? See step 2 for screen shot of the problem.
How I feel someone can reproduce my problem.
Step 0: Clone a ASP.NET 5 application, in my case the mvcmusicstore
Step 1: Observe errors in my solution out of the box. I cannot build the project I just updated and cloned
Step 2: Check out a class to see what is going on. This is the problem right here. Oh, okay, so maybe I'm missing dependencies still...
Step 3: Wut. The packages have been brought in by project.json!?! The image below is cropped, but the packages are there. See
Step 4: Existential crisis. Does someone have a tool or version I don't?
Step 5: My project.json packages all have * to get the latest nightly builds. It looks like this. Could it be that my KRE is out of date? Well, I am using beta2. That's what kvm upgrade
does.
Step 6: Check nugget
Step 7: Try a kpm restore. Notice xunit.runner didn't get restored and my issue still remains.
Step 8: Success (it works when you do this) Change all the dependencies to beta2 like he states and use nugget.org
I have worked on this for days and I feel I am missing something obvious. If someone else has run into this problem, were you able to fix it? There are two possibilities:
Upvotes: 1
Views: 1958
Reputation: 25704
Putting my comments as an answer:
This is caused by a mismatch between the absolute newest packages versus the specific packages used by the copy of the MusicStore sample app that you have.
If you use the master
branch of MusicStore right now you need to use nuget.org as your feed. If you use the dev
branch you need to use MyGet.org / aspnetvnext as your feed. The problem is that you can't mix and match branches and feeds.
The ASP.NET team (my team) is working on fixing the dependencies to not use the format 1.0.0-*
because the *
means "latest". We're instead going to lock the build versions, but that isn't done yet. For reference, here's an example of a PR where the EntityFramework master
branch is being fixed to hard-code beta2
as the version.
Upvotes: 1