2013-01-05 24 views
0

我有下面的類結構:設計者不能在VS2010中顯示錶達

public partial class SickForm<T> : MyForm where T : class {} 

public class MyForm : Form, ExternalAssemblyNamespace.ISomething {} 

在設計中正常打開MyForm,一切加載後。但開設SickForm在設計師,我面臨這個錯誤:

The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file:

SickForm --- The base class 'MyForm' could not be loaded. Ensure the assembly has been referenced and that all projects have been built.

如何解決這個問題?當我使用VS2010 express時發生此問題。在VS2008中表示它工作正常。

+0

您是否嘗試過清潔和重建解決方案? – Jobo

+0

那麼,MyForm有什麼特別之處?它位於另一個組件中嗎?它有一個默認的構造函數嗎? –

+0

新鮮重建不起作用。這是相同的程序集。 MyForm中有2個構造函數 - 其中一個是默認值並受保護。 – jwaliszko

回答

0

我發現workaround(有人可以解釋我,爲什麼我不得不這樣做,以及如何在沒有更好的辦法解決這個問題?)

出於某種原因,在我抄我的外部組件,該組件包含臭名昭著ISomething聲明到目錄,VS2010重新啓動後正常啓動表單設計器。