Search code examples
c#asp.net-mvcms-officepreviewoffice365

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. I have a MVC project targeting .Net 4.5.1 ready. When I try to add a Connected Service, I can't seem to find that option in Visual Studio.

enter image description here

The extension is installed and I've restarted VS, as mentioned.

enter image description here

I've tried the same with a Windows Store App for Windows 8.1 and got the same result.


Solution

  • 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:

    1. Close Visual Studio 2013

    2. In Windows Explorer, navigate to 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). Find the folder that has "Microsoft.Office365ApiTools.dll" within it.

    4. Once you've identified the correct folder, find the file "Microsoft.VisualStudio.ConnectedServices.Contracts.dll", and either delete, move, or rename it. 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.

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