问题描述
我创建了一个新的Silverlight应用程序,并在服务器端的CLientBin下创建了一个XAp文件.
I have created a new Silverlight app and it created a XAp file under the CLientBin on the Server side.
但是,在将现有项目复制到同一文件夹并将其添加到解决方案中之后,将不会为该程序集生成XAP文件.
However after copying an existing project into the same folder and adding it to the solution, the XAP file is not being generated for the this assembly.
我想念什么?
非常感谢,
推荐答案
除非您确切知道自己在做什么,否则不要尝试手动修改项目/解决方案文件:)
仅将其添加到解决方案中是不够的.您需要在网站和Silverlight应用程序之间建立Silverlight关系.
Adding it to the solution is not enough. You need to make a Silverlight relationship between the website and your Silverlight application.
- 右键单击您的网站项目,然后选择
Properties
. - 选择左侧的
Silverlight Applications
标签 - 按
Add...
- 选中
Use an existing Silverlight project in the solution
并从Project
下拉列表中选择要添加的项目. - 保留
Add a test page that references the control
的内容是否需要为应用程序提供单独的测试页. - 按
Add
键,您就完成了.
- Right-click on your website project and select
Properties
. - Choose the
Silverlight Applications
tab on the left side - Press
Add...
- Leave
Use an existing Silverlight project in the solution
checked and select the project you want to add from theProject
dropdown. - Leave
Add a test page that references the control
checked if you want a separate test page for your application. - Press
Add
and you are done.
网站现在将构建您的Silverlight应用程序,并将输出的Xap文件包含在其ClientBin文件夹中.
The website will now build your Silverlight application and include the output Xap file in its ClientBin folder.
这篇关于新的Silverlight应用程序不会生成XAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!