I have a WCF Data Service project built with Visual Studio 2010, which was working fine. All of a sudden, it didn't compile anymore. It was giving me messages like:
Error 7 The type or namespace name 'Services' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) C:\U...s\Visual Studio 2010\Projects...\DataService.cs ...
Error 8 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?) DependencyResolver.cs 3 14
Error 10 The type or namespace name 'Web' does not exist in the namespace 'System.ServiceModel' (are you missing an assembly reference?)
Error 12 The type or namespace name 'DataService' could not be found (are you missing a using directive or an assembly reference?)
How can I fix it?
There are two solutions to this error. The first is to correct the name of the namespace to match one that already exists. The second is to fix the custom namespace that was created. 1.
The Compiler Error C2039 may occur when namespace members are declared across multiple header files, and you have not included those headers in the correct order.
To fix this error, simply update the example . csproj file to use a previous System. CommandLine version. Note that this package is only used to parse the options for the example.
I have had the same problem, and I had to set the "Target Framework" of all the projects to be the same. Then it built fine. On the Project menu, click ProjectName Properties. Click the compile tab. Click Advanced Compile Options. In the Target Framework, choose your desired framework.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With