WPF error: does not contain a static 'Main' method suitable for an entry point
生活随笔
收集整理的這篇文章主要介紹了
WPF error: does not contain a static 'Main' method suitable for an entry point
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
does not contain a static 'Main' method suitable for an entry point
在Visual Studio中刪除App.xaml從別的位置拷貝一個后會出現(xiàn)的編譯錯誤,原因在于
默認(rèn)的App.xaml在屬性頁中的Build Action 是ApplicationDefinition,而拷貝過來的文件默認(rèn)不是這樣的。這個Build Action 會為我們生成所需的靜態(tài)Main方法,這樣程序就能夠正確的被編譯了。
?
refrence:
http://joewirtley.blogspot.com/2008/04/application-class-and-main-method-in.html
?
類似的移植性錯誤一般和Build Action相關(guān),仔細(xì)查看
總結(jié)
以上是生活随笔為你收集整理的WPF error: does not contain a static 'Main' method suitable for an entry point的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 将Java程序变成可执行文件的简单方法
- 下一篇: AppDomain,应用程序域