Thursday, September 15, 2016

For the love of Jiggling Visual Studio 2015 Update 3 .NetCore Solutions

I've had an opportunity to work with VS.Net 2015 Update 3 for a while now using .Net Core. There are two different flavors of .Net Core projects. I call them:
  1. Core Core: Which is all Core
  2. Core Framework: Which uses .Net Framework 4.61

We've been using Core Framework and it occasionally needs to be (affectionately named) 'jiggled'. Our solutions have more than one project in them and they occasionally barf when trying to communicate to other projects in the solution. These projects may also lose their ability to use dependencies defined in the project.json.

Here are the jiggling tricks that work for our group:
  1. Identify the project or projects that are having issues with their dependencies.
  2. On that project determine if it is trying to reference another project in your solution that is having issues. If so go to that project see if that is having issues. Lather, rinse, repeat.
  3. Now you are in a project with no dependencies on other projects in your solution and it has an issue with it's references.
  4. Jiggle 1: Right-click on references and choose "Restore Package...". If it is fixed, great, if not goto Jiggle 2.
  5. Jiggle 2: Right-click on your project and choose "Unload Project". Then right-click again and choose "Load Project". Repeat Jiggle 1.
  6. Jiggle 3: Right-click on your project and choose "Unload Project". Then from Windows Explorer, not IE, go to your project folder and delete "project.json.lock". Right-click on your project and choose "Load Project" which will rebuild your "project.json.lock". Repeat Jiggle 1.
  7. Jiggle of last Resort: If Jiggle 1 thru 3 don't work and you can't expand your reference tree, then reinstall your Update 3 and the .Net Core SDK then reboot and follow Jiggle 1 thru 3 again. If these don't work then reboot your machine three times and stand on your left foot then commence crying as that is beyond the scope of this little ditty.
Repeat the Jiggle steps for each project in your solution.

Enjoy!

No comments:

Post a Comment