Welcome to MSDN Blogs Sign in | Join | Help

View This Blog In

Visual Studio 2010 and .NET Framework 4 Release Candidate now available

Today, we are making available the Release Candidate (RC) for Visual Studio 2010 and .NET Framework 4 to all MSDN subscribers.  The RC will be made available to the world on Wednesday, February 10th.  The RC includes a go-live license for people who want to deploy in their production environment.

Thank you for all the feedback you’ve sent our way so far.  The goal of this RC is to get more feedback from you and ensure we’ve addressed the performance issues in the product.  We have made significant performance improvements specifically as it relates to loading solutions, typing, building and debugging.

I encourage you to download the RC and let us know what you think.  For more information on the RC, check out Jason Zander's blog.

Namaste!

Entity Framework in .NET 4

The Entity Framework in .NET 4 has a lot of new features and enhancements.  We got a lot of great feedback from you on the initial release of the Entity Framework (EF).  Let’s take a look at some of the things coming in new with Entity Framework 4.

Foreign Keys

Entity Framework now includes support for foreign keys.  Foreign key associations allow you to include foreign key properties on your entities, simplifying a number of key scenarios including data binding and n-tier development. Foreign keys can be used to setup entity relationships using foreign key properties directly:

 

    using (BlogEntities ctx = new BlogEntities()) {

        Post myPost = new Post {

            PostID = 102,

            PostName = "Post Title",

            CreatedDate = DateTime.Now,

            PostContent = "Post Content",

            BlogID = 11

        };

        ctx.Posts.AddObject(myPost);

        ctx.SaveChanges();

    }

 

In this example, even though the Blog object with BlogID == 11 was never loaded, we were able to connect our new myPost object to it directly.

 

Lazy Loading Support

Entity Framework now includes support for lazy loading.  When you create a new model in VS2010, entities that offer lazy loading are generated for you.  Lazy loading, which is enabled by default, doesn’t load each object returned by a query until you actually use it.  For instance, lazy loading means that each post in the below snippet isn’t loaded until it’s actually used to print out the post’s PostName property.

 

    using (var ctx = new BlogEntities()) {

        foreach (var b in ctx.Blogs) {

            Console.WriteLine(b.BlogName);

 

            //Note that we don't explicitly load the posts for the current blog,

            //the EF does it 'lazily' for us.

            foreach (var p in b.Posts)

                Console.WriteLine(p.PostName);

        }

 

    }

Plain Old CLR Object Support

EF4 now includes Plain Old CLR Object Support (POCO) support for entities.  This offers better test-driven development and domain-driven design support by allowing you to have no EF dependencies for your entities.  EF will still track changes for POCO entities, allow lazy loading, and will automatically fix up changes to navigation properties and foreign keys.  You can find out more about POCO support in the walkthroughs posted on the ADO.NET blog.

Text Template Transformation Toolkit Code Generation
In the first version of the Entity Framework, code generation didn’t allow for deep customization and wasn’t integrated into Visual Studio.  The Entity Framework now leverages Text Template Transformation Toolkit, or T4, which makes customizing code generation easy, flexible and powerful.  The experience is fully integrated into Visual Studio.  Built-in code generation strategies can be chosen by right clicking on the Entity Framework Designer surface and selecting ‘Add Code Generation Item…’:

Add Code Generation 

You aren’t limited to using the code generation strategies that ship in VS 2010; you can now write your own T4 templates or modify the default templates to provide your own code generation experience. 

Better N-Tier Support

An n-tier design allows you to separate data, business logic, and interaction layers to ensure data integrity and promote maintainability at each tier.  The Entity Framework team received a number of requests for improvements on n-tier support.  They’ve taken this feedback and made improvements to the API to allow for n-tier design, as well as a code generation template that generates objects with built in n-tier features, such as change tracking.  The template generates your entities as a set of CLR classes with Windows Communication Foundation (WCF) serialization attributes in place so they can easily be used in conjunction with WCF services. 

Generated SQL Improvements

We’re constantly trying to improve the readability and performance of the SQL we generate.  Numerous simplifications and improvements of the SQL generated when querying using the Entity Framework have been made in EF4.  One such improvement is the removal of some extraneous joins.  Another is the use of database wildcards for WHERE clause string parameters.  For instance, the following LINQ query will translate into a query that uses a WHERE clause with a LIKE statement and the ‘%’ wildcard to search for all Blogs whose BlogName property begins with “Visual Studio”:

 

    var query = from b in ctx.Blogs

                where b.BlogName.StartsWith("Visual Studio")

                select b;   

 

While these changes may seem small, improved SQL generation can result in queries that execute more quickly and put less load on your SQL Servers and network.

Enhanced Stored Procedure Support

Many databases contain stored procedures that perform custom SQL processing.  Entity Framework allows you to create a function in your entity model that calls a stored procedure through the Function Import feature.  The Function Import feature can now detect the columns returned from a stored procedure and create a corresponding complex type. In addition, existing complex types can be updated when a stored procedure definition changes.  Below, the Entity Framework Designer stored procedure wizard steps you through the process of importing your stored procedures as functions:

Add Function Import 

Entity Framework 4 offers these and other new features to increase developer productivity.  Share your thoughts and ideas with the team on the project forum, connect with the Entity Framework team on their team and design blogs, and check out videos and screencasts on Channel 9.

Namaste!

Visual Studio 2010 and .NET Framework 4 Beta period extended

In October, we shipped Beta 2 of Visual Studio 2010 and .NET Framework 4.  Since then, we have received a lot of helpful, constructive feedback from you all.  Thank you.

 

A lot of you have given us very positive feedback on the new capabilities of VS 2010 and .NET Framework 4 and are very happy with the breadth of value that we are poised to deliver in this release. 

 

At the same time, you have also given us feedback around performance issues, specifically in a few key scenarios including virtual memory usage.  As you may have seen, we significantly improved performance between Beta 1 and Beta 2.  Based on what we’ve heard, we clearly needed to do more work.  Over the last couple of months, our engineering team has been doing a push to improve performance.  We have made significant progress in this space since Beta 2. 

 

With these improvements in the product, we do want to make sure that they truly address the performance issues while continuing to maintain a high quality bar.  As a result, we are going to extend the beta period by adding another interim checkpoint release, a Release Candidate with a broad “go live” license, which will be publicly available in the February 2010 timeframe.

 

Since the goal of the Release Candidate is to get more feedback from you, the team will need some time to react to that feedback before creating the final release build.  We are therefore moving the launch of Visual Studio 2010 and .NET Framework 4 back a few weeks.  

 

Please continue to send us your feedback.  It truly has an impact on the product development process and helps us to deliver a high quality product.

 

Namaste!

Building setup and deployment packages in VS 2010

Developing and refining your code is an important part of building your application.  Once it’s built, you need to deploy that before your customers can start seeing the benefits of using the application.  For many applications, the most reliable way to deploy is to build a setup project that packages your application’s components into an easily installable package with a familiar interface for your customers.

 

Today you can use the Visual Studio Installer project template to create a setup project; however, we have heard from our customers that they need more.  They need capabilities such as the ability to build using Team Foundation Server, a simpler, more modern developer experience and most importantly a runway to advanced deployment capabilities that scale along with their applications.

 

To address this feedback, we have partnered with Flexera, makers of InstallShield to create, just for Visual Studio 2010 customers, InstallShield Limited Edition 2010.  This is a Visual Studio extension you can download and use today to build Windows installer-based deployment packages for your application that can be deployed on the Windows platform.  It provides comparable functionality to the Visual Studio Installer project but in addition, you get the easy to use, modern, graphical development environment of InstallShield, as well as the ability to build your deployment projects using Team Foundation Server.  When your application grows beyond InstallShield Limited Edition 2010 you can preserve the investment you have made by importing it into more advanced versions of InstallShield.

 

How to Get It

To download a copy of the InstallShield Limited Edition, click on the File | New | Project… menu within Visual Studio 2010, browse to the Other Project Types | Setup and Deployment node, and select the InstallShield 2010 node that contains a project template called “Enable InstallShield Limited Edition”. 

 

New Project 

 

After creating the project, the template will direct you to the InstallShield registration page in order to continue.  When you have registered, the page will direct you to download the product from the partner website.

 

Download InstallShield 

 

How to Use It

Once you have installed the product, the New Project dialog will provide an option to create an InstallShield Limited Edition Project.  Create a new project using the File | New | Project… menu to bring up the New Project dialog and select “InstallShield Limited Edition Project” template under the Other Project Types | Setup and Deployment | InstallShield 2010 node.

 

Enable InstallShield 

 

Visual Studio 2010 with InstallShield Limited Edition 2010 offers new options for deployment that can ease the effort of building deployment solutions for your applications, integrate deployment into your automated build process, and provide an upgrade path to bigger and better solutions as your application grows.

 

Namaste!

Creating extensions for VS 2010

While Visual Studio has a wealth of functionality built in, one of the keys to any modern platform is extensibility.

A main focus for us in Visual Studio 2010 has been to improve not only our API’s, but also the general ecosystem that surrounds extension development. The goal is simple - we want to make the entire process easier, from creation to publishing to consumption.

Before You Start…

One of the first things you’ll notice is the streamlined Visual Studio 2010 SDK. 

The SDK is now just 10 MB in size, instead of the 100 MB it used to be.  We accomplished this by moving the documentation and samples online, which allows us to provide and update content continuously.  The SDK’s install time has also gone from 20 minutes to just over a minute.

Building It

Building extensions for Visual Studio 2010 has never been easier. 

The SDK provides a set of project templates that help you build extensions ranging from adding visuals to the editor, all the way to menu commands and tool windows. 

WPF is now a first class citizen within our extension templates.  Right away, you can be up and running with a WPF tool window.  Likewise it is easy to use XAML to design and add a custom piece of UI to the Visual Studio Editor.  Extending the Editor has gotten significantly simpler and more robust.  Previously, trying to do something as simple as getting the caret position took several lines of ugly interop code.  With the new editor APIs you can do it in one line, without a trace of interop.

The possibilities for extensions are endless.  Would you like to integrate your team’s social networking tools into the editor so you can share code straight from Visual Studio? Build an extension for it.  Want to embed architectural diagrams or TFS history into the code editor?  You can do that.  Don’t like the default styles for keyword coloring?  Change it with a few lines of code.  With extensions, you can make Visual Studio into your own customized coding power tool.

Sharing It

Deploying your extension is no longer rocket science.  There's no need to build an MSI to share your extensions.  The extension project templates all generate a VSIX file.  VSIX is our new deployment unit that leverages the Open Packaging Convention zip format and takes advantage of xcopy deployment of your extensions.

 

With the new Extension Manager, users have the chance to find and download extensions directly from within the IDE. This experience is thanks to the new and improved Visual Studio Gallery, which allows you to share your creations with the world just by uploading your VSIX. 

Now It’s Your Turn

The Visual Studio team blog contains a comprehensive walkthrough on building your own extension.   I encourage you to visit the blog, and then get started building your own extensions to Visual Studio.  Once you’ve built an extension, you can upload your extension to the Visual Studio Gallery to share it with others.  You can choose to share it at no cost or charge for your extension, then customize your extension’s page with rich HTML.  When you’ve published your page, your extension will be available in the Extension Manager under the Tools menu in Visual Studio.

Check out VS Extensibility Dev Center, the extensibility samples, and the SDK documentation to learn more about building extensions.  I look forward to seeing your extensions on the Visual Studio Gallery.

Namaste!

Reactive Extensions for .NET (Rx)

I’m pleased to announce a preview of the Reactive Extensions for .NET (Rx) on MSDN DevLabs.

 

Using Rx, programmers can write succinct declarative code to orchestrate and coordinate asynchronous and event-based programs based on familiar .NET idioms and patterns. Rx has a strong theoretical basis by using the duality between the classic Iterator and Observer design patterns to simplify controlling asynchrony. By combining the expressiveness of LINQ with the elegance of category theory, Rx allows programmers to write asynchronous code without performing cruel and unnatural acts.

 

As the name implies, reactive programs react to changes in their environment. Traditionally, programmers use locks and event handlers to coordinate these changes. Rx models asynchronous computations and events as push-based, or observable, collections, thus expanding the scope of the standard LINQ sequence operators and extension methods beyond the familiar pull-based, or enumerable, collections into the realm of reactive programming.

 

Practical and Pragmatic

 

The Reactive Extensions for .NET is a set of extension methods and an implementation of the LINQ standard sequence operators for the new IObservable<out T> and  IObserver<in T> interfaces in .NET 4 and Silverlight 4. The observable interfaces were added to .NET to provide a common interface for push-based notifications that other .NET features and libraries can build on top of.  Rx focuses on coordination and orchestration of event-based and asynchronous computations and leverages the new Task Parallel library as its underlying concurrency mechanism.

 

The Reactive Extensions can be used from any .NET language.  In F#, .NET events are first-class values that implement the IObservable<out T> interface.  In addition, F# provides a basic set of functions for composing observable collections and F# developers can leverage Rx to get a richer set of operators for composing events and other observable collections.   

 

The Silverlight Toolkit uses Rx to power the Silverlight Toolkit Drag and Drop Framework, a subset of the WPF APIs for initiating and interacting with drag operations.  The Drag and Drop Framework adds drag and drop support to core controls such as Treeview, DataGrid, ListBox.  Rx drastically reduced development time by allowing drag operations, which are sequences of user events, to be described declaratively.  Silverlight creates visual elements asynchronously and as a result it is often necessary to write asynchronous test code to ensure that a component has been correctly created.  The addition of Rx to the Silverlight unit testing framework allows developers to write reliable event-based tests without sacrificing readability.

 

Show me Some Code

 

The example below shows a simple AJAX-style reactive program that translates English using the Bing translation service and displays the results.

 

Translation app using Rx 

 

The input field in the page is exposed as an observable collection of strings that produces a value whenever the user has paused typing for a half second. The GetKeyUpEvents extension method exposes the standard .NET KeyUp event as an observable collection.

 

    IObservable<string> words = (from keyup in Input.GetKeyUpEvents() select Input.Value).Throttle(TimeSpan.FromSeconds(.5))

 

To access the Bing translation service, we simply convert a simple WCF service reference that uses the standard .NET BeginInvoke/EndInvoke or event-based async pattern into a function that returns a singleton observable collection via one of the standard helper functions that Rx provides.

 

    IObservable<TranslationResponse> Translate(this string text, string sourceLanguage, string destinationLanguage){…}

 

The coordination between the various computations uses a LINQ query that sends requests to the Bing translation service to translate each word into Dutch, French, and Spanish and then waits for the first two of three results to return using a join pattern.

 

    var translations = from word in words

            let dutch = Bing.Translate(word, "en""nl")

            let french = Bing.Translate(word, "en""fr")

            let spanish = Bing.Translate(word, "en""es")

            from results in Observable.Join

                 ( dutch.And(spanish).Then((d, s) =>  
                   
new { Dutch = d, French = Bing.NoResult, Spanish = s })

                 , dutch.And(french).Then((d, f) =>
                   
new { Dutch = d, French = f, Spanish = Bing.NoResult })

                 , french.And(spanish).Then((f, s) => 
                   
new { Dutch = Bing.NoResult, French = f, Spanish = s })

                 ).Until(words)

             select results;

 

Finally, we subscribe to the results of the translations and update the UI once we get notified of a change.

 

    translations.Subscribe(result =>

    {

        Dutch.InnerText = result.Dutch.GetTranslatedTerm();

        French.InnerText = result.French.GetTranslatedTerm();

        Spanish.InnerText = result.Spanish.GetTranslatedTerm();

    });

 

Developers don’t need to worry about executing the subscription on the correct thread; the Rx runtime takes care of it.

 

Bonus Material

 

Besides the extension methods on observable collections, Rx also contains a number of more experimental types and namespaces that implement some of the new extension methods for observable collections over enumerable collections and an experimental back port of PLINQ to .NET 3.5 that are available to developers for experimentation.

 

Let’s Play

 

You can download Rx from DevLabs.  Tell us what you think on the project forum, and check out videos and screencasts on Channel 9.

 

Namaste!

Building Applications for Windows Azure

Building your application or service for the cloud lets you focus on building the right software using the skills you already have while someone else handles the details of infrastructure, hardware, and service management.

Windows Azure, Microsoft's platform for cloud-based applications, has been available in CTP form for the past year, and Visual Studio has supported the development of Windows Azure applications since the very first CTP release through an add-in known as Windows Azure Tools.  This add-in is available for VS 2008 via the Web Platform Installer.  Visual Studio 2010 Beta 2 has all the features you need to code, debug, and deploy your cloud service.

Windows Azure allows you to build robust production-quality applications that can be deployed, maintained and supported, and Windows Azure is accompanied by the November 2009 release of the add-in for Visual Studio, which lets you take advantage of the platform in the most efficient way.

Getting Started

Developing for Windows Azure is very similar to developing an ASP.NET application for IIS and Windows Server.  However, there are some differences, and Visual Studio makes it much easier to navigate those differences.

One of the first things that you'll notice when developing for the cloud with Visual Studio is the introduction of a top-level Cloud tab on the Get Started section of the redesigned Start Page.  This page offers up a wealth of resources that cover creating your first cloud application and contain resources that will continue to be useful again and again, such as links to the community areas for Windows Azure and regular updates about new features and services offered.

Start Page

You can create your own cloud service using the Cloud Service project template that is part of the Visual Studio 2010 (and Visual Web Developer 2010 Express) installation.  Click on the File | New | Project... menu, browse to either  the Visual Basic and Visual C# nodes, and select the Cloud Service node that contains a project template called "Enable Windows Azure Tools".

New Project

This template, new in Beta 2, makes it very easy to get the latest tools for developing Windows Azure services.  After creating the project, the template will direct you to download the Windows Azure Tools in order to continue.  This guarantees that you'll be using the latest version of the tools that support the latest version of Windows Azure.

Download Tools

After installing the tools, the New Project dialog will provide an option to create a Windows Azure Cloud Service.  Visual Studio now supports creating, editing, building, debugging and deploying these services.

To create a new project, use the File | New | Project... menu item to bring up the New Project Dialog and select "Windows Azure Cloud Service" under the Visual Basic or Visual C# nodes.  This will bring up a dialog that can be used to add Windows Azure Role projects to your cloud service.

New Cloud Service Project

One of the unique aspects of Windows Azure is the ability to individually scale work across any number of instances.  Windows Azure segments "components" into Roles.  A Role is an individually scalable component running in the cloud where each instance of a Role corresponds to a virtual machine instance.  There are two types of Roles:

  • Web Role - a web application running on IIS that is accessible via an HTTP and/or HTTPS endpoint.
  • Worker Role - a background processing application that runs arbitrary .NET code. It also has the ability to expose internet-facing and internal endpoints.

There are multiple template options for each type of Role you wish to add.  For example, ASP.NET Web applications, ASP.NET MVC 2 and WCF Service Application templates are available to create a Web Role.  Add one or more Roles to your cloud service and click OK to create the solution and projects.

Roles

After you've created the service, your solution has several projects in it.  One of these is the Cloud Service project which contains all of the configuration information needed by Windows Azure in order to run your service and also provides the ability to add or remove Roles after project creation.

Right-clicking on the role associations under the Roles node and selecting "Properties..." will bring up a configuration page that makes it easy to set up each Role.

Role configuration

Getting It Just Right

One of the key benefits of using Visual Studio 2010 for developing Windows Azure Cloud Services is the simulation environment on which you can test, debug, and run your service completely locally without requiring a Windows Azure Account.  This simulation includes the development fabric, which will run your cloud service the same way it runs in the cloud, and the development storage, which runs the Windows Azure storage on your machine.  With the development fabric and storage, you can develop, test, and refine your cloud services offline.

When running in the development fabric you can use all of Visual Studio's powerful debugging features, including seamless debugging across different roles and role instances.  Below, a debugging session allows you to step through the execution of a web role.

Debug Azure Projects

Deploying to the Cloud

Once you are ready to move your application to the cloud, Visual Studio provides a publish step that packages your cloud service into a deployable Windows Azure format, then you can deploy your cloud service using the Windows Azure Developer Portal.

To learn more about all of this, please visit the Cloudy in Seattle and Cloud Tools blogs.

Namaste!

Teamprise: Enabling TFS collaboration across heterogeneous platforms

Development teams and organizations often have many different platforms and development environments, and interoperability between those heterogeneous environments is a major collaboration challenge.

Teamprise’s Client Suite addresses those interoperability gaps by enabling developers using Eclipse and Eclipse-based IDEs on multiple operating systems, including Windows, Unix, Linux, and Mac OS X to build applications that leverage Microsoft Visual Studio Team Foundation Server.

I’m happy to announce today that Microsoft has acquired the Teamprise technology. 

Microsoft is committed to the future of this technology and will be incorporating these tools into Visual Studio 2010.  This will be available as part of the Visual Studio 2010 launch wave.  

The acquisition of the Teamprise technology is an important step in our continued commitment to interoperability and our dedication to enabling customers to achieve greater business results, regardless of their current development environment.

Details of the acquisition are available on Microsoft PressPass.

Namaste!

Developing for the web using VS 2010 and .NET 4

Visual Studio 2010 and .NET 4 are packed with new features and enhancements designed to improve developer productivity.  Some are small changes and others are more significant.  Altogether they deliver a significant gain in productivity.

More and more developers look to the web to be able to build and deliver applications that take advantage of the reach and friction-free capabilities of the web.  With Visual Studio 2010 and ASP.NET 4, there are a number of new features to help you do just that.  I want to highlight a few of the new features here.

Snippets for HTML, ASP.NET and JavaScript

C# and VB users have used snippets for years to accelerate developer productivity.   Now web developers can experience these same productivity gains with their HTML and ASP.NET markup and JavaScript.  There are hundreds of new snippets that help you auto-complete common ASP.NET and HTML tags, including required attributes (such as runat="server") and common attributes specific to a tag (such as ID, DataSourceID, ControlToValidate, and Text).

Snippets

 RadioButtonList snippet

Dynamic IntelliSense for JavaScript

One of the biggest challenges developers face when coding with dynamic languages such as JavaScript is that types are dynamically being added and changed.  This is can render IntelliSense almost useless.  In Visual Studio 2010, the JavaScript IntelliSense engine has been redesigned to work smoothly for dynamic types.  For example, you’ll now get IntelliSense for types generated by registerNamespace.  The engine also adds support for most common JavaScript libraries.  Below is an example of IntelliSense for a newly-registered type with a new function.

JavaScript IntelliSense 

Streamlined Web Deployment

Web deployment has always been a very challenging problem for web developers.  Application logic, databases, IIS settings, data and configuration transforms all may need to be applied before deployment.

Now, MSDeploy, a new deployment tool, packages all the settings, files and data associated with a web application.  These packages can then be deployed to remote sites or archived for future retrieval. The IIS7 management console now includes a wizard to import packages created by MSDeploy.

Visual Studio 2010 seamlessly integrates MSDeploy into the web development workflow and adds commonly-requested features such as automation of web.config transformations to modify common settings (such as web service end points and connection strings) and database deployment before moving from a developer’s machine to a staging or production server.  Below is the new simplified publishing dialog:

MSDeploy 

New Application Templates

Getting started with web development can seem daunting for the new web developer. Visual Studio 2010 includes starter web application templates for ASP.NET 4.  These templates include everything you need to get started: a master/content pattern for page consistency, menus, login, and CSS style sheets and jQuery for building JavaScript-rich apps.  These templates give you get a working web application right from the start so you can get to work adding your own functionality.

CSS Improvements

ASP.NET controls now have a ClientIDMode property that allows you to change how ASP.NET controls generate the ClientID.  Knowing the ClientID is particularly important when styling with CSS or writing JavaScript to access the HTML DOM.

The HTML designer in Visual Studio 2010 has enhanced support for CSS 2.1 that provides a more accurate rendering at designtime compared with how the browser will render the page at runtime.

More Screen Real Estate

One of the most valuable commodities in a development environment is screen real estate.  Visual Studio 2010 offers an immense array of options developers can customize to optimize their screen real estate and development experience.  The Code Optimized Web Profile optimizes these settings to maximize screen real estate and bring the commands most commonly used by the Source View developer to your fingertips.  You can choose the Code Optimized Web Profile when you start Visual Studio for the first time or change your profile later using the Tools | Import and Export Settings… menu item.

Code Optimized Profile 

Clean Web.Config

Sometimes less is more.  This is one of those features.  When ASP.NET was first introduced, a web.config file wasn’t even required.  When it was, it often only contained a few entries.   As new capabilities were added to ASP.NET, the web.config file grew in size and complexity, making the file more difficult to read and maintain.  ASP.NET 4 brings back the minimal configuration file.

URL Routing with ASP.NET WebForms

URL routing is a feature common to MVC projects.  ASP.NET 4 supports URL routing for web forms.  Now you can define URLs that are meaningful to your app and understandable by users.  These simplified URLs also help with search engine optimization (SEO).

Learn More

This is only a sample of the improvements for web developers in Visual Studio 2010.  You can see a complete list of new features for web development here.

 

One More Thing... 

If you have been using Visual Studio 2010 Beta 2, we'd like to hear from you.  Please take the survey and tell us about your experiences.

 

Got Feedback?

 

Namaste!

Spec Explorer: A Model-Based Testing tool

Thorough, consistent, and extensible testing of systems remains one of the biggest challenges in creating and maintaining software systems.

The Spec Explorer tool released today on DevLabs tackles that problem using Model-Based Testing techniques.

Spec Explorer 

What Is It?

Spec Explorer, is a tool for modeling software behavior and generating test suites from those models. 

Models can be viewed as graphical renderings to understand and analyze the expected system behavior and communicate it to others.  Model size can be scoped with regular expressions.  The generated test suites can be run standalone in the Visual Studio test framework or other unit test frameworks.

Why Use It?

Several Microsoft projects of various sizes have already used Spec Explorer as part of their development process.  Using Spec Explorer has helped those teams create test cases more quickly, ensure predictability of requirement coverage, and support the projects’ lifecycle management and software updates.

Spec Explorer’s unique features make it easier to learn than other Model-Based Testing tools. Engineers with no modeling background can create models of systems and features, then generate tests in a short amount of time.  Studies on a large-scale project with over 300 test suites have shown a 42% average productivity gain over manually-created test suites.

While we’ve tuned Spec Explorer based on the feedback of teams within Microsoft, we now need your feedback to ensure Spec Explorer meets the needs of customers working on a variety of project types and sizes. 

Download Spec Explorer today, ask questions or send feedback via the forum, and stay current via the team blog.

Namaste!

Come meet the new MSDN

MSDN

 

The MSDN Global Network is re-launching with a new design and new benefits for all MSDN subscribers.

 

MSDN subscriptions are the ultimate resource that give developers, teams, and organizations comprehensive access to Microsoft tools and technologies to confidently design, develop and test software solutions. Along with access to thousands of downloads, it offers professional support services and expert information resources to ensure developers can rise to the biggest challenges.

 

Today, we are announcing new benefits to better support developers and to help them grow their career.  All MSDN and BizSpark subscribers will be able to leverage free e-learning courses in English.  We are providing priority support to all subscribers through MSDN Forums.  We are also announcing free Windows Azure Platform cloud computing use for MSDN Premium and BizSpark customers following Windows Azure commercial availability.  To kick start developers on this powerful platform, subscribers will get 750 free compute hours per month for 8 months. 

 

The MSDN network re-design supports our customers around the world, including 37 international sites. The goal of the new design is to improve the overall experience with the site and centers and help you be successful with the Microsoft products and technologies you have invested in. The new MSDN site includes a new visual design, new ways for the community to interact on the content, and new Silverlight controls to promote dynamic community content. This includes a Community Activity area featuring recent and most popular forums topics, code samples, and technical articles. The MSDN Library now has the ability to explore two new library views: ScriptFree (which sets the bar for performance by eliminating scripts and server round-trips) and the Lightweight Beta (a similar view to VS 2010 offline help experience).

 

This is just the start of an important investment we are making around our online assets to improve discoverability, readability, consistency, and relevance.

Feedback from MSDN users is crucial to making MSDN the best place to go from ideas to solutions. Thank you to everyone who has provided feedback and recommendations to make MSDN a better place. We are looking forward to hearing your additional input on the MSDN Site Feedback Forum on how to make MSDN even better. 

Namaste!

Announcing Visual Studio 2010 and .NET FX 4 Beta 2

 

I am pleased to announce the release of Visual Studio 2010 and .NET Framework 4 Beta 2.  MSDN subscribers can download Beta 2 today.  The beta will be available to the rest of the world on Wednesday. 

Visual Studio 2010 has made significant enhancements since Beta 1.  We’ve come a long way in performance and general stability, and while there is more work to do before we release Visual Studio 2010, we hope you’ll like what you see. 

Beta 2 also includes integrated tooling for SharePoint, including project templates and debugging support, and runtime and tooling support for developing great Windows 7 applications. 

Since Beta 1, new Windows Azure Tools templates make it easy to get started developing Windows Azure applications, and enhanced support for Silverlight 3 databindings let you focus on writing your code. 

Team Foundation Server is now included in all versions of Visual Studio 2010 with MSDN.  For small teams that need only core development features such as source control, bug tracking, and build automation, TFS Basic offers a simple, streamlined install and runs on server or client machines.  Test Elements users will notice a more intuitive and responsive user interface.

We’ve been making improvements to the .NET Framework as well.  I’m happy to say that the download size of .NET Framework 4 Beta 2 is greatly reduced from previous versions of the .NET Framework, with most flavors coming in under 50 megabytes.  Significant improvements to WPF’s text rendering stack make text sharper.  You will notice sharper text in the Visual Studio 2010 editor. 

We are also announcing a simplified product lineup and pricing options today, as well as new benefits for MSDN subscribers.  For MSDN Premium subscribers, the “Ultimate Offer” will offer access to the next level of Visual Studio 2010 at launch on March 22, 2010.  Find out more about the new product lineup and the “Ultimate Offer” here.

Visual Studio 2010 Beta 2 is available today for MSDN subscribers and will be available October 21st for public download. Keep an eye on the Visual Studio 2010 Product Page for or sign up to be notified when it becomes available.  The team and I are looking forward to hearing your feedback.

Namaste!

F# in VS2010

With Visual Studio, we strive to give your organization the tools to tackle a broad range of software problems with the interoperability and efficiency that you need and have come to expect from software based on the .NET Framework.

 

As part of this, Visual Studio 2010 marks the first release to directly support functional programming through the F# programming language.

 

F# is a highly productive .NET programming language combining functional programming and object-oriented programming, and is ideally suited for parallel, algorithmic, technical and explorative development.  F# is the result of a close partnership between Microsoft Research and the Visual Studio team, and since announcing F# in Visual Studio 2010 we’ve seen a surge of interest and uptake in the language. We’ve also worked closely with the F# community and major adopters to ensure it meets the needs of professional software developers working in these domains.

 

F# brings many new features to Visual Studio 2010, covering everything from “programming in the small” with Tuples and functions to simple, error-free asynchronous programming and strong types for floating point code.  Below are a few of the highlights of this addition to the Visual Studio languages.

 

Simple, Succinct Syntax

F# is a strongly-typed language like C#, but with a lightweight syntax often seen in a dynamic language like Python.  This gives your F# programs a lightweight, math-like feel.

 

let data = (1,2,3)

 

let rotations (x, y, z) =

    [ (x, y, z);

      (z, x, y);

      (y, z, x) ]

 

let derivative f x =

    let p1 = f (x - 0.05)

    let p2 = f (x + 0.05)

    (p2 - p1) / 0.1

 

let f x = 2.0*x*x - 6.0*x + 3.0

 

let df = derivative f

 

System.Console.WriteLine("The derivative of f at x=4 is {0}", df 4.0)

 

When run, this program will print: “The derivative of f at x=4 is 10

 

Parallel and Asynchronous Programming

.NET Framework 4 and Visual Studio 2010 contain great libraries and tools for easy parallel application development.  F# complements this with language features designed to make parallel and asynchronous programming more intuitive.  This includes fundamental language features like immutability and first-class functions, and powerful programming models, such as asynchronous workflows, which let you write asynchronous code in the same linear style as the synchronous code you are used to. 

 

let http url =

    async { let req =  WebRequest.Create(Uri url)

            let! resp = req.AsyncGetResponse()

            let stream = resp.GetResponseStream()

            let reader = new StreamReader(stream)

            let! contents = reader.AsyncReadToEnd()

            return contents }

 

let sites = ["http://bing.com"; "http://microsoft.com";

             "http://msdn.com"; "http://msnbc.com"]

 

let htmlOfSites =

    Async.Parallel [for site in sites -> http(site)]

    |> Async.RunSynchronously

 

 

Integrated with Visual Studio 2010 and .NET 4

F#’s integration in Visual Studio 2010 includes project templates, IDE support, IntelliSense and integration of the F# Interactive tool window.  F# can be used to develop applications and components targeting .NET 2.0 through .NET 4 and Silverlight.  As a .NET language, F# can be used comfortably alongside C# and Visual Basic.NET.  And in .NET 4, core types that F# uses, such as Tuple, Lazy, and BigInteger, are now part of the .NET Framework and can be used across all .NET languages.

 

The F# Interactive tool window enables an explorative development style within Visual Studio.  Below you can see the F# source code for an F# script open in the Visual Studio editor and the F# Interactive tool window where code is executed interactively.  At the top right is the Form and graphics that the script has created. 

 

F# Interactive tool window

 

Units of Measure

One ground-breaking feature of F# is Units of Measure, which allows you to annotate your floating point code with units, such as meters and seconds.  This is simple to do, and errors will be reported during development when code combines units incorrectly.  This provides compile-time checking of the correctness of floating-point code without sacrificing performance.

 

Units of Measure

That’s a quick look at just a few of the exciting features of F#.  For more on F#, visit the F# Development Center on MSDN.

 

Namaste!

Making your application sparkle with Windows 7

The launch of Windows 7 is just around the corner.  Whether you prefer managed or unmanaged development, you can take advantage of Windows 7 features with new APIs and libraries to make your application shine.

 

Multi-Touch

Touch-based interfaces allow users to interact with applications in a more intuitive way.  Windows 7 introduces multi-touch input and manipulation processing through Windows Touch. 

 

For native C++ developers, MFC now supports using a touch-enabled interface.  MFC will do much of the heavy lifting: it listens for touch-related messages from Windows and calls out to a number of virtual functions to handle them.  Developers merely need to register for touch input, set the gesture configuration, and override these virtual methods as required to touch-enable their application.

WPF 4 includes object model additions for touch interfaces so managed code developers can easily add touch support to their applications as well. Multiple finger input will be exposed through existing and new input events, while new manipulation and inertia events will be exposed for developers to consume.

 

Ribbon

Adding a Ribbon to your application can help organize your commands, tasks, and menus in a friendly way that makes it easier for your customers to find what they’re looking for.  Whether your application is written in Win32, MFC, or WPF, new controls and APIs will help you add a Ribbon to your application.

 

If you write Win32 applications, the Ribbon framework provides a set of APIs for creating a Ribbon for your application.  You can find out more about the Windows Ribbon Framework for Win32 here.

 

Visual Studio 2008 SP1 added support for an Office “look and feel” Ribbon UI to MFC applications.  Visual Studio 2010 adds “look and feel” support for the Windows Ribbon, including an MFC Ribbon designer to make creating and editing ribbons much easier.  An XML format for persisting Ribbon designs simplifies UI development by removing the need to “design in code”.

 

Ribbon Designer 

 

The new WPF Ribbon Control will be released out of band around the same time as WPF 4 through the Office UI Licensing site.  You can find instructions on downloading the WPF Ribbon (currently in Preview) here.  The WPF Ribbon will feature skins for Windows 7 and Office and all the standard Ribbon features that users are familiar with, including tabs and groups, dynamic resizing, quick access toolbar, application menu, contextual tabs, key tips, and more!   The Ribbon will remain available as a separate, standalone assembly.

 

Location

Windows 7 features the Location platform, which makes it easy to write applications that can make use of the user’s location.  The Location platform opens the doors to some interesting application scenarios – especially on mobile computers.  For example, a location-aware application might use the current location to show the user nearby restaurants or shops, or an instant messaging or email application might tag messages with the sender’s location.  

 

The Location platform provides a way for location devices, such as GPS and WWAN radios, to integrate with Windows and includes an API that applications can use to determine the current location of the computer.  Because the Location API exposes its functionality through COM interfaces, C++ programmers and scripting language programmers alike can take advantage of it.  The Windows 7 SDK includes samples and documentation to help you build location-aware applications.  Find out more about the COM Location API on MSDN. 

 

In addition to the COM Location API, .NET Framework 4 will include built-in managed APIs for location, making it easy for .NET applications to take advantage of Windows 7’s location capabilities.

 

Shell Integration

Windows 7’s Shell enhancements empower application authors to provide a richer integrated user experience.  Jump Lists provide access to contextual startup tasks and files available to the applications.  For instance, right-clicking on the Outlook icon will show the mail messages you’ve recently opened in the Jump List:

 

Jump Lists 

 

The new taskbar is less cluttered and can convey more information at a glance.  The taskbar allow you to pin any program to the taskbar or rearrange the icons on the taskbar by clicking and dragging.  Aero thumbnails, which appear when you hover over an icon in the taskbar, support view customization and user commands.  Below is an Aero thumbnail that supports commands for controlling media playback.

 

Aero thumbnail user controls 

 

MFC adds support for new Windows 7 shell features.  By default, files opened by an MFC application through the “File Open” dialog will be added to your recent files Jump List.  If you wish to override the default behavior, MFC also provides APIs that allow you to customize the contents of your application’s Jump List.  MFC has also added support for High DPI and many of the new Windows dialog features. Below, the Open File dialog has been customized with additional controls:

 

Customizing the Open File dialog 

 

Adding MFC support for Search, Preview and Thumbnails was an obvious choice. Now you can search your MFC documents in Explorer’s search field and see Icons and Previews just like Office applications. 

 

Search

 

If your application’s installer needs to access or update files that may be locked or in use, Restart Manager can handle application shutdown and restart, or eliminate or reduce the number of system restarts required for an install.  With just a few lines of code, you get full Restart Manager support with automatic timed backup of currently opened documents. MFC has added support for the Transactional File System in ATL as well.

 

These new MFC features will be available in Visual Studio 2010.  To take advantage of some of these features (such as Jump Lists), you will only need to recompile to get the updated user experience, while for others (such as Windows Touch or Restart Manager support) you will need to add a few lines of new code to incorporate new functionality.

 

WPF 4 allows you to use Windows 7’s new Shell features in your WPF applications as well. WPF 4 integrates Windows 7 Jump List functionality, including Tasks, Items, Recent and Frequent Lists, and Custom Categories. Windows 7 taskbar integration in WPF 4 includes progress bars, overlay icons, thumbnail buttons with command support, description text, and Desktop Window Manager (DWM) thumbnail clipping.

 

Learn More

This is just a taste of the ways you can build great Windows 7 applications.  For more information, visit the Windows Team Blog and MSDN’s Windows 7 Developer Guide.

 

Namaste!

Walking down memory lane...

Sometimes, we get caught up in what we are currently doing, the day-to-day stuff, the impending deadlines and the like.  Once in a while, it is good to take a step back and reflect upon the jounrey - the why, the what, the how and the where.

Recently, I got such an opportunity when I got a call to come in for a video-shoot for the Visual Studio documentary.  I wasn't sure what to expect or what the end product was going to look like but given my epxerience with Channel 9 from the past, I said let's take a bet and do it.  It was fun doing it.

The team completed this project recently and earlier today posted the Visual Studio documentary (part 1 and part 2) up on Channel 9.

I found it interesting particularly to hear from some of my colleagues including Anders Heljsberg, Dave Mendlen, Jason Zander and Scott Guthrie who all have been a part of this product line for a long time.  Hope you find this enjoyable.

Namaste!

More Posts Next page »

Page view tracker