简体   繁体   English

如何强制Visual Studio Web部署发布最新的XAP

[英]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: 这是我发现的解决方法:

  1. 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" />

    1. 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的程序集版本,以便您实际上可以确认它是调试环境中的最新版本。

    2. Delete the xap from your website folder and your website project ClientBin folder. 从您的网站文件夹和网站项目 ClientBin文件夹中删除xap。

    3. Rebuild the website and it should create a new xap in your website project. 重建网站,它应该在您的网站项目中创建一个新的xap。

    4. 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.

相关问题 在具有多个用户的Visual Studio中使用MSDeploy / Web Deploy作为Publish方法 - Using MSDeploy/Web Deploy as Publish method in Visual Studio with multiple users Visual Studio Xap更新 - visual studio xap update 如何部署/制作.exe /发布Visual Studio DirectX游戏? - How to deploy/make .exe/publish a Visual Studio DirectX game? Visual Studio Web和SQL发布 - Visual Studio web and SQL publish Visual Studio 2012,发布(Web部署)-代码优先迁移不会更改web.config - Visual Studio 2012, Publish (Web Deploy) - Code First Migrations not changing web.config 如何使用Visual Studio Express Web 2010发布网站 - How to publish a web site using Visual Studio Express Web 2010 Visual Studio数据库项目:部署与发布 - Visual Studio Database Project: Deploy versus Publish Visual Studio 2013.3通过Web部署发布到Azure网站验证连接失败,没有错误代码 - Visual Studio 2013.3 publish to azure website via web deploy validate connection fails with no error code Visual Studio 2010 Web 部署错误:此时不允许开始设计时构建以进行发布 - Visual Studio 2010 Web Deploy Error: Not allowed to begin a design-time build at this time for publish 如何自动将Visual Studio 2017 Web项目发布到文件夹 - How to automate Visual Studio 2017 web project publish to folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM