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