Solved

The type or namespace name 'Exchange' does not exist in the namespace 'Microsoft'

Posted on 2011-03-07
4
705 Views
Last Modified: 2013-12-17
This is my code, please take a look at the screen shoot attached. I added a reference to the Exchange Web Services also. Why do I get this error all the time?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Exchange.WebServices.Data;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

        }
    }
}

3-7-2011-11-35-05-AM.png
0
Comment
Question by:joein610
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
OriNetworks earned 500 total points
ID: 35058883
The development computer does not have any reference to the Microsoft.Exchange namespace. You may be able to find the ddl file on an exchange computer and copy them to your project so they can be referenced. Most likely you should be able to  google the SDK for your version of Exchange which should have the files you need.

Exchange 2010 - http://www.microsoft.com/downloads/en/details.aspx?FamilyID=155AB218-3CD5-439F-9CE3-5E6983AB6B79
0
 

Author Comment

by:joein610
ID: 35059891
What file are we looking for? Is it Microsoft.Exchange.WebServices.dll ?
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 35063680
Yes
0
 

Author Comment

by:joein610
ID: 35069276
I've already attached this file. The steps are:

1. I attach the dll file as a reference.
2. I add "using Microsoft.Exchange.WebServices.Data;"
3. I try to Debug the Project and I get an error.

Screen shots attached
3-8-2011-8-58-55-AM.png
3-8-2011-8-59-45-AM.png
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now