1. 关于C#引用Dll后,找不到命名空间的问题
http://topic.csdn.net/u/20110609/19/b8aa661d-c522-412c-883f-7e189bd6fe92.html
确实有编译不过的问题,是Vancl.WindowsServices这个工程的target framework设置为.Net Framework 4 Client Profile,修改为.Net Framework 4即可解决大部分的编译问题。
2.不能序列化问题
{"Type 'ServiceProviderSample.TextToFullContextArguments' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types."}
http://msdn.microsoft.com/en-us/library/ms733127.aspx
添加[DataMember]以及[DataContract]
3.VS里面platform target 使用问题:
http://visualstudiohacks.com/articles/visual-studio-net-platform-target-explained/
http://blog.csdn.net/badbad_boy/article/details/5533826
有两层意思:本身是32位还是64位程序。32位程序只能被32位程序调用,64位的只能被64位调用。他们都能在32位操作系统和64位操作系统上运行。调用的类库可能有所不同。
如选择AnyCPU,则表示运行时决定。
4. no symbols have been loaded for this document
http://bytes.com/topic/c-sharp/answers/238429-no-symbols-have-been-loaded-document-answer-anyone
1)Close project
2) DELETE ALL the occurences of B.pdb under /bin and /obj
3) Open project and BUILD