[英]Can't add Connected Service to a MVC Project targeting .Net 4.5.1
I'm trying to get started with a MVC project that consumes the Office 365 API. 我正在尝试使用消耗Office 365 API的MVC项目。 I have a MVC project targeting .Net 4.5.1 ready. 我有一个针对.Net 4.5.1的MVC项目。 When I try to add a Connected Service, I can't seem to find that option in Visual Studio. 当我尝试添加连接服务时,似乎在Visual Studio中找不到该选项。
The extension is installed and I've restarted VS, as mentioned. 如前所述,该扩展程序已安装,并且我已重新启动VS。
I've tried the same with a Windows Store App for Windows 8.1 and got the same result. 我已经尝试过使用Windows 8.1的Windows应用商店进行相同的操作,并且得到相同的结果。
I found an answer to a similar question under the Office 365 API Tools page's "Q and A" section provide by Michael Zlatkovsky (MSFT) , he suggests: 我在Michael Zlatkovsky(MSFT)提供的Office 365 API工具页面的“问答”部分下找到了类似问题的答案,他建议:
Close Visual Studio 2013 关闭Visual Studio 2013
In Windows Explorer, navigate to C:\\Users\\\\AppData\\Local\\Microsoft\\VisualStudio\\12.0\\Extensions\\ 在Windows资源管理器中,导航到C:\\ Users \\\\ AppData \\ Local \\ Microsoft \\ VisualStudio \\ 12.0 \\ Extensions \\
There should be a list of folders there, with names like "qsn5xrd4.5al" (each installation will have different names). 那里应该有一个文件夹列表,其名称类似于“ qsn5xrd4.5al”(每个安装将具有不同的名称)。 Find the folder that has "Microsoft.Office365ApiTools.dll" within it. 查找其中包含“ Microsoft.Office365ApiTools.dll”的文件夹。
Once you've identified the correct folder, find the file "Microsoft.VisualStudio.ConnectedServices.Contracts.dll", and either delete, move, or rename it. 确定正确的文件夹后,找到文件“ Microsoft.VisualStudio.ConnectedServices.Contracts.dll”,然后删除,移动或重命名。 This particular file is not needed for the add-in to run, but its presence can cause the issue on certain machine configurations. 外接程序不需要此特定文件即可运行,但是它的存在会在某些计算机配置上引起问题。
Re-open Visual Studio and try again. 重新打开Visual Studio,然后重试。
and in case it didn't solved the problem: 万一它没有解决问题:
try deleting "C:\\Users\\\\AppData\\Local\\Microsoft\\VisualStudio\\12.0\\ComponentModelCache" (I would recommend moving it to the desktop or otherwise making a backup, just in case). 请尝试删除“ C:\\ Users \\\\ AppData \\ Local \\ Microsoft \\ VisualStudio \\ 12.0 \\ ComponentModelCache”(我建议将其移至桌面或进行备份,以防万一)。 This should flush the cache, and force VS to re-load the add-in -- now with loading "Microsoft.VisualStudio.ConnectedServices.Contracts.dll" from its central location. 这应该刷新缓存,并强制VS重新加载该加载项-现在从其中央位置加载“ Microsoft.VisualStudio.ConnectedServices.Contracts.dll”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.