Hey guys, Excuse my ignorance in this matter, but I'm both new to C# and the Exchange SDK. I'm creating a very basic program for testing purposes and for an upcoming project. I'm looking at a piece of example code that I found on the net and the text "ServicedComponent" is giving me an error. The code below looks like this: ---------------------------------------------------------------------------------------- public class ExchSink : ServicedComponent, IExStoreAsyncEvents { public string ClassID = "F92EFC3A-FDD8-4225-B005-13FD3D5D54D1"; public string InterfaceId = "704A413F-F8FE-476B-9206-69AB6300D752"; public string EventsId = "DCC71BD5-6627-4FBF-BB5A-DB8FEA1EB177"; public void OnDelete(IExStoreEventInfo pEventInfo, string bstrURLItem, int lFlags) { try { } catch (Exception ex) { throw (ex); } } ---------------------------------------------------------------------------------------- The error I'm getting is: "Error 2 The type or namespace name 'ServicedComponent' could not be found (are you missing a using directive or an assembly reference?)" Any idea what I need to do? Thanks!!!
I did some research and it looks like it needs "using System.EnterpriseServices;" added to the code as well. I have, but that reference doesn't seem to exist. What reference do I need to add before it will no longer error out on that line? That line gives me the following error: "Error 1 The type or namespace name 'EnterpriseServices' does not exist in the namespace 'System' (are you missing an assembly reference?)"
Hello Todd, you must add an assembly reference for System.EnterpriseServices to your project. Are you working with Visual Studio? If yes, right-click on References in the project view and click "Add reference". Scroll down to the System.EnterpriseServices and click "Add". That should do it. Greetings, Henning Krause "Todd Jaspers" wrote in message news:4D6A4A57-B11C-41E8-8E40-0619D3C72423@microsoft.com... >I did some research and it looks like it needs "using > System.EnterpriseServices;" added to the code as well. I have, but that > reference doesn't seem to exist. What reference do I need to add before it > will no longer error out on that line? > > That line gives me the following error: > > "Error 1 The type or namespace name 'EnterpriseServices' does not exist in > the namespace 'System' (are you missing an assembly reference?)"
Thanks Henning, This worked. I really appreciate it. Todd "Henning Krause [Exchange]" wrote: > Hello Todd, > > you must add an assembly reference for System.EnterpriseServices to your > project. > > Are you working with Visual Studio? If yes, right-click on References in the > project view and click "Add reference". Scroll down to the > System.EnterpriseServices and click "Add". That should do it. > > Greetings, > Henning Krause > > "Todd Jaspers" wrote in message > news:4D6A4A57-B11C-41E8-8E40-0619D3C72423@microsoft.com... > >I did some research and it looks like it needs "using > > System.EnterpriseServices;" added to the code as well. I have, but that > > reference doesn't seem to exist. What reference do I need to add before it > > will no longer error out on that line? > > > > That line gives me the following error: > > > > "Error 1 The type or namespace name 'EnterpriseServices' does not exist in > > the namespace 'System' (are you missing an assembly reference?)" > >