Following Build conference, many people may ask what is new in the .NET Framework.
Well, you could find out by examining the documentation, but then you are limited to what it covers. If you want to know ALL that is new / updated in the .NET Framework, read on..
You can use the following method to easily find the difference between .NET Framework 4.5 and its previous version, .NET Framework 4.0!
In this post I will show you how you can use the tool NDepend to compare two versions of a DLL which is part of the .NET Framework.
I've already done it major parts of the framework and found interesting results! Unfortunately, I don't have the time to publish my results since I'm going out on vacation for a month. So I leave you with these instructions on how to dig easily in the right places.
NDepend is a tool for static analysis of .NET code. It has many features including the ability to run both predefined and custom queries against the code base.
These queries let you evaluate the quality of the code.
Another neat feature of NDepend is the ability to compare two versions of the same DLL. This lets you see progress between different builds of your project. Note that you don't need the actual code, you compare the actual DLLs.
Using NDepend to compare DLLs that are part of the .NET Framework is not trivial, but can be done. This post will show you exactly how.
You should have NDepend on your computer, download it here.
We will compare two different versions of the file mscorlib.dll
Some assumption before we continue:
- The .NET Framework v4.0 version of the file resides in: C:\NET\v4.0\mscorlib.dll
- The .NET Framework v4.5 version of the file resides in: C:\NET\v4.5\mscorlib.dll
Step 1: Create an NDepend project for each version of the .NET Framework
In this section we will analyze each version of the DLL in a different project, so the following steps will be done twice. On the next step we will compare the two project results.
Launch NDepend and select Create Project…
Fill the fields Project Name and Location and press OK.
Select Browse… and choose the first file: C:\Net\v4.0\mscorlib.dll
Now select View Folders that contain .NET assemblies to analyze
Select the .NET Framework folders that were automatically added and remove each one of them by right-clicking and selecting Remove
Finally, click the green Play button or simply press F5 to start analyzing the DLL
When the analyze is finished you should see some statistics about the selected DLL and you will have options to manually analyzing the file. For our purpose we can simply skip this and close the application (entirely).
Now repeat these instructions to analyze the second version of your DLL. Don't forget to remove the .NET Framework folders!
Step 2: Compare between the NDepend projects
In this step we will compare the two project results from the previous step.
Launch NDepend and select Compare: 2 versions of a code base
Select the projects you have created in the previous step. Make sure you put the older version on the left and the newer version on the right.
That's it! now you can easily compare the two versions. For example, you can check which types are new in the new DLL version, or which types have changed, etc..
That's it for now,
Got back from Build conference. Since I expect many people will ask me "So, what's new?" and since the answer is rather complex, I figured I should try to write a post about it, so here goes…
- Windows 7 sold (i.e. legal copies) over 450,000,000 copies since it was released.
- Windows 7 bypassed Windows XP in world usage.
- Windows 8 will be used primary for tablets and other touch-based devices.
- Windows 8 can run on Intel-based processors or ARM-based processors.
- Windows 8 consumes fewer resources than Windows 7 and has the same hardware requirements.
- Windows 8 has a new user interface, used primarily with touch screens but supports fallback to mouse and keyboard, applications that uses the new user interface are called "Metro-style applications".
- All participants of the Build conference received a Samsung tablet with a preview release of Windows 8, that has the following spec:
- Intel Core i5
- 4GB DDR3
- 64GB SSD
- 11.6" diagonal, 1366x768 display
- Included dock and USB keyboard
- Windows 8 Developer Preview version can be downloaded here.
Windows 8 for Developers
- There is a new way to expose Windows API named Windows Runtime or WinRT.
- WinRT is completely native and is built above COM with the addition of inheritance, generics, delegates and more. Basically WinRT = Modern COM.
- WinRT doesn't cover all previous Win32 APIs.
- WinRT API follow a guideline that says that every API which might take more than 50ms should be async. As a result a lot of WinRT APIs are async.
- WinRT includes a native UI framework, XAML-based, for building Metro-style applications.
- The XAML of the new WinRT UI framework resembles Silverlight XAML rather than WPF XAML.
- Metro-style applications can be built in the following technologies:
- C++ and XAML
- C# and XAML
- VB.NET and XAML
- A Metro-style application can collaborate with another Metro-style application without knowing him at all using several contracts that Windows 8 defines, e.g. share source contract and share target contract.
- Metro-style applications should define the capabilities they use, similar to Windows Phone applications. At runtime these declarations are enforced.
- C++ has new extensions that allows easy integration with WinRT, these extensions follow a syntax similar to C++/CLI, only they are completely native.
- The next version of .NET Framework is 4.5, nothing too exciting there.
- There is a preview version Visual Studio 11 and Expression Blend 5.
- New in Visual Studio 11:
- Added new project templates for developing Metro-style applications in all the supported languages.
- Productivity Power Tools incorporated into Visual Studio 11.
- New features for agile development including: Sprint Planning, Managing Task Board, Performing Code Reviews.
- XAML properties editor is the same as the corresponding Blend editor.
- Deploy to the new Windows App Store directly from Visual Studio 11.
- Added tools for viewing and basic editing 3D models, images, textures and also for debugging DirectX based output.
- Added feature that allows searching for code duplication based on semantic tree instead of simple text search.
- New in Expression Blend 5:
- Designing Metro-style HTML / CSS applications.
- TFS will be available as a service on the cloud.
Some General Insights:
- C++ is very much alive! I've been to an excellent lecture on modern C++ (the portable one, not MS specific), by Herb Sutter. Wow. So many C++ developers, the room was packed!
- Future of Silverlight is not clear. There will be version 5 but there's no information about what's next.
Since all the videos are now available on the conference site, I strongly suggest you see the ones that are interesting for you. Note that there quite a lot.
That's it for now,