Microsoft 参考源代码系统更新,有惊喜哦。

博客介绍MS已升级其参考源代码,不仅支持RTM版本,还覆盖了各更新版本的.NETFX4.5.1,并提供了在线浏览与离线下载功能。分享了包含C++代码在内的多个WPF关键目录,如detours、打印部分、Hosting系列代码等,以及完整的编译器源代码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在以前,MS的参考源代码在单步调试时时好用时不好用,最后我找到了原因,那就是如果想用MS的参考源代码进行单步调试,那么你就得想尽办法把系统上的.NET FX降级到RTM版本(卸载各种相关补丁),今天我收到了MS的User Voice发来的邮件,告诉我参考源代码已经升级,不仅RTM版本可用,各个更新后的版本也可用(虽然仅仅针对.NET FX 4.5.1)。

OK,打开 http://blogs.msdn.com/b/dotnet/archive/2014/02/24/a-new-look-for-net-reference-source.aspx。

发现有在线浏览功能,和离线打包下载,下载回来的代码是有解决方案和项目文件的,也就是在VS里面直接能导航等。

在线浏览归功于 http://msdn.microsoft.com/en-US/roslyn ,微软的Roslyn项目,VS系列编译器的未来。

在线示例:http://referencesource-beta.microsoft.com/#mscorlib/system/environment.cs

我下了离线源代码:
http://referencesource-beta.microsoft.com/download.html

然后发现了许多我曾经有兴趣并想研究的代码(包含了部分C++代码):
DotNetReferenceSource.zip\Source\wpf\src\Shared\detours ,此目录包含了微软http://research.microsoft.com/en-us/projects/detours/项目的完整版本,版本号是Version 3.0 Build_306.注意MS上有社区版本,只支持X86,不支持AMD64,而这个是全的,支持X86 AMD64 IA64 ARM,以前在MS网站上卖的很贵的哦(刚才没找到卖的连接)。

 

DotNetReferenceSource.zip\Source\wpf\src\printing\cpp  此目录包含了WPF系统打印部分代码。

 

DotNetReferenceSource.zip\Source\wpf\src\host 此目录包含WPF的Hosting 系列代码,就是在浏览器里面加载xaml进行渲染的部分。这是我曾经关注的。

 

DotNetReferenceSource.zip\Source\wpf\src\Graphics\include 这个没代码,仅有相当于头文件的c#文件,但研究过WPF底层的朋友们会发现此处有很多结构体,正式WPF托管部分和Native引擎交互通信用的数据交换结构。

 

DotNetReferenceSource.zip\Source\wpf\src\Core\cpp\dwritewrapper C++代码,没细看

DotNetReferenceSource.zip\Source\wpf\src\Core\cpp\truetypesubsetter 这个就比较有料了,WPF字体模糊是什么原因估计这部分代码能让你明白,他是用来栅格化truetype字体的,wpf的字体不是gdi渲染出来的,有自己的渲染引擎,估计就是这个了。

 

DotNetReferenceSource.zip\Source\vb 这个目录是相对最完整的,包含了C++代码的VB源代码的编译器,你没看错,是编译器!而且不仅是编译器,还有很多好东西。

ok,Enjoy Yourself!

源码dll: ComSvcConfig mscorlib PresentationBuildTasks PresentationCore PresentationFramework PresentationFramework.Aero PresentationFramework.Classic PresentationFramework.Luna PresentationFramework.Royale SMDiagnostics SMSvcHost svcutil System System.Activities System.Activities.Core.Presentation System.Activities.DurableInstancing System.Activities.Presentation System.AddIn System.AddIn.Contract System.ComponentModel.DataAnnotations System.Configuration System.Core System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.Services System.Data.Services.Client System.Data.Services.Design System.Data.SqlXml System.Drawing System.IdentityModel System.IdentityModel.Selectors System.IO.Log System.Management System.Messaging System.Net System.Numerics System.Runtime.Caching System.Runtime.DurableInstancing System.Runtime.Remoting System.Runtime.Serialization System.Security System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Transactions System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Windows.Forms System.Workflow.Activities System.Workflow.ComponentModel System.Workflow.Runtime System.WorkflowServices System.Xaml.Hosting System.Xml System.Xml.Linq UIAutomationClient UIAutomationClientsideProviders WindowsBase WsatConfig WsatUI XamlBuildTask
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值