Visual Studio 2010 Beta1 – Unknown build error workaround

May 28, 2009

I’ve been working a good bit with the new Visual Studio 2010 Beta1 and really like the new designer features, .NET 4.0 features and VB language changes.

I have been getting the following error during project builds:

Error 1 Unknown build error, ‘Could not load file or assembly ‘file:///C:\Users\molenator\Documents\Visual Studio 10\Projects\MasterDetailDataSourcesWindowDemo\MasterDetailDataSourcesWindowDemo\obj\x86\Debug\MasterDetailDataSourcesWindowDemo.exe’ or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0×80070020)’  MasterDetailDataSourcesWindowDemo

When this happens rebuild your solution. (Build menu, select Rebuild Solution).  Solution will rebuild successfully.

If you encounter problems like this, please report them on Microsoft Connect.

Have a great day,

Just a grain of sand on the worlds beaches.


WPF and Silverlight Designer for Visual Studio 2010 Home Page

May 27, 2009

I’m pleased to announce that the WPF and Silverlight Designer for Visual Studio 2010 has a new home page you can visit here.

The home page has links to articles and videos that help developers get the most from the designer.  The home page can also be accessed from the WindowsClient.NET Learn page.

Developers new to WPF or Silverlight can quickly get up to speed with the designer, learn it’s features, capabilities and some workflow tips when using the designer features.

For the XAML Heads out there, you’ll be pleasantly surprised with the new features and capabilities.

Additional content will continue to be rolled out on the site.  The next article and video will be on WPF Layout Controls and using the designer features to layout forms.

Please leave comments on the new designer features and workflow either on this post or the articles or videos.  My team at Microsoft is looking forward to comments from developers on the designer.

Have a great day,

Just a grain of sand on the worlds beaches.


WPF 4.0 Data Binding Change (great feature)

May 27, 2009

WPF 4.0 has a great change to the data binding pipeline that me and others have been patiently waiting for.  Many thanks to the WPF Team for implementing this feature.

Properties are now automatically reread from the binding source after the UI controls set the property value. 

This feature enables the business entity objects to modify the value coming from the UI and have that value automatically reflected back to the UI.

Example

A classic example of this feature in action would be a state field. 

  • User enters wa in a TextBox
  • State property on the business object is updated to wa
  • Business rules change the case of the entered value to upper case setting the value to WA
  • Data binding pipeline now automatically rereads the State property value and sets the TextBox.Text to WA

Before this great feature, developers could implement a workaround by adding a no-op converter to each TextBox binding.

You can read about the issue that still exists in .NET 3.0 and .NET 3.5 projects here.

This feature is not dependent on the business object implementing the INotifyPropertyChanged interface.

Simple Business Object Code

Public Property State As String
    Get
        Return _strState
    End Get
    Set(ByVal value As String)
        _strState = value
        If Not String.IsNullOrEmpty(_strState) Then
            _strState = _strState.ToUpper
        End If
        OnPropertyChanged("State")
    End Set
End Property

State Field Runtime Behavior Demonstrated

 StateBeforeandAfter

Email Field Runtime Behavior Demonstrated

The Email property business rules will change the TextBox value to lower case.

EmailBeforeandAfter

Download – Requires Visual Studio 2010 Beta1 or later

After downloading the project, please change the extension from .doc to .zip.  This is a requirement of WordPress.com.

Sample Application (80KB)

Have a great day,

Just a grain of sand on the worlds beaches.


Getting to know ClickOnce Deployment

May 22, 2009

While in Los Angeles several attendees of the “WPF for Line of Business Tour” asked about ClickOnce as a deployment strategy for their Intranet WPF applications.

I met with the ClickOnce runtime team a few days ago and got these below resources for ClickOnce.

Recommended Book

Smart Client Deployment with ClickOnce by Brian Noyes

Available Books

The below books have not been specifically reviewed, but do provide varying details on ClickOnce and may be valuable to you.

Use ClickOnce to Deploy Windows Applications (O’Reilly)

Deploying .Net Applications with MSBUILD and ClickOnce (Apress)

Pro WPF (Apress)

Good links for getting ramped up on ClickOnce

http://msdn.microsoft.com/en-us/library/wh45kb66.aspx
http://msdn.microsoft.com/en-us/library/t71a733d%28VS.80%29.aspx
http://en.wikipedia.org/wiki/ClickOnce
http://www.installsite.org/pages/en/clickonce.htm (some links broken / out of date).
http://www.softinsight.com/bnoyes/CategoryView,category,ClickOnce.aspx
http://blogs.msdn.com/pstubbs/archive/2007/05/17/vsto-my-favorite-feature-clickonce-deployment.aspx
http://msdn.microsoft.com/en-us/magazine/cc188708.aspx
http://blogs.msdn.com/mwade/archive/2008/08/29/what-s-new-in-visuall-studio-2008-sp1-clickonce-tooling.aspx
https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=60593

Third Party Tool

The following third party tool provides additional features that may be of value to you.

ClickOnceMore 

Have a great day,

Just a grain of sand on the worlds beaches.


Thank You London, UK and European Developers

May 20, 2009

Jaime Rodriguez and I just returned from London, the second stop for the WPF for Line of Business Tour.

I feel privileged to have spent two days with a fantastic group of professional developers from London, surrounding UK areas and Europe.  Thank you all for your active participation and hospitality.  I wish each of you great success in your development careers.

Download Links

Presentation Decks

Source Code, Example Projects and Introduction MVVM Lab

Jaime has also posted a thank you with the downloads here.

Have a great day,

Just a grain of sand on the worlds beaches.