Bookmark and Share

New Release of Pex and Code Contracts

by KodefuGuru 19. January 2010 16:40

Microsoft Research has released new versions of Pex and Code Contracts. You are required to go to DevLabs to download the commercial evaluation of Pex and Code Contracts. You can retrieve the academic version of Pex and Code Contracts from Microsoft Research.

Pex

Pex v0.21.50115.2 has a few bug fixes in it, but there is a major change to the Stubs framework. It has been renamed to Moles framework. ‘Stubs’ is now named ‘Moles’ and ‘Beaver’ is now named ‘Behaved’. Due to this change, any existing .stubx files will no longer work. Here are the steps to migrate from the previous version of Pex (from the release notes):

  • change the project reference from Microsoft.Stubs.Framework.dll to Microsoft.Moles.Framework.dll
  • rename all .stubx files to .moles, and
    • rename the top <Stubs xml element to <Moles.
    • Change the XSD namespace to http://schemas.microsoft.com/moles/2010/
    • Right click on the .moles file in the Solution Explorer and change the Custom Tool Name to ‘MolesGenerator’.
    • Delete all the nested files under the .moles files
  • Remove references to any compiled .Stubs.dll files in your project
  • In general, remove all .Stubs.dll, .Stubs.xml files from your projects.
  • Rename .Stubs namespace suffixes to .Moles.
  • replace all [HostType(“Pex”)] attribute with [HostType(“Moles”)]
  • in PexAssemblyInfo.cs,
    • rename using Microsoft.Pex.Framework.Stubs to Microsoft.Pex.Framework.Moles
    • rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsBehavedCurrentBehavior]
    • rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsMoleCurrentBehavior]
  • In general, the ‘Fallback’ prefix has been dropped in the following methods:
    • rename FallbackAsNotImplemented() to BehaveAsNotImplemented()
    • rename class MoleFallbackBehavior to MoleBehaviors
    • rename class StubFallbackBehavior to BehavedBehavors

    Code Contracts

    Code Contracts 1.2.30118.5 is a quick bug fix to address issues with last week’s release. I’m kind of curious about this one fix: “Auto-properties containing && ||, or ? should now be handled properly.” How does an auto-property get one of those symbols… obfuscation?

    Last week’s released dropped support for Silverlight 2 and adds it for Silverlight 4. A new set of reference assemblies have been added to allow contracts on newer APIs. The issues with referencing v3.5 assemblies with contracts from v4 projects are now corrected.

    An interesting development is the ability to use auto properties with contracts. Using invariants, which now must be private, on an automatic property are assigned to pre and post conditions of the compiler generated getter and setter methods (which was the reason for the quick bug fix).

    Bookmark and Share

    Visual Studio 2010 Beta 1 Available Today

    by KodefuGuru 18. May 2009 09:29

    Mike Ormond has announced that Visual Studio Beta 1 (including .NET Fx 4.0)  will be available to MSDN subscribers later today.

    He also posted a few screenshots. I admit that I'm somewhat saddened by the removal of the triangles.

    Bookmark and Share

    Visual Studio 2010 UI Revealed

    by KodefuGuru 26. February 2009 09:34

    Jason Zander has revealed the new UI for Visual Studio 2010.

    Here are some of the features of the improved IDE:

    • Reduced clutter and visual complexity by removing excessive lines and gradients in the UX and modernized the interface by removing outdated 3D bevels
    • Placed focus on content areas by opening negative space between windows and drawing attention to the current focus with a dominant accent color and a distinctive background
    • Added an inviting new palette to make VS 2010 more distinctive
    • Triangle glyphs in the margin are used to collapse or expand your code blocks
    • Collapsed sections of code are marked with an empty triangle (pointing straight) as well as a set of ellipses
    • Colors on the margin indicate edits that have been made
    • New Project dialog has updated to include online template viewing, a search box, and easier navigation
    • New Extensions Manager to improve searching and installing VS extensions

    It's looking pretty good. I can't wait for a new ctp or beta release to update The Future of Managed Code presentation.

    Bookmark and Share

    Parity Between Languages

    by KodefuGuru 10. January 2009 17:57

    The next versions of C# and VB will have improved parity between them. From the consultant perspective, this is important because one can't always choose which language to use. Although a seasoned C# developer can program in VB as well, it seems that gotchas appear and you have to refer to the documentation to figure out how do something that you wouldn't even need to think about in your primary language.

    The goal of the Visual Studio Managed Languages team is to maintain the character of each language while introducing the same new features to both. In keeping with this spirit, they've introduced features from one language to the other while maintaining the target language's style and feel.

    New C# Parity with VB

    Late Binding - Although the new dynamic type isn't the same as late binding in VB.NET, it is similar in many respects.

    Named and Optional Parameters - No longer will you need to chain tons of overloads. VB developers have mocked us C# developers a while about this. It also cuts down on the number of parameters you have to pass to COM method calls.

    New VB Parity with C#

    Auto-implemented properties - These are idential to C#'s auto-implemented properties in that the compiler will create a backing private member for you. However, VB does not get read-only or write-only auto-implemented properties.

    Collection Initiliazers - No more have to call List.Add(...) over and over.

    Array Literals - The compiler will now figure out what kind of array it is based on the types used to initialize it. 

    Multiline Lambdas - The compiler accomplishes this by figuring out the widest type returned from the multiline function.

    Implicit Line Continuation - C# has implicit line continuation for everything, since line termination is denoted by a semicolon or the ending of a block of code (curly braces). VB, in contrast, implicitly terminates lines and oftentime requires a line continuation character (underscore). The line continuation character is now eliminated for scenarioes where it makes sense that the line should continue. The rules for this are as follows: after an attribute, after a comma, after a dot, after a binary operator, after a LINQ query clause, after a parenthesis, after a curly brace, and after a <%= or %>.

    New features added to both

    Generic Variance - Remember the question about assigning a list of strings to a list of objects? Well, you still can't do that due to type safety. However, sometimes the generic only goes out. Conversely, sometimes it only goes in. You will soon be able to declare your generics that way, and it will allow things like an IEnumerable<string> to be assigned to IEnumerable<object>.

    Compiling without Interop Assemblies - It used to be that a primary interop assembly (PIA) had to be distributed as another artifact with your application. This is terrible when you're using a small subset of the functionality: it could dramatically increase the size of your distributable. Worse still, it is possible to run into a dll hell situation with different versions of the pia. In .NET 4.0, you can have it compile the piece of the primary interop assembly used by your application into the executable, greatly reducing distributable size and versioning issues.

     

    Most of these features are demonstrable in the Visual Studio 2010 CTP; with the exception of in and out generics. These features appear to be very useful and stable. Although CTPs are subject to change, I suspect these features will make it to the final release.

    Bookmark and Share

    Announcing Windows Azure

    by KodefuGuru 27. October 2008 16:50

    I just learned that Windows Azure has been announced, presumably at PDC 2008. It's brand new, so visit the site to learn more and download the ctp.

    Windows Azure is a cloud services operating system that serves as the development, service hosting, and service management environment for the Azure Services Platform. Windows Azure provides developers with on-demand compute and storage to host and manage web applications on the internet through Microsoft data centers.

    Between this and Live Mesh, I feel as though we're in the middle of a huge paradigm shift.

    Bookmark and Share

    Expression Blend 2 SP1 Preview Released

    by KodefuGuru 26. September 2008 13:43

    The Expression Blend team announced the released of of Service Pack 1 for Expression Blend 2 today. Here are the details for this release.

    This Service Pack provides you with all of the functionality you had with our earlier Expression Blend 2.5 June 2008 Preview. Besides allowing you to create new projects for WPF, Silverlight 1, and Silverlight 2 RC, we are also exposing new platform functionality like Font Embedding / Subsetting for Silverlight 2 projects.

    You can download the service pack here.

    Bookmark and Share

    ADO.NET Data Services CTP

    by KodefuGuru 10. December 2007 16:11

    ADO.NET Data Services is the new name for project "Astoria", and it's been built from the ground up using the lessons learned from the "Astoria" prototyping phases. You can download the new CTP as part of the ASP.NET 3.5 extensions.

    Here's what you get as part of this CTP:

  • Support to create ADO.NET Data Services backed by:
    • A relational database by leveraging the Entity Framework
    • Any data source (file, web service, custom store, application logic layer, etc)
  • Serialization Formats:
    • Industry standard AtomPub serialization
    • JSON serialization
  • Business Logic & Validation
    • Insert custom business/validation logic into the Request/response processing pipeline
    • simple infrastructure to build custom access policy 
  • Access Control
    • Easily control the resources viewable from a data service
  • Simple HTTP interface
    • Any platform with an HTTP stack can easily consume a data service
    • Designed to leverage HTTP semantics and infrastructure already deployed at large
  • Client libraries:
    • .NET Framework
    • ASP.NET AJAX
  • Bookmark and Share

    Expression Blend 2 September Preview

    by KodefuGuru 20. September 2007 14:30

    The September preview of Expression Blend 2 has been released. Here are the new features:

  • Visual Studio 2008 support
  • Making Controls from Existing Objects
  • Split View and XAML Editor Improvements
  • Storyboard Picker
  • Storyboard and Keyframe Properties
  • Vertex Animation
  • Breadcrumb Bar
  • Font Embedding and Subsetting
  • Build Options
  • Object Manipulation
  • Download it here and get to work on those Silverlight applications.

    Bookmark and Share

    Project Astoria September 2007 CTP Released

    by KodefuGuru 18. September 2007 22:22

    The Project Astoria September 2007 CTP has been released. It's a refresh of the May CTP, but it works with Visual Studio 2008 Beta 2.

    The Astoria September 2007 CTP is now available for download. This CTP is for the most part a refresh of the May CTP bits recompiled so they run with Visual Studio 2008/Entity Framework Beta 2. We did tweak here or there, but no new features were added.

    You can download it here.

    KodefuGuru.GetInfo()

    Chris Eargle
    LinkedIn Twitter Technorati Facebook

    Chris Eargle
    C# MVP, INETA Community Champion


    MVP - Visual C#

     

    INETA Community Champions
    Friend of RedGate
    Telerik .NET Ninja
    Community blogs & blog posts

    I am a #52er

    I have joined Anti-IF Campaign


    World Map

    Tag cloud

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    © Copyright 2010