1
我有一個ASMX Web服務。當我從客戶端訪問它時,ASMX得到編譯,但是我得到這個錯誤:訪問Web服務時編譯ASMX時出錯
從錯誤詳細信息中查看csc.exe命令行,未引用System.Windows.Forms裝配體。
編譯錯誤
說明:該請求提供服務所需資源的編譯過程中出現錯誤。請查看以下具體的錯誤細節並適當修改您的源代碼。可能會出現至少有兩個原因
Compiler Error Message: CS0234: The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
Source Error:
Line 3: using System.ComponentModel;
Line 4: using System.Drawing;
Line 5: using System.Windows.Forms;
Line 6: using System.Xml;
Line 7: using Idp.Core.Configuration;
System.Windows.Forms被項目引用,我使用它的一些類。 我不明白與彙編的引用沒有傳遞給編譯器 – 2010-09-09 17:12:56
@Frederic - 你的C#代碼在標記文件或代碼隱藏? – kbrimington 2010-09-09 17:59:30
在代碼後面。 – 2010-09-10 13:52:07