DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

ServiceModel does not Exist in namespace System

This is a discussion on ServiceModel does not Exist in namespace System within the .Net Development forums, part of the Programming & Scripting category; I'm doing some work on WCF web services etc. and this requires using System.ServiceModel namespace. When I add a using ...

Go Back   DeveloperBarn Forums > Programming & Scripting > .Net Development

  #1  
Old October 16th, 2009, 02:00 PM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,347
Blog Entries: 6
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default ServiceModel does not Exist in namespace System

I'm doing some work on WCF web services etc. and this requires using System.ServiceModel namespace.

When I add a using statement for this namespace though, VS underlines it saying it doesn't exist in the Namespace System. When I upload the app to the server and run it, it works fine.

I've read the stuff on google and have uninstalled MS .NET Framework 3.5 completely. I've also uninstalled MS .NET CF 3.5 and then reinstalled that, but it still gives the same error.

Any ideas what I can do to get it to recognise this namespace? If I open Object Browser, the namespace is in their, so I don't understand why it won't find it when I try using it in code.

Any ideas?
__________________
Join the folding team
Reply With Quote
  #2  
Old October 16th, 2009, 02:22 PM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,347
Blog Entries: 6
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

OK. I think I sorted it by Adding a Reference to the project.

Right click on the root of the project in Solution Explorer and select Add Reference. Then scroll to the reference needed and click add.

Not quite sure why you need to add some references and not others, but that seems to have sorted the problem.

Just having to reinstall all the .NET Frameworks now...
Reply With Quote
  #3  
Old October 16th, 2009, 02:40 PM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,347
Blog Entries: 6
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

OK.

I tried the same with System.ServiceModel.Web and that didn't work...

I just have the .NET 3.5 SP1 Framework installed. Should I reinstall the Compact version as well.

Any ideas?

Perhaps a reboot will fix it...
Reply With Quote
  #4  
Old October 16th, 2009, 06:40 PM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,347
Blog Entries: 6
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

The only way I seemed to be able to solve this issue was to copy and paste the dll into the bin folder.

That can't be right....
Reply With Quote
  #5  
Old October 17th, 2009, 02:35 PM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
jmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud of
Default

I've had to do that where the dll was missing from the web server. It's not a big deal, though.
__________________
jmurrayhead
If you agree with me... click the icon!
If my post solved your problem, click the button in the lower right-hand corner of the post.

If you like it here...throw us a few bones to help
support us.

Join our Folding team: DeveloperBarn Folding

Reply With Quote
  #6  
Old October 17th, 2009, 02:57 PM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,347
Blog Entries: 6
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

Quote:
Originally Posted by jmurrayhead View Post
I've had to do that where the dll was missing from the web server. It's not a big deal, though.
I just thought that if it's part of the .NET Framework, it should be there already.

No biggie though I guess...
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > .Net Development

Bookmarks

Tags
servicemodel, system, wcf

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
New Blog System jmurrayhead Announcements 1 December 1st, 2008 07:55 PM
ambiguous in the namespace 'ASP' richyrich .Net Development 10 May 30th, 2008 04:11 PM


All times are GMT -4. The time now is 11:23 PM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2