[英]How to force visual studio web deploy to publish the latest xap
When I debug my website\\silverlight, it will always serve me the latest silverlight app I'm working on. 当我调试我的website \\ silverlight时,它将始终为我提供我正在使用的最新的Silverlight应用程序。 but when I use the built-in web deploy.
但是当我使用内置的Web部署时。 it won't deploy the latest silverlight xap.
它不会部署最新的silverlight xap。
I've been fighting with this annoyance for days now. 我已经为这种烦恼奋斗了好几天了。 and here is the workaround I found:
这是我发现的解决方法:
Although this is not much related to the topic, it's a good start point when you face such problem. 尽管这与主题无关,但是当您遇到此类问题时,这是一个很好的起点。 Make sure your clients download the latest version by marking the xap file path with a query string:
<param name="source" value="@Url.Content("~/ClientBin/YourSilverlightApp.xap")?@DateTime.Now.Ticks" />
通过用查询字符串标记xap文件路径,确保您的客户端下载最新版本:
<param name="source" value="@Url.Content("~/ClientBin/YourSilverlightApp.xap")?@DateTime.Now.Ticks" />
Print the assembly version of your silverlight somewhere on the UI so you can actually confirm it is the latest you had in your debug environment. 在UI上的某个位置打印Silverlight的程序集版本,以便您实际上可以确认它是调试环境中的最新版本。
Delete the xap from your website folder and your website project ClientBin folder. 从您的网站文件夹和网站项目 ClientBin文件夹中删除xap。
Rebuild the website and it should create a new xap in your website project. 重建网站,它应该在您的网站项目中创建一个新的xap。
Now you can publish the entire website or just the xap itself and it should be the latest version. 现在,您可以发布整个网站或xap本身,它应该是最新版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.