读书人

#039;MainPage#039; could not be found解决办

发布时间: 2012-02-05 12:07:15 作者: rapoo

'MainPage' could not be found
app.xaml.cs文件中有这么一段

private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}

为啥每次都报'MainPage' could not be found呢

[解决办法]

探讨
你的项目中有MainPage.xaml这个文件么?如果没有添加一个就可以了。

[解决办法]
探讨
MainPage.xaml,MainPage.xaml.cs,App.xaml,App.xaml.cs这四个文件都有,忘了说,环境是sl3,我是直接新建sl程序建的项目,其中Host the Silverlight application in a new web site勾去掉了

[解决办法]
探讨
MainPage.xaml,MainPage.xaml.cs,App.xaml,App.xaml.cs这四个文件都有,忘了说,环境是sl3,我是直接新建sl程序建的项目,其中Host the Silverlight application in a new web site勾去掉了

读书人网 >CAD教程

热点推荐