现在的位置: 首页 > 综合 > 正文

指定Visual Studio模版所支持的.net框架版本

2011年07月05日 ⁄ 综合 ⁄ 共 1101字 ⁄ 字号 评论关闭

AutoCAD.net wizard是一个Visual Studio的扩展,主要功能是帮助创建基于AutoCAD的.net应用程序,自动添加一些必要的引用,同时这个插件还支持Map 3D, Civil 3D, ACA和AME。现在Visual Studio 2012已经出来了,需要把这个工具升级一下,让它支持Visual Studio 2012 和AutoCAD 2014.

 

如果你对创建Visual Studio 项目模版感兴趣,可以参考这几篇文章:

http://msdn.microsoft.com/en-us/library/ms185301.aspx

http://visualstudiomagazine.com/articles/2012/08/20/visual-studio-custom-templates.aspx

http://www.bluelemoncode.com/post/2012/01/05/Creating-custom-project-and-file-template-with-wizard-for-Visual-Studio.aspx

 

这里要说的是模版文件中一个微小的设置。Visual Studio 2012中可以选用.net 2.0~ 4.5, 对于AutoCAD 2013的开发需要.net4.0,而对于AutoCAD 2014则需要.net 4.5. Visual Studio 模版里面的RequiredFrameworkVersion 元素表示 指定模板要求的 .NET Framework 的最低版本,对于AutoCAD 2013来说自然是 <RequiredFrameworkVersion>4.0</RequiredFrameworkVersion >,不过这还不够,要不就会有下面的情况,选择.net 4.5时AutoCAD 2013的模版也会出来了,而AutoCAD 2013没有在.net 4.5上测试。

imageimage

通过查阅MSDN文档,发现还有一个MaxFrameworkVersion 标签,表示该模版支持的最高.net版本,这样就可以指定AutoCAD 2013的模版最高支持.net 4.0.这样就比较妥当了:

<RequiredFrameworkVersion>4.0</RequiredFrameworkVersion>
<MaxFrameworkVersion>4.0</MaxFrameworkVersion>
这样看起来好多了:

image

image

 

PS.现在AutoCAD 2014 .net wizard还没发布,如果你感兴趣,请关注AutoCAD开发者中心: http://www.autodesk.com/developautocad.

抱歉!评论已关闭.