Accidentally changing names of the project
So I am writing an app for Windows Phone 7. Today, I didn't know what got into me, but I naively thought that by changing the Assembly Name, the Xap File name, the deployment Title, and the regular Title I would change my application name. I keep getting a NullReferenceException and I thin开发者_JAVA百科k my program will never work again. I was really stupid in changing the names and I'm wondering if there's anyway to fix this. Thanks so much!
Apart from checking for any errors in the WMAppManifest.xml
file - you also need to update the startup object in your main phone application project if you've renamed it or its namespace.
To do this, right-click on your main project in Visual Studio and select Properties. In the "Application" tab, update the "Startup object" drop down to point to your new object, in the correct namespace. You probably want to check everything else on this setttings page is correct too.
Same problem here, solution: 1. change the namespace of 'App.xaml' & 'App.xaml.cs' to the target startup object name 2. clean and rebuild the solution 4. open the property window and choose the new 'startup object'
精彩评论