首先需要下载Silverlight 1.0 Beta SDK。安装Silverlight开发模板
方法如下:
1、确认VS2005已经安装SP1,如果没有安装请下载安装(强烈建议安装SP1)。下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyID=bb4a75ab-e2d4-4c96-b39d-37baf6b5b1dc&DisplayLang=en
2、安装Silverlight项目模板。确认关闭VS2005,将Silverlight1.0SDK\ SilverlightBetaToolsForVS2005.zip压缩包中的SilverlightJSApplication.zip复制到 <Documents>\Visual Studio 2005\Templates\ProjectTemplates\Visual C#目录下。
3、再次打开VS2005,打开新建项目对话框,你将看到Silverlight Javascript Application的项目模板
就这么简单,大家可以试一下。
注意:这个环境还不能开发Silverlight 1.1 alpha程序。如果需要建议安装Orcas beta
使用Visual Studio 2005开发Silverlight 1.1应用
* 1
*
如果你想尝试开发 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程序集的引用
他有一个例程你可以试一下。
Silverlight Hello World in C# from VS 2005
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.
转载于:https://www.cnblogs.com/hakuci/articles/1102657.html
原文地址:https://blog.csdn.net/weixin_30345577/article/details/99535797
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。