I'm creating a silverlight website for a college exam project.
The solution was given to us, we only have to change the xaml (so the navigation/connection between the c#, xaml and asp part is working)
When I change the xaml code, the preview is generated correctly, and when I open the xaml file in another project it shows the changes perfectly.
But when I try to run it in VS 2010 (professional edition) I can't see any changes.
The teacher said it had something to do with the xap file in the clientbin, which is indeed not updated if you check its date
Is there a way to force that file to update, or do you perhaps suspect an other reason?
Thank you all
Hi Jess. Make sure you rebuild the project. Depending on how you start the application from Visual Studio, this may not be performed automatically. In Solution Explorer, right-click the Silverlight project and select "Build". If that doesn't work, you can also select "Rebuild", or first "Clean", then "Build". Do the same for the Web Application project.
If the XAP file still doesn't update, the link between the Silverlight and Web Application project might be broken. Again in Solution Explorer, right-click the Web Application project this time, and select "Properties". In the upcoming screen, select "Silverlight Applications" to the left, and make sure your Silverlight project is listed there. If it's not, you can add it with the respective button.
Well it can happen for several reasons. Let's make a check point list validation:
- Has been set on the target XAP file the readonly properly (source code version software)
- Had your environment a Memory overflow exception during compilation?
- Is your Silverlight project linked to a web application in the solution? If not try to do that; if yes...
- Are you compiling only the silverlight project or the web?
- Have you verified that you are not having a Caching problem with your browser AND / OR IIS or web host?
- Was the silverlight XAP file being used in that especific moment?
I had quite similar experience in the past because of the source code control and the Caching of VS or IIS that can be resolve easily just deleting the XAP file and rebuilding the complete solution :)
About the memory overflow... well; if you are having this experience normally means that your project has multiple and big resources or dependencies. One solution that normally works fine is to close the Visual studio forcing the system to clean up the memory and opening it again.
Let me know if you need more details in some of the mentioned points
And good luck in the EXAM! :D
Hi, thank you all for your replies!
I found that when I installed the silverlight for VS 2010 it suddenly worked. The Xap files were refreshed.
Yesterday it worked, but when I reopened VS today it suddenly went back to the problematic state.
Reinstalling silverlight for VS 2010 doesn't change anything anymore.
Does any of you know how to solve this?
Thank you very much!
Try to run the VS as administrator, right click the VS shortcut and click "Run as Administrator", if the problem get away, that means your current login account does not have privilege to write data to the folder, please give the privileges to the current account. If still not, please let me know, I will report it.
Jessidy, the answer above http://social.msdn.microsoft.com/Forums/en-US/silverlightdevtools/thread/3c5ff524-aef9-4d7f-8412-d28961504e84#0276a6c6-8528-4cd4-a15e-84d49912cc00 teaches you how to think logically, and how to troubleshoot a problem down to its root causes. It is the fastest way to identify why your XAML changes aren't showing up.