开发者

No changes after compiling Silverlight project

I am confused. I am adding changes to the Silverlight project and it compiles if there is no any errors. But after I launch the project I can't see any changes. What is开发者_开发问答 going on?


To get around the caching problem you can add a parameter to the xap file in the source attribute of your aspx page.

Instead of just writing

<param name="source" value="ClientBin/SilverlightApp.xap"/>

you can use something like this:

<param name="source" value="<%= String.Format("ClientBin/SilverlightApp.xap?ver={0}", (new System.IO.FileInfo("ClientBin/SilverlightApp.xap")).CreationTime.Ticks.ToString()) %>"/>

That way, every time the xap file is compiled again, the browser will see a new parameter and should load the correct file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜