Visual Studio 2008 and .NET Framework 3.5 "SP1" Beta

VS2008 and .NET Framework 3.5 offer a ton of customer value from Linq to Ajax and much more.  The service pack we have been working on to round out this release adds even more new value in addition to fixing a 100s of customer reported bugs!  All of it is driven by customer asks and I am excited about how we have begun to embrace a model of providing great customer value on a very regular cadence. 

Omar Khan and I recently recorded a DotNetRocks episode where we talked about all these great things.  I thought it would be fun to list just a few of my personal favorite new features in this SP...

What is your favorite one? 

For Web Developers:

- ASP.NET Dynamic Data makes building data driven web applications amazingly easy!   Now only does this work great with LinqToSql and LinqToEntities, but we can now support any OR mapping technologies.  The great folks working on LLBLGen have done the work to wire it into dynamic data.  We are also working with all the third party control vendors and they have controls on the way to work with Dynamic data. 

image

Check out the videos, podcast and reference material.

DynamicData - Main Menu  DynamicData - Product Details DynamicData - Products

- Url Routing is now built into ASP.NET!  So you can now customize your URLs in any ASP.NET application!

https://products/details/123  instead of https://products/details.aspx?id=123 
See Phil's blog for more information.

- Source code formatting for JavaScript - You can now format your javascript code in the same way you do with C# or VB.NET today.  No more spaghetti javascript!

clip_image002[9]

- Speaking of JavaScript, we significantly improved the javascript interpreter that runs behind scenes in VS and it now supports most other JavaScript frameworks giving you great intellisence. 

clip_image002

- Speaking of Ajax, we now support Ajax History server side via ScriptManager.AddHistoryPoint() as well as client side via the Microsoft Ajax Library.  This allows you to programmatically handle the "back button" and to add permalink and deeplinking support to your existing ASP.NET applications. 
Read more, watch the videos, etc.

- Also, on the subject of Ajax, we now, out of the box fully support script combining.  This support enables server side combining and therefore compression of multiple smaller JavaScript files.  This greatly reduces page load time because compression ratios are better on one larger file and one request is quicker than multiple smaller requests.  For example, take a reasonably complex Ajax application and look at how many calls are being made via FireBug

image

Now, turn on ScriptCombining in ScriptManager  and presto!

image

Read more here, see my blog from my mix talk

Also, we just released a very cool script profiling tool that can show you just what is loaded and, in exactly the format you need for ScriptManager...

<cc2:ScriptReferenceProfiler ID="ScriptReferenceProfiler1" runat="server" />

 

Visual Web Developer Express (that is the free version of VS) now supports Web Application Projects (WAP) and Class Library Projects.  This enables both ASP.NET MVC as well as Silverlight 2 development from Express!  I am relieved that I can now go back to doing all my demos in Express! 

Classic ASP development is back!  This was a very painful cut from VS2008 and I am glad it is back as many of our customers have to support older web applications.

For Client Developers

- .NET Framework Client Profile - Smaller .NET Framework Redist optimized for client scenarios

image

  1. Immediate Responsiveness - Bootstrapper is tiny (200K) to enable the fastest possible response to app setup URL.   No waiting around wondering if the click registered.  No “unpackaging” UI.  After the security prompts, the user immediately is presented with the EULA.
  2. 3 Clicks from 0 to 60 - We’ve got it down to the fewest possible number of clicks (1 for running exe, 1 for cert, 1 for eula) that are absolutely required for installing both the framework and the application.   For ClickOnce apps, the user clicks accept on the EULA and when setup completes the application and the framework is automatically launched. 
  3. Integrated, Custom/Branded UI - The framework and app as well as additional components can be packaged together so that there is a seamless install experience.  We now have a single progress bar indicates status overall.
  4. Reliable - We have poured through the error logs to debug and find root causes for setup failures... We think we are a LOT better now.  We are installing less stuff and doing it in a more solid way.
  5. Install Speed - We’re at 26.5 mb.  On a clean XP machine with a typical consumer broadband connection, the setup will take approximately 6 minutes.  On faster connections, setup will get even faster (4.5 minutes). 
  6. App first run - The app first run experience is quite nice.  Because we are ngening fully during the install, nothing is competing with the app at startup, no JITing, and bits are warm.   The user sees the setup window disappear and 3 seconds later, the app splash screen followed quickly by the app itself.  Nice.

Note: some of the above will be most noticeable in the RTM of SP1....

- Significant cold start performance wins... You will absolutely notice this with larger client applications.  

- Lots of WPF performance improvements with text, graphics, animations, etc

- WPF Effects API  which enables custom hardware accelerated effects on any control or shape in WPF.  Check out System.Windows.Effects.

- WPF Designer Event Tab Support

image

- Sort properties alphabetically

image

- Margin Snap Lines makes is way easy to do great form layout in the WPF designer

image

- Better XAML debugging.  You can now easily navigation to the offending line in your XAML file

image

- New WebBroswer Control in System.Windows.Controls 

image

 <WebBrowser Source="https://blogs.msdn.com/brada" > </WebBrowser>
 
 

- A new BindingGroup in System.Windows.Data (additional databinding support)

A ton of valuable ClickOnce update

  • ClickOnce application publishers can now decide to opt out of signing and hashing the ClickOnce manifests as they see appropriate for their scenarios.

image

  • ClickOnce error dialog boxes now support links to application specific support sites on the Web
    image
  • ClickOnce applications can now be programmatically installed through a ‘Setup.exe’ while displaying a customized, branded install UX
  • Better Support for generating MSI + ClickOnce application packages
  • FireFox browser extension to support Clickonce installations using FireFox browsers
  • Design time support for setting file associations

 image

- Windows Forms get Line and Shape controls for all languages.  A new set of controls in the toolbox enable some cool shape controls for WinForms developers. 

image

- Run off a network share with local permissions - You have voted and we have listened!  We have brought managed executables in line with native code executables in how they behave when run off a network share.  Yea! 

image

For VB Developers

You can now add "XML to Schema" items to Visual Basic projects.

 

and get the great VB XML intellisense against it

 

For C# Developers

VB developers have long loved the feature of being able to get information about any sort of potential compiler error as they type.  C# developers on the other hand often have to relay on the lack of a feature (intellisence) to figure out if they are going to have a problem.  Now C# developers get clean, unobtrusive information about potential issues as they type.  A couple of examples:

clip_image002[11]

If you hover over the i in the above example it will tell you i is used before it is set.

clip_image004

if you hover over the Foo in the above example it will tell you no such method exists. 

Notice, these errors show up in the error list and are cleared automatically as you fix your code. 

All real time, as you type!  The error analysis happens at the expression level. This means that not every possible errors are caught (for example many errors outside of the method body). 

For Data Developers

Most notably we have fully plumbed SQL Server 2008 support throughout VS 2008 and .NET Framework 3.5... all the new datatypes are supported, etc.  

ADO.NET Entity Framework

The ADO.NET Entity Framework is the next evolution of ADO.NET, raising the level of abstraction at which programmers work with data, and allowing the database structure or data source to evolve without significant impact to the application code.

Rather than coding against rows and columns, the ADO.NET Entity Framework allows the definition of a higher-level Entity Data Model over your relational data, and allows developers to then program in terms of this model. Developers get to deal with the data in the shapes that make sense for the application, and those shapes are expressed in a richer vocabulary that include concepts like inheritance, complex types, and explicit relationships.

image

Use LINQ to Entities with the Entity Framework for queries that help create easy to maintain code that retrieves and works with strongly typed data objects or business entities.

image

There is a new asp:EntityFrameworkDataSource control which can be easily configured..

image

See more information on ADO.NET Entity Framework on MSDN

ADO.NET Data Services:

The Microsoft ADO.NET Data Services framework provides a first-class infrastructure for developing the next wave of dynamic Internet applications by enabling data to be exposed as REST-based data services that can be consumed by client applications (Windows Forms, WPF, ASP.NET, AJAX, Silverlight, etc.) in corporate networks and across the Internet. Easily build applications using a comprehensive set of .NET libraries and client components, accessing data through uniform URI syntax and using standard HTTP verbs to operate on the resource.  Use the Data Services client support and LINQ to program to your service through strongly typed .NET classes.

ADO.NET Data Services provides a framework to build data services for relational data sources, such as Microsoft SQL Server, MySQL, DB2, and Oracle, using the built-in support for the ADO.NET Entity Framework, or for non-relational data sources using the pluggable provider model. 

You can download the Ajax client library for Data Services here

image

image

ADO.NET 3.5 Provider Support

The list of provider writers is available on MSDN.  All up, there are 8 different companies writing 22 different providers against 14 different back end databases committed to have public availability within 3 months of RTM.    Here is a sampling:

IBM DB2 data server and Informix Dynamic Server (IDS) databases
MySQL databases
Oracle databases
PostgreSQL database versions 7.3+ and 8.x
SQLite databases
Sybase
VistaDB databases

For Service Developers:

Improvements in the areas of performance and scalability, such as:

  • Scalability increases of 5X – 10X for Web-hosted applications  in IIS7
  • Significant performance improvements in Work Flow Designer  for projects with a large number of activities.

Improvements in the area of user experience, such as:

  • Enhanced TestClient support to target a richer and broader set of WCF services, while providing the option to run the TestClient in a standalone fashion.
  • New Hosting Wizard for WCF Service projects

Improvements in the area of productivity, such as:

  • Improved Usability of DataContract Serializer, via the automatic serialization of types without the need to annotate the types with [DataContract] and [DataMember] attributes.
  • Improved Debugging in Partial Trust by adding support for accessing Event Logs when running Partial Trust
  • Improvements in REST capabilities of WCF by making it easier to use the UriTemplate feature, adding support to specify defaults and providing greater control over the UriTemplate.  The addition of the ServiceDocuments object model now allows easier publishing of APP metadata and easier consumption of service document for REST clients

Improvements in the area of data platform, such as:

  • Support Entity Fx entities in WCF contracts

Support for renaming Services in VS - if you invoke Rename on a WCF Service VS will rename all of the artifacts associated with that service (config, .svc file, etc.). 

image image image

          <service behaviorConfiguration="WebApplication7.Service1Behavior"
              name="WebApplication7.CoolNewService">

In Closing

I hope you are as excited as I am about SP1 and you go download the beta and let us know what you think!  The window is really tight for feedback, so anything you can get us soon would help.  I am particularly interested in compat issues... as this is an SP, we are working hard to ensure it works with all apps.     As this is an SP, it does update core parts of the tools and runtime stack, so I would NOT recommend installing on your production machine until the final RTM later this year.  Rather use a VPC our test machine (that is what I am doing now).   Related to this, there is a known issue that the Silverlight 2 tooling will not work with SP1 beta... we are fixing that for SP1 RTM of course, but it is a short term issues. 

Download links:

Update (5-14): Visual Studio 2008 SP1 Beta Resets Settings to Defaults

We recently found a bug with the VS2008 SP1 install... when installing Visual Studio 2008 SP1 Beta on top of Visual Studio 2008, VS user settings are reset to default VS settings.  This bug is caused by code originally put in place to reset settings when upgrading minor version of VS, for example from VS Beta1 to VS Beta2 so that VS would have the latest default profile settings.  VS does migrate settings from VS 2005 to VS 2008.  VS certainly should keep user settings when upgrading to a service pack, which will be fixed for SP1.

Please backup your VS settings before upgrading to VS 2008 SP1 Beta.

Before installing SP1 Beta1, use the "Export Settings" wizard (“Tools” menu, “Import and Export Settings…”) to save your current settings, then install SP1 Beta1, and then use the wizard to import your settings back into VS.

This issue will be resolved for the final release of Visual Studio 2008 SP1 where settings will be maintained when upgrading.

We sincerely apologize for the troubles this has caused