| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2436 人关注过本帖
标题:Silverlight在VS2005上也能编程的办法
取消只看楼主 加入收藏
风中涟漪
Rank: 1
等 级:新手上路
帖 子:234
专家分:0
注 册:2004-8-9
收藏
 问题点数:0 回复次数:6 
Silverlight在VS2005上也能编程的办法

Well I've been downloading the VS Orcas for a few days and it still isn't done. I really wanted to try out the .NET support in Silverlight 1.1 and so I asked if this could be done with VS 2005 and Scott Louvau replied:

Well, in VS2005 you can create a class library which will build against the Silverlight runtime, but it's a little work.

1. Create a Class Library.
2. Remove all references from it.
3. Right-click on the Project and pick Properties.
4. On the Build tab, click Advanced and check 'Do not reference mscorlib.dll'
5. Manually add references to mscorlib, agclr, System, System.Core, System.Silverlight, and System.Xml.Core from the Silverlight install folder (\Program Files\Microsoft Silverlight\)

At this point your build outputs should be Silverlight consumable binaries. It looks like the equivalent command line call to csc.exe (the C# compiler) should include the references to the mentioned binaries and the /nostdlib option but may require others as well.

-Scott

I tried it out and it work pretty well. If you're interested I've uploaded my project so that you can download it and try it out. You will need Silverlight 1.1 installed and VS studio 2005.

Download the sample code here

I've also posted the code to my server but I couldn't figure out how to setup IIS to allow DLL files to be downloaded. Maybe tomorrow.


[此贴子已经被作者于2007-8-3 0:22:46编辑过]

搜索更多相关主题的帖子: Silverlight 办法 
2007-08-01 11:14
风中涟漪
Rank: 1
等 级:新手上路
帖 子:234
专家分:0
注 册:2004-8-9
收藏
得分:0 

如果你想尝试开发 Silverlight 1.1 应用,又对下载/安装推荐的Visual Studio Orcas Beta 1有点怕怕的话,你可以使用Visual Studio 2005和Expression Blend 2 五月份的预览版 (25.5M)来开发。

根据Bryant Likes的博客,在安装Silverlight 1.1 alpha运行时后,你可以在Visual Studio 2005里,

1. 创建一个类库
2. 删除该项目所有的引用
3. 右击项目,选择属性
4. 在项目属性页的Build页上,点击“高级”按钮,选择“别引用mscorlib.dll”复选框
5. 手工添加对 Silverlight 1.1 alpha 运行时的安装文件夹 (\Program Files\Microsoft Silverlight\ ) 里的 mscorlib, agclr, System, System.Core, System.Silverlight, 和 System.Xml.Core程序集的引用


他有一个例程你可以试一下。


2007-08-01 11:14
风中涟漪
Rank: 1
等 级:新手上路
帖 子:234
专家分:0
注 册:2004-8-9
收藏
得分:0 

大概意思是 用vs 2005开发silverlight的程序,有点麻烦,不过2008都出来了,大家有空可以去下载玩玩

C#打败java指日可待


2007-08-01 11:16
风中涟漪
Rank: 1
等 级:新手上路
帖 子:234
专家分:0
注 册:2004-8-9
收藏
得分:0 

兼容不是ms作风


2007-08-01 11:19
风中涟漪
Rank: 1
等 级:新手上路
帖 子:234
专家分:0
注 册:2004-8-9
收藏
得分:0 

linq也是小技术,对国人来说有用点,不过是新版ado.net而已

silverlight是要代替flash而存在。


2007-08-01 15:51
风中涟漪
Rank: 1
等 级:新手上路
帖 子:234
专家分:0
注 册:2004-8-9
收藏
得分:0 
以下是引用立志成佛在2007-8-1 11:22:36的发言:

的确,兼容不是微软作风,但是很多东西微软不能做的太过分呀!
虽然我现在也学。NET,但是我强烈反对。NET统一天下,当然也不可能的。
看看最近微软的Office标准要提交为国际标准,马上大家都支持OpenSource了
微软以后处处为营,也会处处遭攻的

提交标准不是被逼的,而是要将自己标志成协议级别,微软从来没打算开源


2007-08-01 15:52
风中涟漪
Rank: 1
等 级:新手上路
帖 子:234
专家分:0
注 册:2004-8-9
收藏
得分:0 
提交标准不是妥协,是策略

2007-08-03 00:23
快速回复:Silverlight在VS2005上也能编程的办法
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013171 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved