unable to find version '3.1.2' of package 'appforsharepointonlinewebtoolkit'

Sep 4, 2015

With office development tools for visual studio 2015 (and probably with august 2015 update for vs 2013 too, but I haven’t tried it), you may run into the following error:

unable to find version ‘3.1.2’ of package ‘appforsharepointonlinewebtoolkit’

And so while doing an “update-package” in nuget console or if you have a restore packages step in your build process. (mandatory if like me you don’t include the packages folder into source control).

This error is caused by the fact that the template for MVC provider-hosted SharePoint apps has a newer version of the nuget than what’s available on nuget.org.

To fix that just uninstall version 3.1.2 and install the current version (install-package appforsharepointonlinewebtoolkit)

There are differences between those two packages in SharePointContext.cs and .vb. You can either choose to ignore it or copy/paste the code of 3.1.2 before uninstalling the package.

Note that if you do so the package will be marked as modified and you won’t be able to do automatic updates anymore. You’ll have to uninstall the package and install it again when next update comes out.

I gave this information to Microsoft teams and I’ll let you know if any update on the subject comes out.

Happy coding!


Last edited Apr 15, 2024 by Vincent Biret


Tags: