这是一个提供者托管的项目。它曾经工作到最近。
如果我创建一个全新的项目/解决方案,那么它就可以工作。
如果我启动旧的,或者从源代码管理重新下载它,我会收到以下错误:
NuGet Package restore failed for project LocalTheaterWeb: Unable to find version '3.0.1' of package 'AppForSharePoint16WebToolkit'
我试过
Update-Package -Reinstall
但问题仍然存在。有任何想法吗?
最佳答案
Scott Hillier 的解决方案为我做到了:
http://www.shillier.com/archive/2014/08/05/nuget-package-restore-fails-for-sharepoint-2013-provider-hosted-apps.aspx
I often take advantage of the NuGet Package Restore capability to reduce the size of my projects when saving or sharing them. Today, I discovered an issue with this process when building SharePoint 2013 Provider-Hosted Apps against SharePoint Online. Here are the steps to reproduce and the fix:
- Create a Provider-Hosted App in Visual Studio 2013 using a SharePoint Online site for debugging.
- Right click solution and "Enable NuGet Package Restore"
- Save and Close Project
- Delete the “packages” folder from project directory
- Open Project in Visual Studio 2013
- Rebuild, receive error “Unable to find AppForSharePoint16WebToolkit”
- Open Packages.config file
- Change “AppForSharePoint16WebToolkit” to “AppForSharePointWebToolkit”
- Rebuild – successfully this time. Apparently, the "AppForSharePoint16WebToolkit" package is not available through the NuGet Package Manager, but the older "AppForSharePointWebToolkit" package is available.
关于sharepoint - 项目 myProjectWeb : Unable to find version '3.0.1' of package 'AppForSharePoint16WebToolkit' 的 NuGet 包还原失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24303669/