How to get the Silverlight XAP copied to the clientbin on build

前端 未结 1 2067
一个人的身影
一个人的身影 2021-02-12 06:24

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

相关标签:
1条回答
  • 2021-02-12 06:48

    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.

    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.

    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.

    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.

    0 讨论(0)
提交回复
热议问题