Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The type or namespace name 'Syndication' does not exist in the namespace 'System.ServiceModel' After updating to VS2010

i get the following error when trying to compile my asp.net site after updating the project from vs2008 to vs2010

The type or namespace name 'Syndication' does not exist in the namespace 'System.ServiceModel' (are you missing an assembly reference?)

I have the asp.net site targeting 3.5 framework (as it did in vs2008) I also added a reference to System.ServiceModel.Web

I also have these using statements at the top of my class: using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Syndication; using System.ServiceModel.Web;

The last 2 complain with the error above, commenting them out produces errors (cannot find WebGet, etc.) like it flipflops.

Anyone have any ideas?

like image 757
schmoopy Avatar asked Dec 22 '25 01:12

schmoopy


2 Answers

I got this working in .NET 3.5 by adding the Web DLL, thanks to the post below.

DOTNET 3.5: add a reference to the System.ServiceModel.Web.dll

DOTNET 4.0: add a reference to the System.ServiceModel.dll

StackOverflow Post

like image 110
Greg Avatar answered Dec 24 '25 15:12

Greg


For me it turned out to be the following line:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

it should have been

<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">

I had many other projects in the solutions all based off the same thing - no idea how that went missing but adding it in solved the problem.

like image 31
rtpHarry Avatar answered Dec 24 '25 17:12

rtpHarry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!