I am fairly new to C# language so I just do not understand why my build produces error messages like the following.
The type or namespace name 'ProtoBuf' could not be found(are you missing a using directive or an assembly reference?)
What’s interesting is that I don’t get an error if I target ‘.NET framework 3.5’ but I am getting an error once I set the project to target to ‘.NET framework 2.0’
Code stays the same and protobuf-net should be working with .NET 2.0 so I am not sure what I am missing.
FYI, the line that causes the error above is this line:
using ProtoBuf;
Can anyone give me some suggestion to resolve the error above? Thank you in advance.
The standard download zip contains several dlls with cumulative features; in particular, the 3.0 version includes WCF hooks that only exist in 3.0 and above. While VS2008 is fairly forgiving here, VS2010 will usually point-blank refuse to include a reference for a higher framework.
If you don’t need WCF, then the 2.0 version should work on any of 2.0, 3.0, 3.5 or 4.0 Otherwise – pick the right dll from the zip.