In 2007 ScottGu's team announced they were releasing the .NET Framework source code for reference. Just a little later, Microsoft made it possible to step through the .NET Framework Source code while debugging. This was announced to much fanfare, and for a while, it was very cool. It wasn't "Open Source" but it's definitely "Source Opened."
2007年,ScottGu的团队宣布将发布.NET Framework源代码以供参考。 不久之后,Microsoft使调试时逐步浏览.NET Framework源代码成为可能。 宣布此事大张旗鼓,有一段时间,它非常酷。 它不是“开放源代码”,但绝对是“开放源代码”。
However, as time passed, the original Reference Source website for the .NET Framework sucked for a number of reasons, mostly because it wasn't updated often enough.
但是,随着时间的流逝,.NET Framework的原始参考源网站由于许多原因而陷入困境,主要是因为更新频率不够高。
Fast forward to today...we're back and the .NET team is launching the fresh new and updated .NET Reference Source site with a Roslyn-powered index!
时光倒流到今天...我们回来了, .NET团队正在启动全新的,更新的.NET参考源。 具有罗斯林索引的网站!
The new beta site is at http://referencesource-beta.microsoft.com and it'll move over to replace the existing http://referencesource.microsoft.com site soon.
新的Beta版站点位于http://referencesource-beta.microsoft.com ,它将很快替换现有的http://referencesource.microsoft.com网站。
It's easy to browse the code, but if you'd prefer you can also download the .NET Framework source in a ZIP from the download link at the top of the site.
浏览代码很容易,但是如果您愿意,也可以从站点顶部的下载链接以ZIP格式下载.NET Framework源代码。
Roslyn支持的.NET参考源浏览器 (The Roslyn-powered .NET Reference Source browser )
There's some very cool .NET-related stuff happening this year, and you'll be hearing about it all soon. The new "Roslyn" compiler-as-a-service replacements for the C# and VB compilers have had the "Big Switch" flipped. We're now getting an amazing totally-rewritten managed compiler that can enable features that weren't possible when .NET started over a decade ago.
今年发生了一些非常酷的与.NET相关的事情,您很快就会听到这一切。 C#和VB编译器的新的“罗斯林”编译器即服务替代品已翻转了“大开关”。 现在,我们得到了一个令人惊叹的完全重写的托管编译器,该编译器可以启用.NET十年前启动时无法实现的功能。
Today there's a new team working on the .NET Reference Source, and Roslyn let the team generate a complete syntactic and semantic index of the .NET Framework Sources.
今天,有一个新的团队致力于.NET参考源,而Roslyn让该团队生成.NET Framework Sources的完整语法和语义索引。
From the team: The version of the framework that we currently have indexed is .NET framework version 4.5.1. If this is something that folks agree is useful, our ongoing commitment towards this feature is to update this every major release i.e. an update for 4.5.2 and so on.
来自团队的信息:我们当前已索引的框架版本是.NET Framework 4.5.1。 如果人们都认为这是有用的,那么我们对该功能的持续承诺是更新每个主要版本,即4.5.2的更新,依此类推。
This is a crucial feature, IMHO, and they are recommitted to making it happen, and most importantly, keeping it fresh and updated. They are also thinking about maybe using the Monaco editor for the site as well.
这是一项至关重要的功能,恕我直言,并且他们致力于使其成为现实,并且最重要的是,使它保持最新和更新。 他们还考虑在该网站上也使用摩纳哥编辑器。
Be sure to explore the browser and click on everything, as there's a lot more there than just "search box and results."
确保浏览器并单击所有内容,因为这里不仅有“搜索框和结果”,还有更多的内容。
Here's a few cool things you can do with the URLS on the new site that you should explore. I like being able to reference a line number in the URL for tweeting or IM'ing.
您可以使用新网站上的URLS做一些有趣的事情。 我喜欢能够在URL中引用行号以进行Twitter或IM'ing。
Link to assembly /#System.Core
链接到程序集/#System.Core
Link to file /#mscorlib/system/environment.cs
Link to line number /#mscorlib/system/environment.cs#56
Link to a type/member /mscorlib/a.html#1f55292c3174123d (right-click the definition and choose Copy Shortcut)
链接到类型/成员/mscorlib/a.html#1f55292c3174123d (右键单击定义,然后选择“复制快捷方式”)
Link to search results /#q=Button%20PresentationFramework
There's also a lot of flexibility in the search:
搜索还具有很大的灵活性:
- Search for any full or partial type, or member name. 搜索任何完整或部分类型或成员名称。
- Add any keyword like assembly, type, class, struct to filter the results 添加任何关键字,例如程序集,类型,类,结构以过滤结果
Find projects by path like ndp\fx\src\data
通过ndp \ fx \ src \ data等路径查找项目
Find string literals like GUIDs: 03973551-57A1-3900-A2B5-9083E3FF2943
查找类似于GUID的字符串文字: 03973551-57A1-3900-A2B5-9083E3FF2943
You can also actually click on types directly within the editor and find where they are referenced in the code.
您实际上也可以直接在编辑器中单击类型,然后在代码中找到它们的引用位置。
They will switch the beta site at http://referencesource-beta.microsoft.com/ to take over the existing Reference Source site soon. Until then, use the Feedback link on the site and email the team directly! They are listening and actively working on this site.
他们将切换http://referencesource-beta.microsoft.com/的Beta网站,以很快接管现有的Reference Source网站。 在此之前,请使用网站上的“反馈”链接并直接向团队发送电子邮件! 他们正在聆听并在此站点上积极工作。
The next thing the team is working on, and they are very close, is getting .NET Source Stepping (meaning you can just F11 into the .NET source code) to again work reliably when debugging, no matter what patch version you have of the .NET Framework on your local machine. Look for that in a few days on the .NET Team Blog.
团队接下来要做的事情是,他们非常接近,这使.NET Source Stepping(意味着您只需将F11插入.NET源代码)就可以在调试时再次可靠地工作,无论您使用的是哪个补丁程序版本。本地计算机上的.NET Framework。 几天后在.NET Team Blog上查找。
奖励:社区Visual Studio扩展 (BONUS: Community Visual Studio Extension )
Here's an exciting bonus. Community member and fabulous coder Schabse Laks has created a Visual Studio extension for VS2010, 2012, and 2013! This extension sends calls to Go To Definition (or pressing F12 on a symbol) directly to the code online (when it's .NET Framework code, not yours).
这是令人兴奋的奖金。 社区成员和出色的编码员Schabse Laks为VS2010、2012和2013创建了Visual Studio扩展! 此扩展名将调用转到定义(或在符号上按F12)的调用直接发送到在线代码(如果是.NET Framework代码,而不是您的代码)。
You can download this companion "Ref12" Visual Studio Extension now! Just Goto Definition on any .NET type we have source for and it'll launch your default browser so you can explore the .NET Framework source yourself! Thanks Schabse!
您可以立即下载此配套的“ Ref12” Visual Studio Extension ! 只要找到我们拥有源代码的任何.NET类型的Goto Definition,它就会启动您的默认浏览器,因此您可以自己探索.NET Framework源代码! 谢谢沙伯!
.NET参考源代码许可已阐明 (.NET Reference Source Code Licensing Clarified )
Finally, the licensing before was originally the very straightforward Microsoft Reference Source License, but then started to get other caveats tacked on like "don't look at this if you aren't using Windows" until it wasn't really the MS-RSL at all.
最后,以前的许可原本是非常简单的Microsoft参考源许可,但随后开始引起其他警告,例如“如果您不使用Windows,请不要看这个”,直到它不是MS-RSL为止完全没有
They've changed that stuff. They're back to the straight MS-RSL which is easy to read and clear. This means that folks can now look at this Reference Source and not have to gouge their eyes out afterwards. Which is great!
他们已经改变了这些东西。 它们又回到了易于阅读和清除的简单MS-RSL 。 这意味着人们现在可以查看此参考资料源,而不必再大惊小怪了。 太好了!
We all hope you like the new site and the team looks forward to your comments!
我们都希望您喜欢新站点,并且团队期待您的评论!
Sponsor: Big thanks to Red Gate for sponsoring the blog feed this week! Easy release management: Deploy your SQL Server databases in a single, repeatable process with Red Gate’s Deployment Manager. There’s a free Starter edition, so get started now!
赞助商:非常感谢Red Gate本周赞助了博客提要! 轻松的发布管理:使用Red Gate的Deployment Manager在一个可重复的过程中部署SQL Server数据库。 有一个免费的简化版,请立即开始!
翻译自: https://www.hanselman.com/blog/announcing-the-new-roslynpowered-net-framework-reference-source