19 Apr 2011

What's new in Microsoft .NET Framework 4 Platform Update 1?

Even this Pooh is confused by the new PU!Microsoft today made me happy & sad all at once! Let’s hit the bad news bit first: (rant start) WTF is a Platform Update? The .NET Framework must be the least logically named thing ever! We have had to endure such inconsistencies major releases be a point difference release (.NET 1.0 vs. .NET 1.1 and again with .NET 3.0 vs. .NET 3.5) while other times major releases are major number differences (.NET 2.0 & .NET 4 come to mind), we've had service packs be patch updates until .NET 3.5 SP 1 which included MASSIVE new functionality and had finally .NET 4 dropped the .0 after the 4 (see how many Microsoft staff mess this up still), in contrast to every release before it! There is zero logic or pattern in this naming, which just adds to MASSIVE customer confusion. Today we are introduced to a Platform Update, and not just PU (like Poo or Pooh) but PU1… that implies more is coming… so WTF is it? Rant over, promise.

It is NOT the new name for bug fixes, the PU is in fact the best news for Workflow Foundation people as it includes some seriously powerful new features.

untitled2We finally get a complete state machine in WF (dance):

  • Entry and exit actions for a state
  • Conditional and default transitions that have transition actions
  • Scoped variables for a state machine
  • Improved tracking support

I know this was available on Codeplex for a while (and there is still other good stuff on there for WF not included in this), but this is just awesome to get it officially as this implies to customers a seriousness & support that having on Codeplex does not.

I would be happy if it was just that but they have ALSO given us the ability to use SQL Azure as a store for WF instances!!

This is HUGE!!

Just imagine storing a workflow in the cloud until you need it later? Ideas for roaming devices, workflows that span across devices and, naturally, better usage of worker instances in the cloud themselves all are opened up by this.

Lastly (and least-ly for me) they add the CompensationExtension class, which is used if you are creating your own host and wish to enable support for compensations in workflows. Not a big deal for me, but this could bring new features into my favourite host AppFabric, but we will need to see if that happens in the future.

The update comes in three parts:

  1. The runtime update. You need this to do development & you need to install this on machines that make use of the new features. You can get the update at KB2478063.
  2. The multi-targeting update allows Visual Studio to give you the option for this in VS as a drop down (see below) you can get this from KB2495638.

    untitled

  3. The designer update, which does include both of the above and provides all the bits needed to make use of the new features in VS. You can get it from KB2495593

So what you waiting for?! Go and get your workflow on!

11 Apr 2011

Lightswitch beta - No more files bug

ls-bugIf you are working with the Visual Studio Lightswitch beta and you hit F5, you may sometimes get the USELESS error “There are no more files”.

This will appear shortly after an explorer dialog opens up showing you files. I like to think this is LS way of mocking me: “look files, now there are no more files. hahahaha”

The cause of this you have edited code and something internally gets wonky. Thankfully the workaround is just open a screen or data source and hit F5 and it will work again!

I’ve logged a bug on this, so if you have this issue too please head over there and vote on it!

UPDATED! Info below...

Got to love Microsoft, it took 18min and they responded it is a known bug! Details from them how to fix it:

This is a known issue. There is a setting on Tools|Options, Projects and Solutions, Build and Run called 'For new solutions, use the currently selected project as the startup project'. If this option is enabled when you are using a LightSwitch project, you will get the behavior you see.

The problem is that if this option is enabled when the LightSwitch project is created, the project that is associated with the code file will be used for the debugging startup project. For LightSwitch, the root project should always be the startup project.

This option is automatically enabled for the Web and Web Code VS profiles. This option is turned off by default for the General, VB and C# VS profiles.

We have a fix that will be in the RTM release where we will ignore this option when a project is created and we will use the root LightSwitch project as the startup project.

To fix existing projects, you can right click on the root LightSwitch project and select 'Set as Startup Project' in the context menu.

11 Apr 2011

Community Night: BE THERE

Clipboard01Tomorrow is another community night, and I realised that there is MANY people who do not know about this fun event. This is a gathering of communities (or user groups or interest groups if you prefer) who meet on a regular basis. This is a totally free event which takes place the 2nd Tuesday of every month at Microsoft’s offices in Bryanston.

*Yawn* another Microsoft marketing session? WRONG! This is run by communities and Microsoft has NO say in the content or agenda, unless a community allows them Smile with tongue out Microsoft is really trying to help all communities by providing the facilities – not the content!

MobiZATo give a concrete example MobiZA, a user group focused on mobile development is doing a session on Android! talk about not Microsoft marketing there!

There is also a variety of communities in a attendance so you can also see things you would not have seen before, for example the business user group or the game developer group! And of course there is plenty of corridors for interesting discussions and some even contain food & drinks!

Hopefully I have given you a taste of what is in store and why you should attend and you can find more details on the DPE team blog.

mapFinally, if you have a user group maybe you should think of joining us at community night? Free venue, projectors, seating, food & drink. Plus plenty of people attend, could be a great way to grow your group. I would personally love to see some Linux & PHP groups there because it would allow those who have not had a chance to see the non-Microsoft world an opportunity and hopefully learn that it isn’t so cut & dry out there.

Remember, tomorrow 12th April 2011 @ Microsoft (map to the left) from first sessions kick off at 16:30 and second sessions get started between 17:30 & 18:00!

07 Apr 2011

DevDays - The event for Microsoft Developers

imageIt’s that time of year again, it is DevDays time again which is the premier conference from Microsoft for developers! This year it is a very different beast from previous years:

  • Cost: For the second year, you’ll need to pay. This year it is R350 and that is excellent value for the event.
  • Cape Town first: It kicks off in Cape Town this year on May 24th and then moves to Johannesburg after that on may 26th!
  • Johannesburg new venue: We are at Gallagher Estate this year! Very excited about the venue!
  • No Durban Sad smile 
  • Hash tag from day one! See complaining to Cliff on Twitter does work so now we can all hash with #DevDaysSA!
  • No SharePoint – I can’t remember a DevDays without SharePoint, but we have so many other awesome SharePoint options now (Information Worker, SharePoint Saturdays etc…) it is good to have some balance.

There is three tracks so you may want to brush up on how to pick good sessions (short answer, mine Winking smile) plus their is special slots for student & community sessions which really excites me to see new presenters getting big stage time!

I am also very glad that BBD Software (previously known as BB&D) is a major sponsor this year!

You can signup, get more details and engage on the official site at: http://www.microsoft.com/southafrica/devdays/

Agenda:

  • End-to-end software testing with Team Foundation Server and Visual Studio
    • Level: 200
      Speakers: Ahmed Salijee & Colin Dembovsky
      Visual Studio 2010 offers a wide range of software testing capabilities: manual testing, automated UI testing, database testing, low-level unit testing and even performance testing tools capable of simulating thousands of active users. It also provides support for test case management, defect tracking as well as configuring and running your tests in virtual and physical environments. But how do you know which tools to choose for your project? This session will, via a demo scenario, walk you through the various testing capabilities to assist you with the most effective use of Visual Studio 2010's testing capabilities. This session will be useful to developers as well as various tester roles including functional, performance and automation.
  • An end-to-end experience of Windows Phone 7 development
    • Level: 200
      Speaker: Rudi Grobler
      An end-to-end walk through for developing Windows Phone 7 applications using Silverlight
  • Blend: Wiring it all together
    • Level: 400
      Speaker: Shane Morris
  • A lap around Internet Explorer 9 for web developers
    • Level: 200
      Speaker: Simon Wilkinson
      Internet Explorer 9 adds new support for HTML5, CSS3 and many other new web standards, and this is the place to find out all about them. Not only will we learn about those, but we'll take a dive into the work the engineering team has done to make the browser faster through it's new JavaScript engine, the work they've done to ensure that the same mark-up works across all browsers and how hardware acceleration will make your site run faster, without any changes to your code!
  • Azure: Development from scratch
    • Level: 200
      Speaker: Gareth Jane
      The Windows Azure platform is a flexible cloud-computing platform which allows developers to rapidly create highly scalable software applications. This session will introduce developers to the various services and components of the Windows Azure Platform. We will create a very simple application on this platform, especially focusing on the areas which distinguish development on Azure from traditional application development
  • ASP.NET web development with MVC
    • Level: 400
      Speaker: Brent Samodien
      Join us in this session and discover the new features in ASP.NET MVC3 and what scenarios you can target with it. Learn more about the improved HTML Helpers and the new updates to Controller/Action/Method that make your code cleaner. Also, explore the richer URL routing and URL route mapping. We will also show how you can use alternative View Engines, including Razor.
  • A website's life: From sketch to publishing
    • Level: 200
      Speaker: Simon Wilkinson
      WebMatrix is a new, free, fully featured, easy to install web development tool that helps you build ASP.NET and PHP websites and perform validation, SEO optimization and one-click publishing. My favourite feature however is a new script syntax for ASP.NET called Razor, which will help you create dynamic websites incredibly easily. We will spend some time sketching/wireframing our website, doing visual design work in Expression Design and then experiencing the rich development toolset in WebMatrix.
  • Let's get ready for the cloud: Building your applications so they
    are cloud ready
    • Level: 400
      Speaker: Robert MacLean
      In a world where you hear people talking about the cloud, here are some guidelines on how to start building and structuring applications that will be easy to migrate to the Azure platform.
  • Code First in entity framework
    • Level: 200
      Speaker: Brent Samodien
      Code First has been a great success with customers, and in this talk, we'll take a deep dive into how it works and talk about its upcoming RTM (Q1 2011). You'll see how Code First uses convention over configuration to improve developer productivity. Its flexibility allows for either automatic database provisioning or the ability to work with an existing database. We'll be demoing features beyond the initial RTM, such as Migrations support, and we'll also talk about the roadmap for Code First going forward
  • Silverlight 5: The Future
    • Level: 200
      Speaker: Shane Morris
  • Exploring Windows Azure storage
    • Level: 400
      Speaker: Gary Hope
      Examine each of the foundation storage capabilities of Windows Azure, Blobs, Tables and Queues. Discover how to create storage accounts; upload and retrieve blobs and blob metadata; create, update and query tables; and create a simple service that uses a message queue for communication
  • LightSwitch basics: Building your first LightSwitch application
    • Level: 200
      Speaker: Robert MacLean
      Visual Studio LightSwitch is the simplest way to build business applications for the desktop and cloud. LightSwitch simplifies the development process by letting you concentrate on the business logic, while LightSwitch handles the common tasks for you. In this demo-heavy session, you will see, end to end, how to build and deploy a data-centric business application using LightSwitch. After that you will discover what is under the hood to better understand the architecture of a LightSwitch application. Finally you will learn how you can use Visual Studio 2010 Professional and Expression Blend 4 to customize and extend its UI and Data layers for when the application's requirements grow beyond what is supported by default
  • Kung Fu Silverlight: Tips and architectural patterns and practices
    • Level: 400
      Speaker: Dave Russell
      Learn about the rewards of using RIA Services together with development patterns, such as the Service Providers, Single Responsibility pattern, Commanding, user Interactions, Messaging, ChildWindows, Design Time Data, Testing, and developing using Model-View/View- Model (MVVM) pattern, to build Silverlight and Windows Phone apps. Hear the top tips you need to know for building data driven Silverlight apps that solve real world problems.
05 Apr 2011

Install Tailspin Travel on Windows 7 SP1

imageIf you try and install the tailspin travel demo on Windows 7 with service pack 1 , it will fail saying the operating system is not supported Sad smile

Thankfully this is easy to fix, in the C:\TailspinTravel\assets folder is a Dependencies.dep  file. Open that in notepad (or text editor of your choice) and navigate to the <os> element. Note the buildNumber attribute is set to: 7000;7100;7600

All you need to so is change it to: 7000;7100;7600;7601

As in the screenshot above, now save and rerun setup and you will succeed!

30 Mar 2011

How to attach to process before the application even starts?

There is many ways to do debugging in Visual Studio, normally you just hit F5, compile & run the code with debugging. However sometimes you need to debug an executable you have already built or debug on another machine. I have mentioned this previously you can use the Attach to Process option to do debug MSCRM assemblies that exist on other machines and/or run by a executable you do not control.

image

This works great but recently I had an issue where the application would start and (silently) die within seconds, but only in test (never in dev). It just happened so quickly that I could not attach the debugger in time. So how can you debug that scenario?

Thankfully this is very easy, just go to your Visual Studio project settings and switch the Start Action to Start External Program, set the path to the executable and then hit F5!

image

What this will do is start the executable, attach the debugger and work with your code all for you – so no more racing against the attach to debugger options Smile

30 Mar 2011

Missing Code Analysis

If you have Visual Studio 2010 you may be annoyed when you want to run code analysis and it is just not there! You can configure it, but cannot run it?!

image

The reason is that code analysis is only available for the selected project, and you likely have the solution selected in the Solution Explorer (or Solution Navigator). You will need to select the project first and it will appear.

image

No solution wide code analysis yet either. However I believe these annoyances will be corrected in the next version of Visual Studio Winking smile

30 Mar 2011

NDepend: Power tip to analyse quickly

Update: This has changed with version 3.8, read the awesome news at A follow up to my NDepend pro tip...

I am a a big NDepend fan – I can’t imagine doing analysis or taking over new projects without it! If you have not heard of NDepend, then have a look at: NDepend - The field report

I feel stupid for not finding this power tip before, but recently I had about 20 projects to analyse - a situation that appeared to be painful because it meant creating NDepend projects for each one.

Thankfully I stumbled on the terribly named Select .NET assemblies to Analyze option in the file menu. This is option is actually a way to create a quick temp NDepend project!

image

Once you have clicked that, you should click the choose VS solutions option and you get another great dialog showing you a list of your Visual Studio recent solutions! This is great because I would load the code in VS, build it (to make sure it can build) and run code metrics against it and having this quick selector linked to VS meant that I do not need to browse for the solution NDepend again!

Possible bug in it though, where it doesn’t show web projects; WinForms, console apps etc… all fine just not web projects?!

image

Select the one you want, hit OK twice and analysis starts!

Happy analysis!

Pages