我的dll專案原本是私組物件,為組件裡的方法測試完畢後,想把它改成全域組件,組件安裝請參考http://www.dotblogs.com.tw/yc421206/archive/2009/04/16/8030.aspx
這時在編譯的時候出錯了~
我猜是PublicKeyToken沒加的關係,參考用法:http://msdn.microsoft.com/zh-tw/library/bb385840%28VS.90%29.aspx,我用Reflector把PublicKeyToken找出來然後加上去
結果依舊出錯
最後找到了這篇文章解決了我的問題
1.開啟VS2010 Command工具,切換資料夾路徑到dll的位置,該位置會有在VS所定義的.snk檔案
2.使用sn.exe –p取出snk:sn -p yaochang.snk yaochang.pub
3.使用sn.ex –tp 印出 PublicKeyToken:sn -tp yaochang.pub
將得到的PublicKeyToken換掉,重新編譯就通過了
PS.不知如何Cpoy Command畫面的人,可以參考以下

![image_thumb[1] image_thumb[1]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/201201070129168158.png)
![image_thumb[2] image_thumb[2]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/201201070129217563.png)
![image_thumb[3] image_thumb[3]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/201201070129288265.png)
![image_thumb[12] image_thumb[12]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/201201070129326375.png)
![image_thumb[4] image_thumb[4]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/20120107012937863.png)
![image_thumb[5] image_thumb[5]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/201201070129442121.png)
![image_thumb[7] image_thumb[7]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/20120107012950938.png)
![image_thumb[8] image_thumb[8]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/201201070129573243.png)
![image_thumb[9] image_thumb[9]](https://images.cnblogs.com/cnblogs_com/yc421206/201201/201201070130031187.png)
浙公网安备 33010602011771号