Reputation: 231
I'm using Visual Studio Professional 2013, and I'm trying to import an ASP.NET web site whose files were on SVN so that I can run and debug the website locally. I created a new web site and changed the target framework to .NET 3.5 (that's what the guys who built the website told me it was in). So, I copied over the files to the website directory, and added them into the solution using "add->existing web site".
I get this error specifically:
The type or namespace name 'ServiceModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
So, I think to myself, I'll just add a reference to ServiceModel, no big deal. So, I right-click the project, go to add reference, look for System.ServiceModel under Assemblies->Framework, check it, and click ok. Then this happens:
The Web site is already referencing the assembly 'System.ServiceModel'.
These things might help:
Upvotes: 8
Views: 17458
Reputation: 11
you should add these packages ->
<PackageReference Include="System.ServiceModel.Duplex" Version="4.7.*" /> <PackageReference Include="System.ServiceModel.Http" Version="4.7.*" /> <PackageReference Include="System.ServiceModel.NetTcp" Version="4.7.*" /> <PackageReference Include="System.ServiceModel.Security" Version="4.7.*" />
Upvotes: 1
Reputation: 877
<RootNamespace>MyProject</RootNamespace>
Upvotes: 0
Reputation: 975
Add a reference to the assembly System.ServiceModel. Select Project-> Add Reference and then select the assembly name.
Upvotes: 7
Reputation: 760
Copy System.ServiceModel.dll from "C:\Windows\Microsoft.NET\Framework\v4.0.30319" to project bin folder.
Upvotes: 2