`
cdragon
  • 浏览: 76606 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

.Net Framework各版本(2)-vs2010添加引用页和CLR side-by-side的变化

阅读更多

VS 2010,从RC1版本我们可以看到,这一版本的集成开发环境,基本上集成了MS目前所有涉及到的领域,细节更突出,start tutorial更准确、布局更合理,界面更加人性化而且舒适、新增加了F#语言支持、help已经以服务出现、第三方插件(add-in)以扩展管理器的形式出现、云计算工具已经包含在该版本中、旗舰版和高级版对团队开发和程序生命周期管理进行支持。笔者试用RC1版的总体感觉-纯粹用来编写程序非常方便。

 

一、VS 2010的Beta2版本的“添加引用”出现了变化,我们拮取其一,稍加窾豹。

 

在vs2010中打开该对话框时,.NET 和 COM 页现在是异步装载的,在填充列表时不会堵塞UI线程。这意味着,如果你不小心点击了这些页的话,你不再会堵在那里,等着它们同步装载。在VS 2010中,你现在可以点击“取消”关闭对话框或者点击另一页。

 



 

参见:http://weblogs.asp.net/scottgu/archive/2009/10/29/add-reference-dialog-improvements-vs-2010-and-net-4-0-series.aspx 

 

二、vs 2010中做了一些非常重大的架构级改动,来促成更好和更精确的多定向支持(side-by-side) 。

      vs 2010现在给每一个.NET版本都配备了“引用程序集(reference assemblies)”,它只包含某个特定框架程序集的元数据,而不是它的实现(因此所占硬盘极小)。它用来确保VS 2010总是能够在定向某个.NET 框架版本时提供百分之百精确的intellisense。这还意味著,通过设计器中属性表格呈示的属性,对象浏览器中的API列表,以及IDE中所有其它各种地方都能精确地显示出确切版本的API签名。MS同时还更新了VS 2010调试器,profiler和编译器,使之能够定向多个CLR版本。
  vs 2010的多定向支持允许你定向开发 .NET 4.0, .NET 3.5, .NET 3.0 和 .NET 2.0的项目。它允许你开始利用新的工具特性,而不必马上将运行你应用的客户机和服务器升级到.NET 4.0。 

 

对比:vs 2008的多定向支持

  vs 2008是第一个包含.NET多定向支持的Visual Studio版本,这意味着,你不光可以使用vs 2008创建和编辑.NET 3.5 项目,也可以创建和编辑.NET 3.0 和 .NET 2.0项目。这允许开发人员更快地升级和充分利用新的Visual Studio工具特性,而不必要求在运行他们应用的客户机和生产性服务器端安装新一点的.NET 版本。

  vs 2008的多定向支持利用了.NET 2.0, .NET 3.0, 和 .NET 3.5都是在同个版本的CLR之上运行的这个事实,而这三个.NET 版本的主要区别在于它们的框架类库。结果是,Visual Studio的编译器能够生成同样的IL输出,调试器能够针对同个CLR引擎进行调试,IDE对多定向的支持主要着重于过滤掉不支持某个给定.NET 版本的新的程序集和项目模板的的显示。

  这个多定向体验是可行的,尽管不完美。vs 2008中的Intellisense总是显示.NET 3.5版本的框架类库的类型和成员(即使你定向的是.NET 2.0)。这意味着,你有时候会在无意中使用一个ASP.NET 3.5才有的方法,尽管你是在开发一个ASP.NET 2.0 项目。

 

 

VS 2010 rc1版,给笔者留下较深印象的几个方面:

1、以WCF为基础的MS的云战略已经笃定地付诸实施,vs 2010就是一款云模式下的产品;MS的SaaS已初步“成军”;

2、vs 2010定位为一个开放型的平台,从工具、组件、到定制控件等等,MS已经为isv敞开大门,与开源力量重新整合;这也标志着WPF开始取得产业性成功;

3、引入F#,增强了.NET平台的异步计算能力,这是.Net下一步的发展方向;

4、MVC2的明确,标志MS开始引入较为成熟的企业模型;

5、在vs2010中出现了小规模的云工具和云时间使用的概念。虽然规模很小,但MS这么明确地加以引入,在云计算并未完全成熟的情况下,说明MS的重视程度,显现出MS正在走向成熟。

   云模式,使得MS头一次拥有了涵盖互联网模式的平等话语权,这一点,对MS非常珍贵。

 

后记:VS IDE 2010得到了很多优化,感觉上编程比较透明化,这样也好!可以加快开发应用。--程序组件级装配的动态运行时代已经到来!模型驱动、测试驱动开发必将成为主流。

 

扩展文章:文章1文章2

 

以下为.NET4内容:

Microsoft .NET Framework 4 (Web Installer)

 

.NET 4 Revealed  (附:中文

                                                                 By Kathleen Richards 06/02/2009

 

The next-generation .NET Framework 4 and Visual Studio 2010 beta 1 bits reached developers' workstations last month, after a seven-month hiatus. The first -- and in some cases, only -- community technology previews (CTPs) appeared last October at Microsoft's Professional Developers Conference (PDC).

The updated framework promises maturing class libraries and new parallelism capabilities to facilitate the development of components that can take advantage of the intensive I/O capabilities of multi-core systems.

"With 4, I see less new things and more of an extension in terms of beefing up what's there-the Windows Communication Foundation, Windows Presentation Foundation, Workflow services," says Mark Driver, vice president of research at Gartner Inc. "I don't see a whole lot of new APIs but rather the evolution of the APIs that they introduced as part of 3.5."

 

Richard Hale Shaw has spent most of his time looking at the Base Class Libraries (BCL) and Common Language Runtime (CLR), which he describes as the "meat" of the framework. "I think sometimes [Microsoft] teams lose focus on what is it that is going to make a developer more productive that isn't being addressed in the current product and isn't being addressed by cute bells and whistles," says Shaw, CEO of The Richard Hale Shaw Group, a specialist in Microsoft development technologies.

.NET 4 marks the first major upgrade to the CLR since .NET 2.0, which debuted alongside Visual Studio 2005 and SQL Server 2005, and served as the execution environment for .NET 3.0 and .NET 3.5.

 

18-Month Tool Fest
Last month, Microsoft IT and developer professionals got a closer look at what's coming in .NET 4 beta 1 at Tech-Ed North America 2009 in Los Angeles, where the release candidates of Windows 7 and Windows Server 2008 R2 grabbed center stage. R2 includes the .NET Framework with a "server core" option that supports ASP.NET, IIS 7.5, Remote Management and PowerShell. (.NET 3.5 is the default framework.) Windows Mobile 6.5, the first version to include the new Market Place component, was officially kicked off at Tech-Ed. It ships with .NET 3.5 Compact Framework and SQL Server 3.5 Compact Edition.

The annual confab in May topped off an 18-month tool fest since .NET 3.5 and Visual Studio 2008 shipped in November 2007. During that span, Microsoft has introduced new data access tools-Language Integrated Query (LINQ) and related providers in the .NET 3.5 release and the beleaguered ADO.NET Entity Framework, an object-relational mapping model in .NET 3.5 Service Pack (SP) 1.

At Microsoft PDC in late October, developers were briefed on the upcoming Azure Services Platform for cloud computing and the new Live Framework for Live Services and Live Mesh.

In March, Microsoft continued to shore up its "standards-based" Web platform at its MIX09 Web developer and designer conference. The company showcased what's coming in ASP.NET 4 with improved AJAX, Dynamic Data and better Silverlight integration. The new Model-View-Controller (MVC) framework ASP.NET MVC 1.0 was released. Silverlight 3, which is expected to ship later this year, was announced, along with new .NET RIA Services.

All of these libraries and SDKs are part of the .NET Framework stack, or extensions, that rely on Visual Studio as the underlying tooling. As Microsoft packs it all into .NET, some concerns about the framework's size and performance are being addressed. The .NET 3.5 SP1 introduced a subset of the framework in the .NET Client Profile (28MB), compared to the entire 250MB download. Distribution size is further improved in .NET 4, according to Brian Goldfarb, Microsoft's director of developer and user experience platforms.

 

Updating the CLR
With .NET 4, Microsoft Group Program Manager Joshua Goodman says that the CLR team has worked hard on solving performance and compatibility issues. The core of the platform encompasses the just-in-time compiler, garbage collection, a security model, exception handling, profiling and debugging APIs, and the BCL.

 

Developers have run different versions of the framework side by side on the same box since .NET 1.1 was introduced in 2003. The .NET 4 CLR supports processes side by side in the same host, enabling components to use different versions of the CLR in the same application.

 

"If they can make that happen, I think it would be a big win," says Shaw.

 

SRT Solution founder Bill Wagner, who writes the Visual Studio Magazine C# Corner column, agrees. "This functionality is really critical for anyone who's doing any development with Office, where you're writing an add-in that gets loaded into another application."

 

Microsoft's "parallel story" is another critical facet of .NET 4 for both native and managed code developers. Parallel LINQ (PLINQ) is a declarative data programming model for executing queries in parallel. The Task Parallel Library (TPL) in the .NET Framework supports both task-and data-driven parallelism. A Coordination Data Structure manages the shared states.

 

Developers can expect to see numerous PLINQ, TPL and coordination-data structure updates in the .NET 4 beta; the TPL CTP released at PDC was based on code from July 2008. In beta 1, the default work scheduler for the TPL is now the .NET CLR Thread Pool. The team is also working on an improved algorithm so that the .NET Thread Pool can dynamically optimize the number of threads for a workload.

 

Shaw, who has looked at the early CTPs, likes what he's seen so far. "I kind of wish there was a little more abstraction in there but it's not bad the way they did it," he says. "My only gripe with the parallel libraries so far-and it's a minor one, because of the way they designed them-[is that] there are fewer opportunities to take advantage of some of the language features like extension methods and things like that. But that may happen if the language teams get their hands on them in a later release," he says.

 

The Dynamic Language Runtime services (hosting API, dynamic type system, dynamic methods and code generation), currently available on Microsoft's open source project hosting site CodePlex, are also part of the .NET 4 core platform. The DLR, which sits on top of the CLR, will support IronRuby, IronPython 2.0 (which was released in December), the upcoming Visual Basic 10.0 and Managed JScript. Dynamic support has also been added in C# 4.0.

 

Wagner, who says he's played with the dynamic language capabilities quite a bit, likes the C# features. "I think it is a very nice way to write code that is essentially statically typed code and get all the performance and compile time checking that comes along with the statically typed language and yet have ways to isolate areas where you want to use dynamic type checking or you want to interop with these things that are more dynamic," he says. "You can do Silverlight things and JavaScript as though it were in C#. You can interact with Python libraries or supply code that can be used for IronPython libraries."

 

"The one use case that is not played up as much is that you've got the ability to invoke .NET objects dynamically through the DLR and where that becomes a win is if you're currently using .NET objects via reflection," says Shaw.

 

In addition to Microsoft's implementations of dynamic languages in .NET, the new framework will support functional programming for the first time, specifically F#, which is developed by Microsoft Research.

 

"F# is going to be a standard language product in this release, which I think over the long haul is going to be a big, big win," says Shaw. "I see it as a great tool for a C# developer who understands it because you can't do functional programming as effectively in C# as you can in F#."

 

Technology that evolved out of Microsoft Research's Spec# is also making its way into .NET 4. The new Code Contracts in the BCL allow developers "to tell the compiler what they know" according to Microsoft's Goodman, by writing pre-conditions similar to assert.debug, post-conditions for exiting the code and object invariants. Some offline static analysis tools out of MSR are also included.

 

Yet Another Data Layer
Along with substantial improvements to ASP.NET, Microsoft has updated the ADO.NET framework class libraries. The confusion about which data access technologies to adopt with multiple frameworks and tools driven by different stakeholders within Redmond has left many developers frustrated. Microsoft is making some changes in .NET 4 that may make these choices clearer.

 

"We're making significant investments in the Entity Framework such that as of .NET 4.0 the Entity Framework will be our recommended data access solution for LINQ to relational scenarios," wrote Tim Mallalieu, Microsoft program manager, LINQ to SQL and Entity Framework (EF), in a blog post last October. "We are listening to customers regarding LINQ to SQL and will continue to evolve the product

based on feedback we receive from the community as well."

 

With .NET 4 beta 1, developers will likely get their first look at EF version 2. According to Microsoft, EFv2 adds support for n-tier APIs and templates, increases Plain Old CLR Objects (POCO) coverage and improves Persistence Ignorance, among other enhancements.

 

"I don't know that it's pure POCO," says Roger Jennings, principle of OakLeaf Systems and a VSM contributor. "The abstraction may be a little leaky; a little bit of the data table design may still be in the classes."

 

Change tracking in the client and state changes in n-tier apps will be handled to some extent by developers, according to a November posting by the EF Design team:

"[E]ntity Framework won't impose a pattern for N-Tier. Both DTO-style and DataSet-like experiences can be built on top of a minimal set of building blocks APIs. It is up to the developer to select the pattern that better suits the application."

 

While some developers may appreciate the flexibility and choice, others see it as more work.

"We want to make the developer experience much less about having to write low-level structures where they have to know the database schema and really to abstract them up to high-level programming that really targets the entities that they're trying to manipulate using the EDM [Entity Data Model]," asserts Burley Kawasaki, director of developer platform product management at Microsoft. "And then we take care of a lot of the lower-level mapping relational data, a lot of the infrastructure code that you would typically write."

 

Jennings, who uses LINQ to SQL today, is anxious to try out the updated technology. "The feature that will be most useful to me in .NET 4 will be Entity Framework version 2 primarily because I am going to be able to split it into tiers," he says. "Basically what it does is it enables you to run a disconnected Web service. Then you don't need ADO.NET Data Services anymore-you can get rid of that layer."

 

Connected to the Cloud
Microsoft is also advancing the foundation libraries that debuted in .NET 3.0, designed to help developers build business logic, presentation layers and identity management in .NET 4.

The service-oriented messaging model, Windows Communication Foundation (WCF), is now extended to support cloud services through .NET Services in the Azure Services Platform.

Microsoft is continuing to improve the integration between WCF 4 and Windows Workflow Foundation (WF) 4. "A big piece of what we are doing is making the programming very fluid between WF and WCF," says Kawasaki. "We started a little in 3.5 and you will see in .NET 4 that we take that even further." Developers can now use a consistent declarative model (XAML stack) underneath WF, WCF and Windows Presentation Foundation (WPF).

 

Much has been made of the rebuilding of WF 4. Feedback on WF indicated that some developers preferred to use configurations or models, says Kawasaki. "So Microsoft is extending the model so that you can do much more declarative programming and trying to limit the cases where you need to write code in defining the workflow."

 

The team has also focused on making it easier for developers to not have to choose between performance and maintenance. WF 4 is showing 10X improvements in internal benchmarking of the raw executions of workflow, according to Kawasaki, who says it is used in Team Foundation Server for Visual Studio Team System 2010.

 

Building composite apps that connect Web and data services should get easier as these frameworks and tools advance. WCF 3.5 added support for RESTful services. With EDM and RESTful services, developers can call business data as opposed to writing lower-level SQL statements, in effect tying together datagrids, data services and the EF, according to Kawasaki. A new Windows Web Services API enables native code in apps such as Windows 7 and Windows Server 2008 R2 to interop with WCF.

 

WPF 4 is perhaps the most critical technology for Microsoft. Visual Studio 2010 will feature a new shell built using WPF 4.

 

Many developers hope the integration of WPF into Visual Studio is going to have a positive effect on WPF performance and WPF adoption. "It isn't just a flagship app, but a resource-intensive app. [It has] a community of users that's far more concerned about performance than a lot of other things, which means that the WPF integration and the necessary changes to both the IDE and to the framework-[and] the WPF libraries to make those work well-is going to be probably the biggest critical success factor," explains Wagner. "It is going to either help both Visual Studio and WPF or hurt them both."

 

"With .NET 4, WPF gets 25 to 40 percent faster automatically," says Goldfarb, "just by moving your application forward." WPF 4 will offer multitouch support, better text clarity and pixel snapping, among other enhancements. A new Windows 7 Ribbon Control is subject to the Office Fluent UI License.

Even so, many enterprise developers are frustrated with the lack of basic WPF controls, which requires them to look to third-party options. Microsoft also has no plans to implement an MDI solution at the framework level despite repeated customer requests.

 

The Managed Extensibility Framework (MEF), currently available on CodePlex, is also part of .NET 4. It's a component system that offers a standard way to build apps with add-ins. The new Visual Studio 2010 shell is built on a subset of WPF and MEF.

New Class of Developer

As Microsoft continues to push .NET into the enterprise, critical technologies such as EF-added specifically to attract that audience-and WPF still appear unfinished in .NET 4.

 

".NET has made it much more realistic to consider Microsoft for these [higher-end] solutions but here's the problem," says Gartner's Driver. "When I am building an application with a five- to 10-year lifecycle, and that application is truly running my business, I am highly motivated to keep that thing stable-I don't want to rewrite the code every three years because they've introduced some latest and greatest new things.

 

"Now in the past, Microsoft could have gotten away with that because the average Visual Basic program only lasted three to five years. All of a sudden with .NET, they have a whole new class of developer," he says.

 

Microsoft's Kawasaki and Goldfarb acknowledge the challenges of trying to offer stability for enterprise developers and at the same time provide agility for developers interested in the latest technologies. "That's why we're putting a lot of focus on interoperability, being able to extend existing apps to run side by side," says Kawasaki. "That's a core tenant of .NET, as well as a lot of incremental enhancements that are very targeted for consumption for [your] type of app."

Driver thinks that over time Microsoft will be forced to keep larger portions of the platform more stable. "I don't think the changes in 4 are enough to warrant a major problem," he says. "It's not like they've thrown things out. They're not reinventing things in the CLR. But I do expect organizations that perhaps would have been much more aggressive in updating to the latest versions to take a more measured approach this time, and perhaps go through a bit more regression testing and those kinds of things."

 

Shaw also anticipates a slower adoption. "We've already seen resistance from customers migrating up to new frameworks even when there wasn't a new CLR, just new libraries," he says. "Their IT personnel freak out at the idea of new stuff on the box-including developer boxes and server boxes they have to support.

 

"With VS 2005/.NET 2.0, there was a lot of resistance to moving up to that new CLR," he recalls, "even though in my opinion it was a largely non-obtrusive upgrade and Microsoft did a great job of documenting the 97 or 98 really odd circumstances when that CLR would actually interfere with your system."

 

.NET 4 is a maturity wave, rather than a wave where Microsoft is introducing a bunch of new framework-level components, says Steven Martin, senior director of developer platform product management at Microsoft.

 

"When we find that developers are building the same thing over and over again, we think: Is that something we could productize to help them move to the next level in development? We have significant work going on right now to help us understand what some of those new app patterns are," he says.

 

"Clearly, as we move to a world where we're building applications that are truly composite, that take advantage of services that live in a cloud environment and a premises environment and [are] being authored by developers that are really aggregating services that other developers are creating," says Martin, "we think that that gives us an opportunity to look for additional components that we might offer in the framework and we will have more to talk about there over time."

 

The final release of .NET 4 and Visual Studio 2010 is likely around PDC2009 in November or early next year. Either way, .NET 4 is expected to have a Go Live license by the end of 2009.

Shaw is anxious to move past the virtual PCs and try out features in the new framework on a regular machine. "I'm hoping they will do that with these betas," he says. "Because otherwise, it kind of delays your ability to find out what happens when the framework meets the metal." 

 

Kathleen Richards is the editor of RedDevNews.com and executive editor of Visual Studio Magazine.

 

MEF参见

  • 大小: 32.3 KB
  • 大小: 72.3 KB
分享到:
评论

相关推荐

    .NET Framework 4.0 常用类库参考手册 [微软官方 MSDN]

    包含用于定义常用值和引用数据类型、事件和事件处理程序、接口、特性和处理异常的基础类和基类。其他类提供支持下列操作的服务:数据类型转换,方法参数操作,数学计算,远程和本地程序调用,应用程序环境管理以及对...

    NetAdvantage for Web Client 2009 Vol. 2 - ASP.NET Service Release on 29-01-2010 part 1

    NetAdvantage for Web Client 2009 Vol. 2 - ASP.NET Service Release [.NET CLR 2.0] v2009.2.2056 released on 29-01-2010

    Pro .NET Framework with the Base Class Library Pdf

    The author first gives an introduction to the .NET Framework and describes the architectural and engineering resources required when implementing the .NET Framework on any platform. Next, you will ...

    ASP.NET------AJAX教程

    .Net Remoting是通用语言运行时环境(CLR)集成机制,用于跨应用域边界与对象进行通信,可以提供非常灵活的扩展模型;企业服务提供了在分布式环境下执行相关工作的多方集成事务的功能,拥有丰富的安全模型,而且是...

    .NET Framework中CTS、CLS、CLR

    关于.NET Framework中CTS、CLS、CLR的详细说明

    CLR via C# Applied Microsoft.NET Framework Programming, second edition

    .net framework book, it's the 2nd edition which shows you how CLR works and what you should be clear on developping with .net framework

    ASP.NET 3.5 开发大全11-15

    第12章 ASP.NET的皮肤、主题和母版页 12.1 皮肤和主题 12.1.1 CSS简介 12.1.2 CSS基础 12.1.3 CSS常用属性 12.1.4 将CSS应用在控件上 12.1.5 主题和皮肤 12.1.6 页面主题和全局主题 12.1.7 应用和禁用主题 12.1.8 用...

    ASP.NET 3.5 开发大全1-5

    第12章 ASP.NET的皮肤、主题和母版页 12.1 皮肤和主题 12.1.1 CSS简介 12.1.2 CSS基础 12.1.3 CSS常用属性 12.1.4 将CSS应用在控件上 12.1.5 主题和皮肤 12.1.6 页面主题和全局主题 12.1.7 应用和禁用主题 12.1.8 用...

    Microsoft .NET Framework 4

    .NET Framework 是由 Microsoft 开发的一种全面且一致的编程模型,用于生成具有视觉震撼力的用户体验、无缝的安全通信和对一系列业务流程进行建模的能力的应用程序。 .NET Framework 4 将与旧的 Framework 版本并行...

    .NET CLR via C#(第4版) 最新完整版 高清文字版

    本书针对clr、C#5.0和.net framework 4.5进行深入、全面的探讨,并结合实例介绍了如何利用它们进行设计、开发和调试。 本书深入、全面探讨.NET Framework、CRL和多核编程,广泛讨论FrameworkClassLibrary(FCL)核心...

    CLR.via.Csharp.4th.Edition.Oct.2012.pdf

    深入学习并精通CLR、C#和.NET开发。Jeffrey Richter 长期担任Microsoft .NET团队开发顾问----你会了解如何构建强壮、可靠的应用程序和组件。 更新至.NET Framework 4.5 和Visual Studio 2012 全面阐述 .NET ...

    .net Framework 试卷

    .net试卷,题型有填空、问答、程序填空、看程序写结果,考试内容涉及CLR相关概念、编程、安全机制等

    C# .NET 课件 最好的

    C#.net.NET Framework由框架类库(FCL)和公共语言运行时(CLR)两个主要组件构成 CLR是管理用户代码执行的现代运行时环境,它提供JIT 编译、内存管理、异常管理和调试等方面的服务 CTS定义声明、定义和管理所有...

    NETFramework-v4.8.zip

    从层次结构来看,.NET框架又包括三个主要组成部分:公共语言运行时(CLR:Common Language Runtime)、服务框架(Services Framework)和上层的两类应用模板——传统的Windows应用程序模板(Win Forms)和基于ASP ...

    Infragistics NetAdvantage for ASP.NET 2007 Vol.3 CLR2 Source

    Infragistics NetAdvantage 2007 Vol.3 用于.NET framework 2.0 ASP.NET的源代码 版本号是v7.3.20073.1043

    .NET Framework 4.5新特性介绍

    开发者预览版.net 4.5 .NET for Metro style appsMetro风格的应用...核心新功能和改进以下这些功能和改进被添加到公共语言运行时(CLR)和.NET的类内:-设置正则表达式执行匹配的超时时间-为应用程序域设置区域性信息

    使用_.Net_Memory_Profiler_诊断_.NET_应用内存泄漏(方法与实践)

    用 .NET Memory Profiler 跟踪.net 应用内存使用情况--基本应用篇 .NET Memory Profiler 跟踪.net 应用内存使用情况--基本应用篇

    从CLR 到framework 到 .net core 、 ASP.NET CORE.md

    从CLR 到framework 到 .net core 、 ASP.NET CORE.md

    .NET-MetricsNet捕捉CLR和应用级监测

    Metrics-Net - 捕捉CLR 和应用级监测,让你请清楚发生了什么

    CLR.NET底层原理04版本

    CLR.NET底层原理04版本

Global site tag (gtag.js) - Google Analytics