Using Exchange EWS... Can't figure out how to access the dll? - c#

I've downloaded and installed from here...
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13480
As suggested here..
Getting started with Exchange Web Services 2010
I try to create a new project in Visual Studio and do this...
using Microsoft.Exchange.Webservices but Exchange is not defined.
I've tried finding it in the Add Reference... dialog with no luck...

You can find Microsoft.Exchange.Webservices.dll (Version 1.2) in the program files path.
%ProgramFiles%\Microsoft\Exchange\Web Services\1.2\

It is a NuGet package now. I had the NuGet package as a reference, but I was still getting the yellow warning symbol on the reference.
I just had to right click my project, select Manage NuGet Packages...
Then I uninstalled and reinstalled the same version. Shrug.
If you don't have the NuGet package, search for Microsoft.Exchange in the manager.

Related

Azure Media Service | Azure Storage Versioning in Project

I have done Azure Media Services (AMS) POC.
but I am facing problem in integration of AMS into main project. Steps are below:
I am installing windowsazure.mediaservices.extensions package from NuGet but in this case
it gives a error, WindowsAzure.Storage already has a dependency defined for 'NETStandard.Library`, because I have already installed WindowsAzure.Storage.8.1.0 package in project solution.
If I removed this WindowsAzure.Storage.8.0.0 then tried to install windowsazure.mediaservices.extensions package. it shows installation successful but version of WindowsAzure.Storage is 4.3.0 instead latest (8.1.0).
If removing WindowsAzure.Storage.4.3.0 forcefully and adding external reference of WindowsAzure.Storage.8.1.0 (Microsoft.WindowsAzure.Storage.dll) then giving runtime error at the time of Creation of Asset on AMS.
Please suggest any solution.
Thanks in advance
I tried the same thing on one of the projects. It seems this is more of a Visual Studio or Nuget package manager update issue. I tried reproducing the same on a Visual Studio 2015 Community Edition and it worked. Check out the image below:

'Newtonsoft' could not be found

I pasted the code from http://www.codeproject.com/Tips/789481/Bridging-the-Gap-between-Linqpad-and-Visual-Studio into Visual Studio 15. It tells me that 'Newtonsoft' could not be found. I open the folder "\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" and found that the file Newtonsolft.Json.dll is already there. Could anyone tell me how to fixed problem?
Solution Explorer->Right Click on Project Name -> Click on Manage Nuget Packages -> Search for newtonsoft -> Click on install button
Go to Tools -> Library Package Manager -> Package Manager Console
and in the console just write Install-Package Newtonsoft.Json -Version 9.0.1
For me I had the package already installed but it was missing the references and it could not be added.
Helped me: in NuGet Package Manager to downgrade and upgrade Newtonsoft.Json
You have to get the correct NuGet package. From your link:
You can open the NuGet package manager in: Tools -> Nuget Packet Manager -> Manage Nuget Packages for Solution..
I had a similar problem and Google API's had a dependency on Newtonsoft.Json, not allowing me to uninstall Newtonsoft.Json and trying to reinstall.
Removing and and reinstalling Newtonsoft.Json will likely solve the problem, but in my situation, I had to go into Nuget Package Manager -> find Newtonsoft.Json -> select Options dropdown -> check "Force uninstall even if there are dependencies on it".
Checking that box allowed me to remove and subsequently reinstall Newtonsoft and the solution properly referenced it after.
I had the same problem with visual studio 2019. Simply restarting visual studio fixed the issue.
After restarting, the References list in Solution Explorer did show the "Newtonsoft.json".
Right click on the client project side and select Manage NuGet packages.
Then search for Newtonsoft.Json on browse and install.
If the class you are trying to use Newtonsoft is in client you must install the package for the client.

NuGet fails to find existing package

How it's possible that NuGet's Install-Package fails with Unable to find version 'x' of package 'y' when that exact version is released as NuGet to the official repository and it shown on the https://www.nuget.org/packages/y page.
Here is specific sample with nuget.org content and NuGet Install-Package command output.
UPDATE. Package sources are set to defaults (from nuget.org). Actually, you can see the issue just by running Install-Package Log4Net.Async -Version 1.3.0.
UPDATE 2. I want to highlight that it's not about some developer's machine - the same things happen on Visual Studio Online Hosted Build Controller.
UPDATE 3. Here is how NuGet tries to load package and it looks like NuGet API just broken, because all these requests fail with the error below.
Resource not found for the segment 'Packages'
Also NuGet produces a strange output on NuGet API calls that issued at VS search packages stage, please see here: http://pastebin.com/qveadrZB.
NuGet currently has some service issues related to search and package restore functionality. It is possible this is the cause of your package restore failure.
If other dev machines are working OK, it's likely they have access to a cached version of this package.
Clear your NuGet cache under options -> NuGet Package Manager
I know this thread is very old, but someone who has this problem like me in these days, find my solution for solving such problem here.
I've installed Visual Studio 2012/2015/2017 parallel, and 2012 failed with "package not found error".
So I take a look in the NuGet-settings in VS2017 and found the following package resource:
https://api.nuget.org/v3/index.json
I just added this location to the package resources and vòila, the searched packages where found and installed (in my example the HtmlRenderer).
But be careful with compatibility to Framework 2.0! This setting breaks maybe the functionality to version 2.0!!
Hope this helps someone sometimes somewhere.
Greetings
I'm a latecomer to this thread... I'm in Visual Studio 2017 - 15.9.4
I got this error today trying to pull from my private DevOps NuGet feed
CONTEXT:
the first time I called Install-Package everything worked, but, my NuGet was not assembled right, so, I re-published the NuGet pkg, and
when I tried to update my project that was consuming the pkg, that's
when I got the failure)
Switching my Package Source to "all" alleviated the problem.
After 4 hours struggle I found solution here
https://www.grapecity.com/componentone/docs/uwp/online-getting-started/config-nugetpackage.html
Tools > Options > NuGet Package Manager > Package Sources. > Click add button and add following one by one
nuget.org
https://www.nuget.org/api/v2/
GrapeCity
http://nuget.grapecity.com/nuget
NuGet settings in Visual Studio
Right click on references in your project
Manage NuGet Packages => All
Uninstall affected packages
If this does not resolve the issue, try to remove it from the NuGet config file located at
C:\Users\UserName\AppData\Roaming\NuGet\NuGet.config

Nuget version not correct?

I have a project that i cannot compile. When i try to do so I get the following error:
The 'Microsoft.Bcl.Build 1.0.14' package requires NuGet client version '2.8.1' or above, but the current NuGet version is '2.7.41115.310'.
Normally this would be simple. After searching I found this guide:
http://www.daimto.com/package-requires-nuget-client-version-x/
That explains how I can upgrade my Nuget client version. However, when i follow those steps, I find that I am already using the latest version of Nuget: 2.8.5
For some reason however, Visual Studio 2013 Ultimate is using an older version, and I don't understand why.
My install of Visual Studio Ultimate 2013 is a fresh install, after unninstalling Visual Studio for Web Express 2012. The previous version was giving me a considerable amount of problems and so I deleted it and moved on to 2013. I wonder if some cofig files were passed through, but I cant be sure.
How can I fix this problem?
From Tools → Extensions and Updates → Installed, uninstall “NuGet Package Manager” and install it again.
So, after searching around I found no answers, so I decided to look into the project folders. It happens that I have the main version of NuGet.exe, 2.8.5 in main folder, but the project was nowhere near that main folder.
This way, when I downloaded the project it simply used the NuGet version pulled from TFS (or so I assume), and that was the problem - that verison was Nuget.exe 2.7.4.
After replacing the "Nuget.exe" files (found in /.nuget folder of the project) the project finally compiled and everythign started working again.
You can also try update Nuget Package Manager directly from Tools > Extensions and Updates
In my case, a pending update of Visual Studio fixed the nuget version.
The update was the "Update 5" for VisualStudio 2013.
The update was listed under the menu Tools → Extensions and Updates, on the tab Updates.
I was getting this error from a recently cloned branch, but (in contrast to the above solution) found that my Nuget version in the project directory was the same as that in my solution directory.
I solved this by right clicking on the solution and Managing Nuget Packages for the solution. The Nuget dialog that popped up said that packages were missing and asked me to restore them. Once downloaded, the project built successfully.
I had the same issue when trying to install System.Net.Http and it said the nuget version needed to be version 3.0 or above. I tried few things but in the end, used Tools and Manage Nuget Packages and did a search and tried to install it from there when it said exactly the same thing - wrong version of nuget, but it popped up with an upgrade Nuget button too!
Hope this helps someone
Simply reinstall nuget in visual studio

Installed nuget, but don't see the menu option Add Library Package Reference in tools

I installed nuget using the extension manager in vs.net 2010 ultimate.
It re-started, and I still don't see the "Add Library Package Reference" menu in the tools menu.
What could be the issue?
I can only get to the powershell console and use nuget.
Library Package Reference is there in Tools, but it has only 2 options:
Package manager console
Package manager settings
I believe that this may be the default. It's the same for me and I have Ultimate 2010 too...
When I open a solution file I get additional options "Manage NuGet Package for solution"
I do get options to manage NuGet packages when I right click on a Solution file in the solution explorer. I just have to have a solution loaded.
I assumed this was how it supposed to work as I've never seen it working any other way...
If you don't have a solution/project open that supports it, you will only see those two options.

Categories

Resources