简体   繁体   English

无法将连接的服务添加到面向.Net 4.5.1的MVC项目中

[英]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工具页面的“问答”部分下找到了类似问题的答案,他建议:

  1. Close Visual Studio 2013 关闭Visual Studio 2013

  2. In Windows Explorer, navigate to C:\\Users\\\\AppData\\Local\\Microsoft\\VisualStudio\\12.0\\Extensions\\ 在Windows资源管理器中,导航到C:\\ Users \\\\ AppData \\ Local \\ Microsoft \\ VisualStudio \\ 12.0 \\ Extensions \\

  3. 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”的文件夹。

  4. 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. 外接程序不需要此特定文件即可运行,但是它的存在会在某些计算机配置上引起问题。

  5. 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.

相关问题 将.NET Framework版本4.5.1定位到通用Windows 10的项目 - Project targeting .NET Framework version 4.5.1 to Universal Windows 10 尝试将针对.NET 3.5的项目添加到针对.NET 4.0的现有项目 - Trying to add a project targeting .NET 3.5 to an existing project targeting .NET 4.0 在.netStandard2.0项目中添加“连接服务” - Add “Connected service” in .netStandard2.0 project 您可以将Web服务添加到现有Windows服务项目(.NET)吗? - Can you add a web service to an existing Windows Service project (.NET)? 面向4.5的可移植类库-可从4.5.1开始使用? - Portable Class Library targeting 4.5 - Can be used from 4.5.1? 无法将依赖项添加到.NET核心项目 - Can't add dependencies to a .NET core project 如何将Windows Store应用程序项目从.NET 4.5升级到.NET 4.5.1 - How can I upgrade a Windows Store App-project from .NET 4.5 to .NET 4.5.1 wcf 服务 c# .net 框架 4.5.1 - wcf service c# .net framework 4.5.1 在 4.0 项目中引用 .net framework 4.5.1 程序集 - Reference a .net framework 4.5.1 assembly in a 4.0 project 我的项目可以引用针对较低版本.net框架的程序集吗? - Can my project reference an assembly targeting a lower version of .net framework?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM