c# - Can't reference System.ServiceModel.EndpointNotFoundException -
i'm trying catch exception:
system.servicemodel.endpointnotfoundexception
but visual studio isn't finding it. there's no little red dash @ end, , if try doing using on system.servicemodel
namespace, there no servicemodel in system. though system.servicemodel namespace in .net framework class library.
is there reason cannot reference it?
i error when application cannot access web-service.
edit: target framework is: 3.5 client framework not checked.
edit: i'd added system.servicemodel namespace, apparently (it wasn't obvious @ time), i'd added class library instead of program. whole bother. when suggested close , start new project, add library, worked, went , looked. vs different on re-open , obvious i'd added system.servicemodel library , not main project.
thanks help!
(added @ request of asker, in response discussions in comments.)
if you've definitely added reference, , you're definitely targeting .net 3.0+, will work.
i created new project targeting .net 3.5 (full) in vs 2008, added reference system.servicemodel
, , works expected.
something else must wrong. try seeing if can same thing in new, blank project.
Comments
Post a Comment