我如何判断 Silverlight 2 是否足以进行程序集或需要 Silverlight 3?我拥有通过反射获得的所有信息 (Mono.Cecil).
SL 3 与 4 的相同问题.
提前致谢.
解决方案这可能正是您要找的:
Assembly asm = Assembly.GetExecutingAssembly();string[] 部分 = asm.FullName.Split(',');字符串版本 = 部分 [1];forums.silverlight/forums/p/23321/82774.aspx#82774
4 向后兼容 3,3 向后兼容 2.
您应该知道应用内置的 Silverlight 版本.
安装和检测:
这个有一个 Javascript 文件,可以检测是否安装了 SL 以及什么版本:blog.mdk-photo/post/检测-Silverlight-version-installed.aspx
www.apijunkie/APIJunkie/blog/post/2009/04/How-to-programmatically-detect-Silverlight-version.aspx
使用 Silverlight 进行版本检测
www.scribd/doc/14938624/Creating-a-Custom-Silverlight-Installation-Experience
/blogs.msdn/tims/archive/2007/10/29/optimizing-the-silverlight-install-experience.aspx
如果您运行了错误版本的 SL,Thge GAC 还会在编译期间通知您.通常当您安装 Silverlight 工具并尝试编译应用程序时.例如,您的程序集是在第 3 版中创建的,而您使用的控件仅在第 3 版中可用,您必须安装 SL 3 工具,否则构建会出错,让您知道.
有关 Silverlight 程序集的更多信息:
wwwfxharmonics/2008/12/Reusing-NET-Assemblies-in-Silverlight
nerddawg.members.winisp/AssemblySniffer/
How can I tell whether Silverlight 2 is sufficient for an assembly or Silverlight 3 is required? I have all information that is available through reflection (Mono.Cecil).
Same question for SL 3 versus 4.
Thanks in advance.
解决方案This might be exactly what you are looking for:
Assembly asm = Assembly.GetExecutingAssembly(); string[] parts = asm.FullName.Split(','); string version = parts[1];forums.silverlight/forums/p/23321/82774.aspx#82774
4 is backward compatible with 3, 3 is backward compatiable with 2.
You should know which version of silverlight the app is built in.
Installation and detection:
This one has a Javascript file that will detect if SL is installed and What version: blog.mdk-photo/post/Detecting-Silverlight-version-installed.aspx
www.apijunkie/APIJunkie/blog/post/2009/04/How-to-programmatically-detect-Silverlight-version.aspx
Version detection with Silverlight
www.scribd/doc/14938624/Creating-a-Custom-Silverlight-Installation-Experience
blogs.msdn/tims/archive/2007/10/29/optimizing-the-silverlight-install-experience.aspx
Thge GAC will also notify you durring compile if you are running the wrong version of SL. Typically when you have Silverlight tools installed and try to compile an app. For instance your assembly is created in version 3 and you use a control that is only available in 3, you will have to have SL 3 tools installed or the build will error letting you know.
More on the Silverlight assemblies:
wwwfxharmonics/2008/12/Reusing-NET-Assemblies-in-Silverlight
nerddawg.members.winisp/AssemblySniffer/
更多推荐
检测程序集所需的 Silverlight 版本
发布评论