(Actually between the BCL Version 2.0.50727.42 and 2.0 (Version 2.0.50727.1378)
(实际上是在BCL版本2.0.50727.42和2.0之间(版本2.0.50727.1378)
I was thinking that while folks are blogging about all the new stuff in .NET 3.5 and VS2008 (or VS3.508 as I think to think of it) there must be other fixes here and there in the Base Class Library itself.
我当时以为,尽管人们在博客中撰写有关.NET 3.5和VS2008 (或我认为是VS3.508)中所有新内容的文章,但基类库本身中肯定还有其他修补程序。
I googled around and couldn't find a list of what's changed in the BCL. I'm sure it's out there somewhere and I've missed it and the second I post this someone will post a better list in the comments, but anyway...
我四处搜索,找不到BCL中发生的变化的列表。 我确定它在某处,我已经错过了,我第二次发布该帖子时,有人会在评论中发布更好的列表,但是无论如何...
First, I look in C:\windows\assembly with Explorer. Remember that this is a "lie" - what you're seeing is a namespace extension's representation of the Global Assembly Cache, although a very useful one. Here's the new 3.5 stuff, sorting by version. This stuff is near all new. New assemblies, etc.
首先,我使用资源管理器查看C:\ windows \ assembly。 请记住,这是一个“谎言”-您看到的是名称空间扩展表示的Global Assembly Cache,尽管这是一个非常有用的表示。 这是新的3.5版本,按版本排序。 这东西几乎是所有新东西。 新装配等
Nothing in here appears to have "rev'ed" like moving from 2.0 to 3.5 and kept the old version. One might expect to see System.Web 2.0 and then System.Web 3.5, but that's not the case from what I can see.
这里似乎没有什么比从2.0到3.5并保留旧版本“修订”的了。 可能有人会看到System.Web 2.0,然后是System.Web 3.5,但是从我所看到的情况来看,情况并非如此。
There is, however, a large amount of new (what I would call) BCL stuff in the new System.Core assembly. Remember that namespaces can exist across assemblies, so releasing a new assembly is a pretty decent way to get sweeping additive changes across a few dozen namespaces in a very compatible way.
但是,新的System.Core程序集中有大量新的BCL东西(我称之为)。 请记住,名称空间可以存在于程序集之间,因此发布新程序集是一种非常不错的方法,可以以非常兼容的方式在数十个名称空间中进行全面的附加更改。
Reflector says that System.Core includes new things in System.Threading, System.IO, System.Security, System.Diagnostics, and more. I would encourage you (as I do everyone who will listen) to download Reflector and do this:
Reflector说System.Core在System.Threading,System.IO,System.Security,System.Diagnostics等中包含新功能。 我鼓励您(就像我每个人都会听的一样)下载Reflector并执行以下操作:
- Run Reflector 运行反射器
- Hit the Home key on your keyboard 按下键盘上的Home键
- Hold down Delete until Reflector's window is clear 按住Delete键直到Reflector的窗口消失
- Press Ctrl-L, then Enter按Ctrl-L,然后按Enter
...and you'll get this dialog. Reflector is smart enough to prompt you to fill up your empty assembly list, and the defaults are so useful that I usually just delete everything and pick one of these.
...您将看到此对话框。 Reflector非常聪明,可以提示您填写空的程序集列表,默认设置非常有用,以至于我通常只删除所有内容并选择其中之一。
![Start Default Assembly List](https://i-blog.csdnimg.cn/blog_migrate/48b5bda823dc2df0e8f1ce44b0796f6a.png)
As you move around in Reflector, notice the "Location:" arrea at the bottom that tells you where the assembly is (although there are copies in the GAC).
在Reflector中移动时,请注意底部的“位置:”区域,该区域告诉您程序集在哪里(尽管GAC中有副本)。
Look at all the assemblies in the .NET 3.5 list and you'll see which ones live in the 2.0 directory, the 3.0 directory and the 3.5 directory.
查看.NET 3.5列表中的所有程序集,您会看到哪些程序集位于2.0目录,3.0目录和3.5目录中。
While 3.5 is huge conceptually, on disk it's very small, consisting of the new compilers and basically these three assemblies:
尽管3.5从概念上来说是巨大的,但在磁盘上却很小,它由新的编译器以及基本上这三个程序集组成:
- System.Core 系统核心
- System.Data.Linq 系统数据
- System.Xml.LinqSystem.Xml.Linq
There are other assemblies for MSBUILD improvements and such, but it's still very compact, from a "redistributable" point of view.
还有其他程序集可用于MSBUILD的改进,但从“可分发”的角度来看,它仍然非常紧凑。
I would personally recommend that anyone who hasn't moved their 1.1 shop over to 2005, or who is starting out with .NET to just start with 2008/3.5. The multi-targeting stuff is very slick (I'll do a dissection soon, more detailed that ScottGu's post)
我个人建议那些没有将1.1商店迁移到2005年的人,或者从.NET开始只是从2008 / 3.5开始的人。 多目标的东西非常漂亮(我将尽快进行解剖,比ScottGu的帖子更详细)
有什么变化吗? (Has Anything Changed?)
I wanted to find out what's changed between a standard Windows XP SP2 machine - totally fresh - with just the 2.0 runtime distributable installed, and my Vista machine with 3.5 on it.
我想找出在仅安装了2.0运行时可分发的标准Windows XP SP2机器与装有3.5的我的Vista机器之间发生了什么变化。
There's a really great, but largely unknown, tool called Libcheck that you can download for free, that'll compare two versions of an assembly and show you the differences in a report. It'll look only at the public (inter)face of the assembly. In this case, that's exactly what I want.
您可以免费下载一个名为Libcheck的非常不错的工具,但它在很大程度上未知,您可以免费下载该工具,该工具将比较程序集的两个版本并在报表中向您显示差异。 它只会查看程序集的公共(接口)表面。 在这种情况下,这正是我想要的。
It doesn't look to have been changed since 2005, so first I need to download and compiled it and hope it works. Fortunately it comes with source code and rather than spending time converting it to 2008, I just run the included nmake.bat that builds the three supporting libraries it needs and spits out libcheck.exe. Nice and easy (and lazy). There's a couple of obsolete warnings, but they're obsolete, not dead.
自2005年以来,它似乎没有发生变化,因此首先我需要下载并编译它,并希望它能工作。 幸运的是,它附带了源代码,而不是花时间将其转换为2008,而是运行包含的nmake.bat来构建所需的三个支持库并吐出libcheck.exe 。 容易又好(又懒)。 有几个过时的警告,但它们已经过时,没有死。
First, I brought up my 2.0 XP SP2 VM (again, fresh) and ran the .NET 2.0 Redistributable Package on it. This would be version 2.0.50727.42.
首先,我启动了我的2.0 XP SP2 VM(再次,全新),并在其上运行了.NET 2.0可再发行组件包。 这将是版本2.0.50727.42。
I went to the Libcheck folder and ran this command:
我去了Libcheck文件夹并运行了以下命令:
libcheck -store all org2.0
...and libcheck created a database of all the schmutz in 2.0.
...并且libcheck在2.0中创建了所有schmutz的数据库。
Then I ran the same thing on my Vista machine with 3.5 - remembering that it's just going to look at the 2.0 Framework stuff on my system. This version of 2.0 was 2.0.50727.1378.
然后,我在带有3.5的Vista机器上运行了同一件事-记住它只是要查看系统上的2.0框架。 这个版本的2.0是2.0.50727。 1378年。
libcheck -store all 2.0
Notice that one was "org2.0" and the other '"2.0." I then copied all the org2.0 folder off my VM and onto my main machine, then ran:
注意,一个是“ org2.0”,另一个是“ 2.0”。 然后,我将所有org2.0文件夹从虚拟机复制到主机上,然后运行:
libcheck -compare org2.0 2.0
The Report appeared in a folder called org2.0to2.0. Then I copied the report up to my blog, and it's available here.
该报告出现在一个名为org2.0to2.0的文件夹中。 然后,我将该报告复制到我的博客中,并在此处提供。
Note: You can modify the text files in /RefFiles and use LibCheck on your own framework internal to your company. That's what we did at Corillian. There is apparently a much better version of this tool (this one is 3 years old) internal to Microsoft. I'll see what I can do to free it.
注意:您可以在/ RefFiles中修改文本文件,并在公司内部的自己的框架上使用LibCheck。 那就是我们在Corillian所做的。 显然,Microsoft内部有此工具的更好版本(该版本已有3年历史了)。 我将看到如何释放它。
The percentage of churn was in the single digit percentages. Personally I find the report a fascinating read. You can see what was breaking, what was just added. You can see where new enums appeared and where overrides became virtuals and all sorts of things. Check it out, it's not that scary.
流失百分比以个位数百分比表示。 我个人认为该报告引人入胜。 您可以看到正在中断的内容,刚刚添加的内容。 您可以看到新的枚举出现在哪里以及替代在哪里变成虚拟以及各种各样的东西。 检查一下,这并不可怕。
翻译自: https://www.hanselman.com/blog/changes-in-the-net-bcl-between-20-and-35