2012-11-14 56 views
-1

我有多個項目的解決方案。 一個項目是一個windows窗體項目&其他人是類庫項目。 我已將勝利表格項目設置爲啓動項目。 我用鼠標右鍵單擊該贏形式的項目,然後選擇「Debug」,然後「啓動新實例」,有時我得到這個錯誤:運行Win Forms項目時出現奇怪的錯誤

A project with an Output Type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the start-up project.

我注意到,幾乎每次VS2012失去焦點(因爲我點擊了另一窗口)在構建過程中,我會得到這個錯誤! 任何想法可能是什麼問題?

更新: 我注意到在構建過程中,將所選項目更改爲任何其他項目導致此錯誤已足夠!

+0

嗯,這很奇怪。相反,像所有人一樣,開始按F5鍵。 –

+0

我在我的解決方案中有多個贏得表單項目,我需要運行以測試我們代碼的不同功能。 –

+0

我已經向Microsoft提交了一個錯誤:[link](http://connect.microsoft.com/VisualStudio/feedback/details/771033/error-while-trying-to-run-windows-forms-application) –

回答

相關問題