Silverlight--No changes possible

2019-07-24 19:54发布

问题:

I've just encountered a strange mistake in a Silverlight project I'm working on with Visual WebDeveloper Express. When I change the MainPage.xaml file the changes show up in the editor window and the project is compiled without problems. However during Debug Mode the website hasn't changed.

My goal was to implement a very simple image viewer for my father: One big image with a small progressbar below. It should be possible to set up a few images that are shown one after another in the huge image control. This is what I did.

  1. I added two rows to the standard grid
  2. I added a progressbar to one of the rows
  3. I added an image control to the other row

So far everything went fine. Debugging showed an empty website with a small bar at the bottom.

  1. I imported a test image and modified the source attribute of my image control

After some struggles with Visual WebDeveloper the image was accepted and could be seen in the editor's preview area.

  1. I compiled the project and started debugging. There was no image on the website.

I don't know what's wrong with my project but the builds seem to have frozen. Just for fun I replaced the image with one giant button. Nothing happened. Compilation was performed without errors but on the website there was no button. After a few other simple tests I was sure: Changes don't apply anymore. This is the compiler output, sorry but it's German :

------ Erstellen gestartet: Projekt: papa_images, Konfiguration: Debug Any CPU ------ papa_images -> K:\extharddrive\dokumente\workspace\papa_images\papa_images\Bin\Debug\papa_images.dll Generierung des Anwendungsmanifests starten Es wurden keine Änderungen ermittelt. Die Anwendungsmanifestdatei ist auf dem neuesten Stand.
XAP-Verpackung starten Es wurden keine Änderungen ermittelt. Das XAP-Paket ist auf dem neuesten Stand. Die Testseite wird erstellt. Die Testseite wurde erfolgreich erstellt.

========== Build: 1 erfolgreich oder aktuell, Fehler bei 0, 0 übersprungen

This is an English version of the last two lines

Build: 1 successful or up to date, error at 0, 0 skipped

What shall I do ?

Edit:

I just made an interesting discovery:

  1. I switched the build mode to release and recompiled everything. --No changes
  2. I closed my browser.
  3. I switched the build mode back to debug and recompiled everything.
  4. When I started debugging Firefox 4 Beta 7 opened instead of Firefox 3.6.1. This is strange because 3.6.1 is my standard browser.
  5. The changes were applied.
  6. I started editing this post using Firefox 3.6.1
  7. I started debugging again. The updated website was shown in FireFox 3.6.1
  8. I changed something in MainPage.xaml and compiled. As Firefox 3.6.1 was still open the website was opened with it. The new changes were not applied

Obviously Firefox 3.6.1 prevents proper rebuilding. Why ? @ Robaticus maybe you're right and Firefox does store the site in some kind of cache. However I'm not able to clear it : The button "delete chronic" is disabled because I'm always using private mode.

Edit 2: Firefox 4 Beta 7 does the job. The changes are applied. Still I would like to know how to use Firefox 3.

回答1:

Tagging on to ChrisF, you may also want to explicitly clear your chache on your browser. I've had that happen before, where the XAP file gets cached for some reason, and never appears to update.



回答2:

It sounds like the Silverlight xap file isn't being updated correctly in the ClientBin folder of your web site.

As a work around you could try deleting it before rebuilding and checking that your edits are indeed compiling.

The only thing I can think of that might prevent the xap file being updated is that it's still in use by the web service, but the message (as translated by Google so it's not 100% accurate) reads:

Build started: Project: papa_images, Configuration: Debug Any CPU ------ papa_images -> C: \ extharddrive \ documents \ workspace \ papa_images \ papa_images \ Bin \ Debug \ papa_images.dll generate the application manifest, there were no changes identified start.
The application manifest file is up to date Xap packaging, it does not start to change were identified.
The XAP package can be created on the date the test page.
The test page was successfully created.

which implies that there were no problems in that area.



回答3:

Is Cassini running? Look in the Notification Area (by the clock) for something called "ASP.NET Development Server." Sometimes we have problems where we have to close that or it remembers what it was last showing.

You can just close it and run again