VS 2010不会更改xap文件 [英] VS 2010 doesn't change xap file

查看:109
本文介绍了VS 2010不会更改xap文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为大学考试项目创建一个silverlight网站。

I'm creating a silverlight website for a college exam project.

解决方案是给我们的,我们只需要更改xaml(所以c#,xaml和asp部分之间的导航/连接正常工作)

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)

当我更改xaml代码时,预览生成正确,当我在另一个项目中打开xaml文件,它完美地显示了这些变化。

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.

但是当我尝试在VS 2010(专业版)中运行它时,我看不到任何变化。

But when I try to run it in VS 2010 (professional edition) I can't see any changes.

老师说它与clientbin中的xap文件有关,如果你检查它的日期确实没有更新

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?

谢谢大家

Jess

推荐答案

也许这不是所谓的解决方案,但它适用于我们的网站。

Maybe this is not the supposed solution, however it works for our site.

在index.aspx中找到类似这样的内容: < param name =" source" ;值= QUOT;的ClientBin / XTS.xap" />

Locate something like this in your index.aspx: <param name="source" value="ClientBin/XTS.xap" />

并将其更改为类似

< param name =" source"值= QUOT;?的ClientBin / XTS.xap版本= 1.2.3.0" />

<param name="source" value="ClientBin/XTS.xap?version=1.2.3.0" />

版本= 1.2.3.0可以替换为您想要的任何内容,只需确保每次有更新XAP文件时都更改它。

version=1.2.3.0 can be replaced by anything you want, just make sure you change that everytime you have an update XAP-file.

 

希望这会有所帮助



请注意,当您想要检索clientbin的网址时没有休息的文件夹你可以使用类似的东西:


Note that when you want to retrieve the url of your clientbin folder without the rest you can use something like:

  &NBSP;公共静态字符串BaseURL {

    public static string BaseURL {

  &NBSP; &NBSP;得到{

      get {

  &NBSP; &NBSP; &NBSP; string Path = Application.Current.Host.Source.AbsoluteUri;

        string Path = Application.Current.Host.Source.AbsoluteUri;

  &NBSP; &NBSP; &NBSP; int IndexOfXapString = Path.IndexOf(" ClientBin / XTS.xap");

        int IndexOfXapString = Path.IndexOf("ClientBin/XTS.xap");

  &NBSP; &NBSP; &NBSP; if(IndexOfXapString> 0)

        if (IndexOfXapString > 0)

  &NBSP; &NBSP; &NBSP; &NBSP; Path = Path.Substring(0,IndexOfXapString);

          Path = Path.Substring(0, IndexOfXapString);

  &NBSP; &NBSP; &NBSP;返回路径;

        return Path;

  &NBSP; &NBSP; }

      }

  &NBSP; }

    }


这篇关于VS 2010不会更改xap文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆