Solved

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

Posted on 2011-03-07
4
703 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 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

24 Experts available now in Live!

Get 1:1 Help Now