如何获得Silverlight的XAP复制到生成的的ClientBin [英] How to get the Silverlight XAP copied to the clientbin on build

查看:122
本文介绍了如何获得Silverlight的XAP复制到生成的的ClientBin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用Silverlight和最近增加了一个Silverlight项目,以一个既定的解决方案。在这种特殊的情况我的解决方案包括现有的ASP.NET网站(不应用程序),它的Visual Studio好心提供给我的集成Silverlight应用程序之中,我接受了。

I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site (not application) which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted.

所以,一切都很好,所有和Silverlight的XAP被复制到网站的的ClientBin目录。现在,我已经决定开始新的ASP.NET MVC的Web应用程序,最终将取代旧的(非MVC)的网站。但我不能为我的生活搞清楚什么Visual Studio的修改,以获得XAP自动出现在网站的的ClientBin的身材,让我可以重现我的MVC的网站。

So everything is fine and all, and the Silverlight XAP is being copied to the web site's ClientBin directory. Now I have decided to start a new ASP.NET MVC web application that will eventually replace the older (non-MVC) web site. But I cannot for the life of me figure out what Visual Studio modified to get the XAP to automatically appear in the web site's ClientBin on build, so that I can reproduce that on my MVC site.

所以我的问题基本上是,什么是手动步骤获取Visual Studio中自动复制Silverlight应用程序的XAP到一个新添加的ASP.NET MVC Web应用程序?

So my question is essentially, what are the manually steps for getting Visual Studio to autocopy a Silverlight application's XAP to a newly added ASP.NET MVC web application?

推荐答案

在XAP到的ClientBin的复制是一个MSBuild任务。如果您使用的是标准的ASP.NET项目模板可以根据Silverlight的链接部分。

The copying of the XAP to the ClientBin is a MSBuild task. If you're using a standard ASP.NET project template it can be found under the Silverlight Link section.

对于一切你也许能够找出MSBuild任务的名称,并将其添加到您的ASP.NET MVC项目。在简单的解决方案可能是使用的APS.NET项目自定义生成后事件来复制文件。

For everything else you might be able to figure out the name of the MSBuild task and add it to your ASP.NET MVC project. The easier solution would probably be to use a custom post-build event on the APS.NET project to copy the file.

有没有神奇的发生,oter不是复制从Silverlight项目到Web应用程序的的ClientBin的BIN目录的XAP文件。它甚至没有住的ClientBin目录中 - 你可以把它复制到任何目录下,或者你的站点的根目录

There is no "magic" happening, oter than copying the XAP file from the BIN directory of your Silverlight project to the ClientBin of your web application. It doesn't even have to live inside the ClientBin directory - you can copy it to any directory, or the root of your site.

更新: ASP.NET MVC最近发布的测试版1包括Silverlight的项目提供支持,所以您可以在您定期做ASP.NET同样的方式链接到你的ASP.NET MVC应用程序应用程序。

Update: The recently released Beta 1 of ASP.NET MVC includes support for Silverlight projects, so you can link it to your ASP.NET MVC application the same way you do for regular ASP.NET applications.

这篇关于如何获得Silverlight的XAP复制到生成的的ClientBin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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