<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Beth Massi - Sharing the goodness that is VB</title><subtitle type="html">&lt;font size="2"&gt;
&lt;a href="http://msdn.com/vbasic" alt="Everything you need is here!"&gt;Visual Basic Developer Center&lt;/a&gt; | &lt;a href="http://blogs.msdn.com/vbteam/" alt="The people who eat, sleep, breathe VB"&gt;VB Team Blog&lt;/a&gt; | &lt;a href="http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx" alt="Get started learning now!"&gt;How-Do-I Videos&lt;/a&gt; | &lt;a href="http://msdn2.microsoft.com/en-us/vbasic/aa701257.aspx" alt="Make your life easier"&gt;Power Packs&lt;/a&gt; | &lt;a href="http://msdn2.microsoft.com/en-us/vbasic/ms789074.aspx" alt="Learn by examples"&gt;Code Samples&lt;/a&gt; | &lt;a href="http://channel9.msdn.com/posts/funkyonex/" alt="The best interviews on the net!"&gt;VB Interviews&lt;/a&gt;&lt;/font&gt;</subtitle><id>http://blogs.msdn.com/bethmassi/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/bethmassi/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-12-02T19:16:00Z</updated><entry><title>“How Do I” Videos for Visual Studio 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/02/09/how-do-i-videos-for-visual-studio-2010.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/02/09/how-do-i-videos-for-visual-studio-2010.aspx</id><published>2010-02-09T17:52:00Z</published><updated>2010-02-09T17:52:00Z</updated><content type="html">&lt;P&gt;If you haven’t seen these yet, various members of the languages team have released some How Do I videos on Visual Studio 2010 including new language features in Visual Basic 10 and C# 4. &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vbasic/ee681550.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vbasic/ee681550.aspx"&gt;How Do I: Use Autoimplemented Properties in Visual Basic?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vbasic/ee681551.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vbasic/ee681551.aspx"&gt;How Do I: Use Implicit Line Continuation in Visual Basic 10?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/vbasic/ee625744.aspx" target=_blank mce_href="http://msdn.microsoft.com/vbasic/ee625744.aspx"&gt;How Do I: Use Highlight References in the Visual Studio 2010 IDE?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/vbasic/ee625748.aspx" target=_blank mce_href="http://msdn.microsoft.com/vbasic/ee625748.aspx"&gt;How Do I: Use Code Snippets in the Visual Studio 2010 IDE?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/vbasic/ee633445.aspx" target=_blank mce_href="http://msdn.microsoft.com/vbasic/ee633445.aspx"&gt;How Do I: Use Generate from Usage in Visual Studio 2010?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/vbasic/ee681649.aspx" target=_blank mce_href="http://msdn.microsoft.com/vbasic/ee681649.aspx"&gt;How Do I: Enhance Performance in the Visual Studio 2010 IDE when Editing VB Code?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/vbasic/ee672313.aspx" target=_blank mce_href="http://msdn.microsoft.com/vbasic/ee672313.aspx"&gt;How Do I: Step with The Debugger in Visual Studio 2010?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vcsharp/ee460905.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vcsharp/ee460905.aspx"&gt;How Do I: Use Named and Optional Parameters in C# 4.0?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vcsharp/ee460939.aspx" mce_href="http://msdn.microsoft.com/en-us/vcsharp/ee460939.aspx"&gt;How Do I: Use COM Interop and Office in C# 4.0?&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Also make sure to check out the &lt;A href="http://blogs.msdn.com/bethmassi/archive/2010/02/08/updated-samples-for-visual-studio-2010-release-candidate.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2010/02/08/updated-samples-for-visual-studio-2010-release-candidate.aspx"&gt;VS 2010 code samples and walkthroughs&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9960615" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Visual Basic" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Visual+Basic/default.aspx" /><category term="Videos" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Videos/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/bethmassi/archive/tags/C_2300_/default.aspx" /></entry><entry><title>Updated Samples for Visual Studio 2010 Release Candidate</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/02/08/updated-samples-for-visual-studio-2010-release-candidate.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/02/08/updated-samples-for-visual-studio-2010-release-candidate.aspx</id><published>2010-02-09T01:16:12Z</published><updated>2010-02-09T01:16:12Z</updated><content type="html">&lt;p&gt;If you haven’t heard, &lt;a href="http://blogs.msdn.com/jasonz/archive/2010/02/09/announcing-vs2010-net-framework-4-release-candidate-rc.aspx" target="_blank"&gt;Jason Zander announced today&lt;/a&gt; that the Release Candidate (RC) for &lt;a href="http://go.microsoft.com/fwlink/?LinkID=151797" target="_blank"&gt;Visual Studio 2010 is now available for MSDN Subscribers here&lt;/a&gt;. The RC will be made available to the public on Wednesday the 10th. &lt;/p&gt;  &lt;p&gt;We also just refreshed all the WPF &amp;amp; Silverlight Data binding, VSTO and SharePoint Dev samples on Code Gallery to match the RC bits so check them out once you’ve downloaded and installed the RC:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;a href="http://code.msdn.microsoft.com/WPFDatabinding" target="_blank"&gt;Data Binding in Visual Studio 2010&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;a href="http://code.msdn.microsoft.com/OfficeDevFuture" target="_blank"&gt;Office Development in Visual Studio 2010&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;a href="http://code.msdn.microsoft.com/SharePointDev2010" target="_blank"&gt;SharePoint Development in Visual Studio 2010&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here’s some more additional resources to look through:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx" target="_blank"&gt;Visual Studio 2010 Walkthroughs&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd238515.aspx" target="_blank"&gt;Visual Studio 2010 Samples&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vbasic/dd819153.aspx" target="_blank"&gt;Visual Basic 2010 Resources&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Office Development with VS:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.com/vsto" target="_blank"&gt;VSTO Developer Center (http://msdn.com/vsto)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx" target="_blank"&gt;VSTO 2010 Resources&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/vsto/" target="_blank"&gt;VSTO Team Blog&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;SharePoint Development with VS:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx" target="_blank"&gt;SharePoint Developer Center&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/sharepoint" target="_blank"&gt;SharePoint Team Blog&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;WPF &amp;amp; Silverlight Data Apps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/wpfsldesigner/" target="_blank"&gt;WPF &amp;amp; Silverlight Designer Team Blog&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/vsdata" target="_blank"&gt;Visual Studio Data Team Blog&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9960110" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Visual Basic" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Visual+Basic/default.aspx" /><category term="WPF" scheme="http://blogs.msdn.com/bethmassi/archive/tags/WPF/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Silverlight/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Office" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Office/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="SharePoint" scheme="http://blogs.msdn.com/bethmassi/archive/tags/SharePoint/default.aspx" /></entry><entry><title>SQL Server 2008 Express How Do I videos</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/02/04/sql-server-2008-express-how-do-i-videos.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/02/04/sql-server-2008-express-how-do-i-videos.aspx</id><published>2010-02-05T02:45:04Z</published><updated>2010-02-05T02:45:04Z</updated><content type="html">&lt;p&gt;Recently I’ve gotten a lot of questions about how to work with and connect to SQL Express data. (&lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/express.aspx"&gt;SQL Express&lt;/a&gt; edition is the free version of SQL Server that comes with &lt;a href="http://msdn.com/vstudio"&gt;Visual Studio&lt;/a&gt;). Well if you haven’t seen these videos on getting started with SQL Express you should check them out:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://www.msdev.com/Directory/SeriesDescription.aspx?CourseId=124"&gt;SQL Server 2008 Express How-To-Guide Series&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I recommend this one in particular, &lt;a href="http://www.msdev.com/Description.aspx?eventId=1464"&gt;SQL Server Express Troubleshooting&lt;/a&gt; which shows how to add logins to SQL server and troubleshoot connectivity problems. &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9958588" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="SQL Server" scheme="http://blogs.msdn.com/bethmassi/archive/tags/SQL+Server/default.aspx" /><category term="Videos" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Videos/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /></entry><entry><title>Community Article: Certificate Expiration in ClickOnce Deployment</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/02/02/community-article-certificate-expiration-in-clickonce-deployment.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/02/02/community-article-certificate-expiration-in-clickonce-deployment.aspx</id><published>2010-02-02T19:01:16Z</published><updated>2010-02-02T19:01:16Z</updated><content type="html">&lt;p&gt;We just published another community article onto the &lt;a href="http://msdn.microsoft.com/en-us/vbasic/default.aspx"&gt;Visual Basic&lt;/a&gt; and &lt;a href="http://msdn.com/vsto"&gt;VSTO&lt;/a&gt; Developer Centers by &lt;a href="http://robindotnet.wordpress.com/"&gt;Robin Shahan&lt;/a&gt; (Client App Dev MVP) on how to handle certificate expiration on ClickOnce deployments. She explains in her own entertaining way how to handle a variety of cases depending on the version of the .NET framework and what OS is installed. She even has a flowchart to help you navigate all the options… here’s a teaser:&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CommunityArticleCertificateExpirationinC_9AFB/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CommunityArticleCertificateExpirationinC_9AFB/image_thumb_1.png" width="687" height="283" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Sample source code is &lt;a href="http://code.msdn.microsoft.com/ClickOnceCertExp"&gt;included here&lt;/a&gt; which includes a PDF version of the full flowchart. &lt;/p&gt;  &lt;p&gt;Read the article &lt;a href="http://msdn.microsoft.com/en-us/library/ff369721.aspx"&gt;&lt;strong&gt;Certificate Expiration in ClickOnce Deployment&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9957114" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Visual Basic" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Visual+Basic/default.aspx" /><category term="Community" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Community/default.aspx" /><category term="ClickOnce" scheme="http://blogs.msdn.com/bethmassi/archive/tags/ClickOnce/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Article" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Article/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="C#" scheme="http://blogs.msdn.com/bethmassi/archive/tags/C_2300_/default.aspx" /></entry><entry><title>New Learning Resources on the Visual Basic Developer Center</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/02/01/new-learning-resources-on-the-visual-basic-developer-center.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/02/01/new-learning-resources-on-the-visual-basic-developer-center.aspx</id><published>2010-02-01T19:33:27Z</published><updated>2010-02-01T19:33:27Z</updated><content type="html">&lt;p&gt;A couple months ago we revamped the &lt;a href="http://msdn.microsoft.com/en-us/vsto/dd162433.aspx"&gt;Learn pages on the VSTO Developer Center&lt;/a&gt; with more content that allows you to pivot on more fine-grained topics and tasks under each type of Office solution. And as a result, we’ve had a lot more people finding the content they need.&lt;/p&gt;  &lt;p&gt;Today we’ve started doing the same type of organization on the &lt;a href="http://msdn.microsoft.com/en-us/vbasic/ms789086.aspx"&gt;&lt;strong&gt;Visual Basic Developer Center Learn pages&lt;/strong&gt;&lt;/a&gt;. We’ve started with the &lt;a href="http://msdn.microsoft.com/en-us/vbasic/cc817878.aspx"&gt;Introductory Topics&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/vbasic/cc743624.aspx"&gt;Language Syntax&lt;/a&gt; pages. To get there, head to &lt;a href="http://msdn.com/vbasic"&gt;http://msdn.com/vbasic&lt;/a&gt; and then click the &lt;a href="http://msdn.microsoft.com/en-us/vbasic/ms789086.aspx"&gt;Learn tab&lt;/a&gt;. There you will see a set of general topic areas to explore. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/vbasic/ms789086.aspx"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/NewLearningResourcesontheVisualBasicDeve_A285/image_3.png" width="592" height="274" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you select &lt;a href="http://msdn.microsoft.com/en-us/vbasic/cc817878.aspx"&gt;Introductory Topics&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/vbasic/cc743624.aspx"&gt;Language Syntax&lt;/a&gt; you will be taken to a new set of pages that lets you browse on more topics and tasks. Select a topic from the list on the left and the content will change on the right. I’ve collected a good set of content from a variety of sources like the MSDN library, blogs, How Do I videos, and other learning sites. Hopefully this organization makes it easier for you to find what you need related to language syntax whether that be a video, article, blog, webcast, etc. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/NewLearningResourcesontheVisualBasicDeve_A285/image_5.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/NewLearningResourcesontheVisualBasicDeve_A285/image_thumb_1.png" width="683" height="617" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;However, if you still like to see, say, all the videos or articles related to VB Language, you can select the icons on the right-rail. I’ll be working on this type of structure for the rest of these pages and will release them as I finish each one. It takes a while to categorize all the content I want so I rather release section by section. Next section I’m working on will be &lt;a href="http://msdn.microsoft.com/en-us/vbasic/ms789183.aspx"&gt;Data Access&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Am I missing a topic or some good content you want to see? Please send me feedback by making a comment to this post or &lt;a href="http://blogs.msdn.com/bethmassi/contact.aspx"&gt;send me an email&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Happy Learning!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9956517" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Visual Basic" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Visual+Basic/default.aspx" /></entry><entry><title>Creating a SharePoint Visual Web Part using Visual Studio 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/01/28/creating-a-sharepoint-visual-web-part-using-visual-studio-2010.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/01/28/creating-a-sharepoint-visual-web-part-using-visual-studio-2010.aspx</id><published>2010-01-29T03:27:13Z</published><updated>2010-01-29T03:27:13Z</updated><content type="html">&lt;p&gt;Last year we built a &lt;a href="http://code.msdn.microsoft.com/OBANorthwind"&gt;business application for order management for Northwind Traders&lt;/a&gt; on the Office and SharePoint platform using Visual Studio 2008 and Office &amp;amp; SharePoint 2007. Lately I’ve been writing articles that show how to upgrade it to Office &amp;amp; SharePoint 2010 using Visual Studio 2010. If you missed them:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/12/15/migrating-an-outlook-client-to-net-framework-4-in-visual-studio-2010.aspx"&gt;Migrating an Outlook Client to .NET Framework 4 in Visual Studio 2010&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/12/21/build-wpf-data-controls-for-outlook-addins-easily-with-vs2010.aspx"&gt;Build WPF Data Controls for Outlook Addins Easily with VS2010&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/bethmassi/archive/2010/01/15/migrating-a-2007-workflow-to-visual-studio-sharepoint-2010.aspx"&gt;Migrating a 2007 Workflow to Visual Studio &amp;amp; SharePoint 2010&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I also released the migrated sample application here: &lt;a href="http://code.msdn.microsoft.com/OBANorthwind"&gt;&lt;strong&gt;http://code.msdn.microsoft.com/OBANorthwind&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you look at the VS2010 solution in that sample you’ll see a few extra projects in there that add more functionality to our application. One of those new pieces is a Visual Web Part that shows low inventory from the Northwind database. Northwind’s operations department not only wants to see Order status in SharePoint (which we &lt;a href="http://blogs.msdn.com/bethmassi/archive/2010/01/15/migrating-a-2007-workflow-to-visual-studio-sharepoint-2010.aspx" target="_blank"&gt;built into our workflow&lt;/a&gt;) but also wants to be able to quickly eyeball any low inventory. Visual Studio 2010 includes many new project and item templates for SharePoint 2010, one being a Visual Web part. If you’re familiar with ASP.NET development then you can easily start building a SharePoint web part using Visual Studio 2010. Let’s see how we can do that.&lt;/p&gt;  &lt;h3&gt;Creating a Visual Web Part Project in Visual Studio&lt;/h3&gt;  &lt;p&gt;First thing you need to do is open Visual Studio as an &lt;strong&gt;Administrator&lt;/strong&gt;. You need to do this when you are programming against SharePoint because the debugger &amp;amp; tools need Administrator access to SharePoint. Visual Studio will warn you if you forget.&lt;/p&gt;  &lt;p&gt;Next create a new project and select SharePoint 2010 -&amp;gt; Visual Web Part. (Make sure you select &lt;em&gt;Visual &lt;/em&gt;Web Part and not Web Part). Name the project LowInventoryWebPart. The SharePoint Customization Wizard opens. Select your SharePoint site, in my case I’ve created a team site called Northwind. &lt;/p&gt;  &lt;p&gt;Notice that “Deploy as a farm solution” is the only option. This means that when you design a visual web part it is available to all site collections on the farm as opposed to a sandboxed solution which is only available at the site collection level. The key difference between these two is what processes they run in, farm being the IIS worker process, which dictates which access levels they have. For more information on the differences see &lt;a href="http://msdn.microsoft.com/en-us/library/ee361616(VS.100).aspx"&gt;Differences Between Sandboxed and Farm Solutions&lt;/a&gt; in the MSDN library.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_thumb.png" width="603" height="432" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click Finish and the the ASP.NET designer opens and displays a web user control that we can design. But first we need to add a service reference to our data service. If you recall we are &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx" target="_blank"&gt;exposing our line-of-business data&lt;/a&gt; (in this case the Northwind SQL database) &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/01/09/using-ado-net-data-services.aspx" target="_blank"&gt;over WCF-REST using a data service&lt;/a&gt;. As long as we can access this service from our SharePoint instance once we deploy, then we’re good to go. &lt;/p&gt;  &lt;p&gt;To add a Service Reference to the data service, select Project -&amp;gt; Add Service Reference. If your data service is in the same solution as in the case of this one, just click Discover to browse the types that the data service exposes. Set the Namespace to NorthwindService and click OK.&lt;/p&gt;  &lt;h3&gt;Designing the Visual Web Part and Loading Data&lt;/h3&gt;  &lt;p&gt;I don’t have any super-fancy design skillz here so we’re just going to create a data-bound GridView and then write a LINQ query to get the low inventory items to display. The key takeaway is that this would be the same code to write if we were writing any ASP.NET webpage, you can even use the Ajax controls in the toolbox. In the next section below we’ll take advantage of the SharePoint server model in order to interact with SharePoint lists, but to pull data from our LOB database it’s standard data access stuff. &lt;/p&gt;  &lt;p&gt;So from the Data tab in the toolbox, I’m going to drag a GridView onto the form. I’m also going to drop a Label at the bottom of the form to display any errors or messages. I can style these controls how I like and these styles will be displayed the same way in the Web Part in SharePoint. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_thumb_3.png" width="679" height="520" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Right-click on the designer to open the code-behind. In the Page_Load event handler we’ll write the code to load the low inventory from our data service:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System
&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System.Web.UI
&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System.Web.UI.WebControls
&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System.Web.UI.WebControls.WebParts
&lt;span style="color: blue"&gt;Imports &lt;/span&gt;LowInventoryWebPart.NorthwindService

&lt;span style="color: blue"&gt;Partial Public Class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;LowInventoryWebPartUserControl
    &lt;/span&gt;&lt;span style="color: blue"&gt;Inherits &lt;/span&gt;&lt;span style="color: #2b91af"&gt;UserControl

    &lt;/span&gt;&lt;span style="color: blue"&gt;Protected Sub &lt;/span&gt;Page_Load(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;sender &lt;span style="color: blue"&gt;As Object&lt;/span&gt;, &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;e &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EventArgs&lt;/span&gt;) &lt;span style="color: blue"&gt;Handles Me&lt;/span&gt;.Load
        &lt;span style="color: green"&gt;'Webpart Code to display Low Inventory:
        &lt;/span&gt;&lt;span style="color: blue"&gt;Try
            Dim &lt;/span&gt;ctx &lt;span style="color: blue"&gt;As New &lt;/span&gt;&lt;span style="color: #2b91af"&gt;NorthwindEntities&lt;/span&gt;(&lt;span style="color: blue"&gt;New &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Uri&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;http://myserver/Northwind.svc/&amp;quot;&lt;/span&gt;))

            &lt;span style="color: blue"&gt;Dim &lt;/span&gt;result = &lt;span style="color: blue"&gt;From &lt;/span&gt;p &lt;span style="color: blue"&gt;In &lt;/span&gt;ctx.Products _
                         &lt;span style="color: blue"&gt;Where &lt;/span&gt;p.UnitsInStock &amp;lt;= p.ReorderLevel _
                         &lt;span style="color: blue"&gt;Order By &lt;/span&gt;p.UnitsInStock


            &lt;span style="color: blue"&gt;Me&lt;/span&gt;.GridView1.AutoGenerateColumns = &lt;span style="color: blue"&gt;True
            Me&lt;/span&gt;.GridView1.DataSource = result.ToList()
            &lt;span style="color: blue"&gt;Me&lt;/span&gt;.GridView1.DataBind()

        &lt;span style="color: blue"&gt;Catch &lt;/span&gt;ex &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Exception
            &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Label1.Text = ex.ToString
        &lt;span style="color: blue"&gt;End Try
    End Sub

End Class&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;Debugging the Web Part &lt;/h3&gt;

&lt;p&gt;Let’s test this so far. Set the LowInventoryWebPart project as the startup project of your solution (if it isn’t already) and set a breakpoint on the LINQ query. &lt;strong&gt;Hit F5 and Visual Studio will recycle the IIS worker process, package &amp;amp; deploy &amp;amp; activate the feature, and attach the debugger automatically for you. &lt;/strong&gt;This is shown in the Output window and it’s fun to watch so you may want to pin that window open. :-)&lt;/p&gt;

&lt;pre&gt;------ Deploy started: Project: LowInventoryWebPart, Configuration: Debug Any CPU ------
&lt;br /&gt;Active Deployment Configuration: Default
&lt;br /&gt;Run Pre-Deployment Command:
&lt;br /&gt;&amp;#160; Skipping deployment step because a pre-deployment command is not specified.
&lt;br /&gt;Recycle IIS Application Pool:
&lt;br /&gt;&amp;#160; Skipping application pool recycle because no matching package on the server was found.
&lt;br /&gt;Retract Solution:
&lt;br /&gt;&amp;#160; Skipping package retraction because no matching package on the server was found.
&lt;br /&gt;Add Solution:
&lt;br /&gt;&amp;#160; Adding solution 'LowInventoryWebPart.wsp'...
&lt;br /&gt;&amp;#160; Deploying solution 'LowInventoryWebPart.wsp'...
&lt;br /&gt;Activate Features:
&lt;br /&gt;&amp;#160; Activating feature 'Feature1' ...
&lt;br /&gt;Run Post-Deployment Command:
&lt;br /&gt;&amp;#160; Skipping deployment step because a post-deployment command is not specified.
&lt;br /&gt;========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
&lt;br /&gt;========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========&lt;/pre&gt;

&lt;p&gt;The nice thing is that Visual Studio handles all the deployment as well as all the cleanup. When you close the debugger the feature is deactivated and the package is retracted and deleted. Notice that you can also specify pre and post deployment commands, plus a whole lot more. The Feature and Package designers are very flexible. (For more information watch this &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/11/19/channel-9-interview-sharepoint-feature-and-package-designers-in-visual-studio-2010.aspx"&gt;Channel 9 Interview: SharePoint Feature and Package Designers in Visual Studio 2010&lt;/a&gt; and read &lt;a href="http://msdn.microsoft.com/en-us/library/ee231544(VS.100).aspx"&gt;Packaging and Deploying SharePoint Solutions&lt;/a&gt; in the MSDN library.)&lt;/p&gt;

&lt;p&gt;In order to debug this sucker we first have to add it to a page on our site. When the debugger starts up, it opens a page to the site we specified in the SharePoint Customization Wizard in the beginning. So select Site Actions in the upper left, then Edit Page. Select the Insert tab on the Ribbon and click Web Part. Select the Custom category and you should see your web part. Select it and click Add on the bottom right of the section. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_14.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_thumb_6.png" width="669" height="354" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;At this point you should hit your breakpoint. Hit F11 and the query will return the low inventory so you can see the data as you design the page. The Page_Load will get called a couple times when designing the web part so keep that in mind. &lt;/p&gt;

&lt;p&gt;Next drop down the LowInventoryWebPart menu at the top right of the web part and select Edit Web Part to open the properties. Set the Title to “Low Inventory” and click OK. On the Page tab on the Ribbon select Save to save and close the page editor. Now we’ve got a nice looking web part for browsing low inventory. Sweet!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_16.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_thumb_7.png" width="665" height="682" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Close the browser window and this will close your debugging session, recycle the IIS app pool, deactivate the feature and retract the solution automatically for you. These steps are also displayed in the Output window. &lt;/p&gt;

&lt;h3&gt;Interacting with SharePoint using the Server Object Model&lt;/h3&gt;

&lt;p&gt;Well that was pretty easy to incorporate our LOB data into SharePoint with a simple web part and a data service but what if the user sees a critically low item and wants to add an item to the Task list? It would be nice if they could do it right here. The way we interact with SharePoint in a Visual Web Part is via the &lt;a href="http://msdn.microsoft.com/en-us/library/ms473633(office.14).aspx" target="_blank"&gt;SharePoint Server Object Model&lt;/a&gt;. There are also SharePoint client object models as well; &lt;a href="http://msdn.microsoft.com/en-us/library/ee538971(office.14).aspx" target="_blank"&gt;one for Silverlight clients&lt;/a&gt; and one for &lt;a href="http://msdn.microsoft.com/en-us/library/ee537247(office.14).aspx" target="_blank"&gt;other .NET Framework clients&lt;/a&gt;. But because we are on the server when we are running a web part, we have access here to the server object model. &lt;/p&gt;

&lt;p&gt;So let’s add a TextBox and a Button to our web part that allow the user to enter tasks directly onto the Task list. Go back to design mode on the Web Part, hit enter under the GridView and and type “Create Task:” under it. From the Standard tab on the toolbox, drag a Textbox onto the form then drag a Button and set its Text property to “Add”.&lt;/p&gt;

&lt;p&gt;Double-click on the button and we can write this code in the Button1 click event handler to add a Task:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Protected Sub &lt;/span&gt;Button1_Click(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;sender &lt;span style="color: blue"&gt;As Object&lt;/span&gt;, &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;e &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EventArgs&lt;/span&gt;) &lt;span style="color: blue"&gt;Handles &lt;/span&gt;Button1.Click
    &lt;span style="color: green"&gt;'Webpart code to Add to task list 
    &lt;/span&gt;&lt;span style="color: blue"&gt;Try
        Dim &lt;/span&gt;mySite &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SPWeb &lt;/span&gt;= &lt;span style="color: #2b91af"&gt;SPContext&lt;/span&gt;.Current.Web
        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;listItems &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SPListItemCollection &lt;/span&gt;= mySite.Lists(&lt;span style="color: #a31515"&gt;&amp;quot;Tasks&amp;quot;&lt;/span&gt;).Items

        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;item &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SPListItem &lt;/span&gt;= listItems.Add()

        item(&lt;span style="color: #a31515"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;) = &lt;span style="color: blue"&gt;Me&lt;/span&gt;.TextBox1.Text
        item(&lt;span style="color: #a31515"&gt;&amp;quot;Assigned To&amp;quot;&lt;/span&gt;) = mySite.AllUsers(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Context.User.Identity.Name)

        item.Update()
        &lt;span style="color: blue"&gt;Me&lt;/span&gt;.TextBox1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;
        &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Label1.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Your task has been added to the task list&amp;quot;

    &lt;/span&gt;&lt;span style="color: blue"&gt;Catch &lt;/span&gt;ex &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Exception
        &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Label1.Text = ex.ToString
    &lt;span style="color: blue"&gt;End Try
End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;The way we access the current SharePoint site by using the SPContext object and getting the Current.Web. Just like you have an HttpContext in ASP.NET development you have a SPContext in SharePoint development. So let’s test this one out. Put a breakpoint on the Button1_Click handler and hit F5 to deploy and debug. The second time around you don’t need to add the web part to the site page again but it will be refreshed with our new controls and code. &lt;/p&gt;

&lt;p&gt;Now create a task by entering a description and click the Add button. The breakpoint will hit and you can debug the code and explore some of the server object model. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_22.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_thumb_10.png" width="693" height="479" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;When you’re done, navigate to the task list to see that your task has been added. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_20.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/CreatingaSharePointVisualWebPartusingVis_F2CB/image_thumb_9.png" width="678" height="325" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;This project is included in the Northwind OBA solution for VS2010 located here &lt;a href="http://code.msdn.microsoft.com/OBANorthwind"&gt;&lt;strong&gt;http://code.msdn.microsoft.com/OBANorthwind&lt;/strong&gt;&lt;/a&gt;&amp;#160; so have a look. If you’re an ASP.NET developer just getting started with SharePoint development there’s still a lot to learn, but fortunately Visual Studio 2010 can help make an unfamiliar platform easier to approach with the right tools in hand. &lt;/p&gt;

&lt;p&gt;Download Visual Studio 2010 Beta and read the walkthroughs here: &lt;a href="http://msdn.com/vstudio"&gt;http://msdn.com/vstudio&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9955127" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Article" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Article/default.aspx" /><category term="ADO.NET Data Services" scheme="http://blogs.msdn.com/bethmassi/archive/tags/ADO.NET+Data+Services/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="SharePoint" scheme="http://blogs.msdn.com/bethmassi/archive/tags/SharePoint/default.aspx" /><category term="OBA" scheme="http://blogs.msdn.com/bethmassi/archive/tags/OBA/default.aspx" /></entry><entry><title>New Blog from the WPF &amp; Silverlight Designer Team Just Launched!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/01/22/new-blog-from-the-wpf-silverlight-designer-team-just-launched.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/01/22/new-blog-from-the-wpf-silverlight-designer-team-just-launched.aspx</id><published>2010-01-22T22:12:12Z</published><updated>2010-01-22T22:12:12Z</updated><content type="html">&lt;p&gt;The WPF and Silverlight Designer team (a.k.a Cider team) launched a blog last week and they already have a TON of content!    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/wpfsldesigner/"&gt;http://blogs.msdn.com/wpfsldesigner/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Wow I need to catch up!&amp;#160; I’m told during the months of January and February they will be adding a good bit of WPF &amp;amp; Silverlight content that will focus on the Designer toolset and walkthroughs using the Designer as well as some posts for control authors.&lt;/p&gt;  &lt;p&gt;You can leave feedback for the Cider Team on &lt;a href="http://blogs.msdn.com/wpfsldesigner/" target="_blank"&gt;the blog&lt;/a&gt; or you can send comments and questions using Twitter and include #wpfdesigner or #sldesigner in your tweets.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/wpfsldesigner/archive/tags/How+To/default.aspx" target="_blank"&gt;My favorite tag on the blog so far is &lt;strong&gt;How To&lt;/strong&gt;&lt;/a&gt;. ;-)&lt;/p&gt;  &lt;p&gt;Enjoy! (I know I will)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9952205" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="WPF" scheme="http://blogs.msdn.com/bethmassi/archive/tags/WPF/default.aspx" /><category term="Community" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Community/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Silverlight/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /></entry><entry><title>Northwind Office Business Application Updated for Visual Studio, Office &amp; SharePoint 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/01/19/northwind-office-business-application-updated-for-visual-studio-office-sharepoint-2010.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/01/19/northwind-office-business-application-updated-for-visual-studio-office-sharepoint-2010.aspx</id><published>2010-01-20T04:21:00Z</published><updated>2010-01-20T04:21:00Z</updated><content type="html">&lt;P&gt;Last year we built a &lt;A href="http://code.msdn.microsoft.com/OBANorthwind" mce_href="http://code.msdn.microsoft.com/OBANorthwind"&gt;business application for order management for Northwind Traders&lt;/A&gt; on the Office and SharePoint platform using Visual Studio 2008 and Office &amp;amp; SharePoint 2007. Recently I started releasing articles that show how to upgrade the VS2008 version to VS2010:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/12/15/migrating-an-outlook-client-to-net-framework-4-in-visual-studio-2010.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/12/15/migrating-an-outlook-client-to-net-framework-4-in-visual-studio-2010.aspx"&gt;Migrating an Outlook Client to .NET Framework 4 in Visual Studio 2010&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/12/21/build-wpf-data-controls-for-outlook-addins-easily-with-vs2010.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/12/21/build-wpf-data-controls-for-outlook-addins-easily-with-vs2010.aspx"&gt;Build WPF Data Controls for Outlook Addins Easily with VS2010&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2010/01/15/migrating-a-2007-workflow-to-visual-studio-sharepoint-2010.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2010/01/15/migrating-a-2007-workflow-to-visual-studio-sharepoint-2010.aspx"&gt;Migrating a 2007 Workflow to Visual Studio &amp;amp; SharePoint 2010&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Today I &lt;A href="http://code.msdn.microsoft.com/OBANorthwind" mce_href="http://code.msdn.microsoft.com/OBANorthwind"&gt;updated the sample&lt;/A&gt; with some more goodies including some SharePoint 2010 web parts that I’ll write about soon. But I wanted to let you know sooner rather than later that you can play with all of the code today. This is also the same code I demonstrated last week at our &lt;A href="http://blogs.msdn.com/bethmassi/archive/2010/01/12/speaking-at-east-bay-net-tomorrow-night-on-vsto-sharepoint-2010.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/2010/01/12/speaking-at-east-bay-net-tomorrow-night-on-vsto-sharepoint-2010.aspx"&gt;East Bay.NET User’s group meeting&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Here ya go: &lt;A title=http://code.msdn.microsoft.com/OBANorthwind href="http://code.msdn.microsoft.com/OBANorthwind" mce_href="http://code.msdn.microsoft.com/OBANorthwind"&gt;&lt;STRONG&gt;http://code.msdn.microsoft.com/OBANorthwind&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This sample was built using Visual Studio 2010 Beta 2, Office 2010 Beta &amp;amp; SharePoint 2010 Beta and it demonstrates:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A way to easily expose line-of-business (LOB) data using WCF Data Services (formerly known as ADO.NET Data Services) &lt;/LI&gt;
&lt;LI&gt;An Outlook 2010 Add-in that displays LOB data in a WPF control that I built in 5 minutes using the new drag-drop data binding and designer features &lt;/LI&gt;
&lt;LI&gt;How to store and retrieve structured data from Word 2010 documents &lt;/LI&gt;
&lt;LI&gt;An Excel 2010 document customization that edits LOB data through the data service and provides data visualization &lt;/LI&gt;
&lt;LI&gt;A SharePoint 2010 Document Library Workflow that adds Order info to the database by reading word documents and updates and reports order statuses based on changes in the database using the data service &lt;/LI&gt;
&lt;LI&gt;A SharePoint 2010 Visual Web Part that reports low inventory in the database using the data service and allows users to add tasks &lt;/LI&gt;
&lt;LI&gt;A SharePoint 2010 Silverlight Web Part that demonstrates how to deploy Silverlight web parts to SharePoint 2010 and use the SharePoint Silverlight client library to add tasks &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9950652" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Speaking" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Speaking/default.aspx" /><category term="Community" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Community/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Office" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Office/default.aspx" /><category term="ADO.NET Data Services" scheme="http://blogs.msdn.com/bethmassi/archive/tags/ADO.NET+Data+Services/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="SharePoint" scheme="http://blogs.msdn.com/bethmassi/archive/tags/SharePoint/default.aspx" /><category term="OBA" scheme="http://blogs.msdn.com/bethmassi/archive/tags/OBA/default.aspx" /></entry><entry><title>Migrating a 2007 Workflow to Visual Studio &amp; SharePoint 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/01/15/migrating-a-2007-workflow-to-visual-studio-sharepoint-2010.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/01/15/migrating-a-2007-workflow-to-visual-studio-sharepoint-2010.aspx</id><published>2010-01-16T00:42:34Z</published><updated>2010-01-16T00:42:34Z</updated><content type="html">&lt;p&gt;Lately I’ve been converting &lt;a href="http://code.msdn.microsoft.com/OBANorthwind"&gt;an Office business application we built last year with Visual Studio 2008&lt;/a&gt; to Visual Studio and Office 2010. Last couple posts we tackled converting the Outlook client piece. In this post I want to focus on the server side and show how we can convert &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/04/21/oba-part-5-building-the-sharepoint-2007-workflow.aspx"&gt;the SharePoint 2007 workflow we built with Visual Studio 2008&lt;/a&gt; to a SharePoint 2010 workflow in Visual Studio 2010. &lt;/p&gt;  &lt;p&gt;In Visual Studio 2008 under the Office –&amp;gt; 2007 node in the New Project dialog we could choose from a variety of Office client templates. There was included a SharePoint Sequential Workflow and SharePoint State Machine Workflow. These were the only SharePoint templates available to us. As you’ve probably heard already, Visual Studio 2010 provides much more support for SharePoint and includes many more project and item templates, now included in its own SharePoint –&amp;gt; 2010 node:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image_2.png" target="_blank"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image_thumb.png" width="689" height="546" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can still build Sequential and State Machine workflows for SharePoint 2007 in Visual Studio 2010 but you’ll be able to do a lot more against SharePoint 2010. Let’s see how we can convert the Sequential Workflow we built against SharePoint 2007 to SharePoint 2010 using Visual Studio 2010.&lt;/p&gt;  &lt;h4&gt;Convert the Solution to Visual Studio 2010&lt;/h4&gt;  &lt;p&gt;The first step is to open the VS2008 solution in VS2010. This will through the (probably familiar) Visual Studio conversion wizard. This doesn’t change the code itself, it just upgrades the solution and project files. Now if you are doing this on a machine that doesn’t have SharePoint 2007 installed, but instead has SharePoint 2010, then you won’t be able to run this workflow. Makes sense. You need to have the version of SharePoint you’re developing against on the dev box. Luckily, &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/12/02/setting-up-windows-7-for-office-sharepoint-2010-beta-development.aspx" target="_blank"&gt;with SharePoint 2010 you can have it installed on a client OS like Win 7.&lt;/a&gt; &lt;/p&gt;  &lt;h4&gt;Create the Order Document Library on SharePoint 2010&lt;/h4&gt;  &lt;p&gt;Since we want to migrate &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/04/21/oba-part-5-building-the-sharepoint-2007-workflow.aspx" target="_blank"&gt;this example&lt;/a&gt; to SharePoint 2010, I have to have that installed that on my development machine (which also means we can’t run the 2007 workflow). We also need to set up SharePoint with the same document library we had before or our migrated code won’t run either. &lt;/p&gt;  &lt;p&gt;If you recall this workflow processes purchase orders that are added to the Orders document library so we’ll also need to set that up with the same columns we had before. Even though the UI looks a bit different, the process is the same as I described in the &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/04/21/oba-part-5-building-the-sharepoint-2007-workflow.aspx" target="_blank"&gt;previous article&lt;/a&gt; on SharePoint 2007. Once you get the Order document library set up with the additional columns we need, it should look similar to this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image_thumb_2.png" width="675" height="197" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h4&gt;Add a New SharePoint 2010 Sequential Workflow &lt;/h4&gt;  &lt;p&gt;Since we can’t run the SharePoint 2007 workflow, the easiest thing to do is add a new SharePoint 2010 Workflow project to your solution and then move the workflow code over. With your solution open, select File –&amp;gt; Add –&amp;gt; New Project, expand the SharePoint 2010 node and then select the SharePoint 2010 Sequential Workflow. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image9.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image9_thumb.png" width="454" height="325" /&gt;&lt;/a&gt;The SharePoint Customization wizard opens. I’ll name this project NorthwindWorkflow2010 and then I need to select my SharePoint 2010 site, set the display name and select List Workflow. (Notice in SharePoint 2010 we can also create a Site Workflow as well).&lt;/p&gt;  &lt;p&gt;Click Next and then select the same lists to associate the workflow with that you were using before in the 2007 Workflow. In the case of this example the only thing to select is the Orders document library in the first dropdown. &lt;/p&gt;  &lt;p&gt;Click Next and then select how the workflow should start up. In our case leave the defaults. We want this workflow to start up when an item is added to the list.&lt;/p&gt;  &lt;p&gt;Once you hit Finish the project is generated and appears in the Solution Explorer.&lt;/p&gt;  &lt;h4&gt;Add Service and Assembly References, then Copy your Code&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image29.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 5px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image29_thumb.png" width="454" height="367" /&gt;&lt;/a&gt; Next you’ll need to re-add any assembly references you were using before to get your workflow code running. In this example we need to add a reference to the DocumentFormat.OpenXml. I also need to add a service reference to the data service we were using to access our LOB data, in this case NorthwindDataService. In fact, I have this already in the Solution so I can just right-click on the NorthwindWorkflow2010 project, select Add Service Reference, and then in the dialog just click the Discover button to find the data service. Name it NorthwindServiceReference and click OK. &lt;/p&gt;  &lt;p&gt;Now comes the fun part. We can just copy all the code files into the new project. First though I need to rename the Workflow1 “sub-folder” to ProcesOrder in the 2010 project. Yes you should notice that the file structure is different in the 2010 project. For instance, you’ll see Package and Features “folders” under the project. This is because there are new tools for packaging features (&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/11/19/channel-9-interview-sharepoint-feature-and-package-designers-in-visual-studio-2010.aspx" target="_blank"&gt;like Lily showed us on Channel 9&lt;/a&gt;) among a ton of other tools. We refer to these “folders” as SharePoint Project Items (SPI). &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image41.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratingaSharePoint2007Workflowbuiltwit_F542/image41_thumb.png" width="228" height="526" /&gt;&lt;/a&gt; Once you rename the Workflow SPI to ProcessOrder then you can delete the actual workflow Workflow1. Then drag the ProcessOrder workflow from the old project into this new one, just make sure you add it to the ProccessOrder SPI. Also drag all the other code files into your new project. &lt;/p&gt;  &lt;p&gt;Next open up the Elements.xml file and make sure you see the correct name of your workflow in there. Make sure the CodeBesideClass attribute is correct:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: red"&gt;CodeBesideClass&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;NorthwindWorkflow2010.ProcessOrder&lt;/span&gt;&amp;quot;&lt;/pre&gt;

&lt;p&gt;If this isn’t correct then your workflow will deploy correctly, but it will fail to start so be sure to double-check this. &lt;/p&gt;

&lt;p&gt;The only other thing we need to do now is fix up one Imports statement in our code-behind for the workflow because the name of our project changed. In our example, the OrderManager.vb is referencing our service so that needs to be fixed up:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Imports &lt;/span&gt;NorthwindWorkflow2010.NorthwindServiceReference&lt;/pre&gt;

&lt;p&gt;Finally remove the old workflow project (NorthwindWorkflow) from the solution by right-clicking on the project name and selecting remove. &lt;/p&gt;

&lt;h4&gt;Run it!&lt;/h4&gt;

&lt;p&gt;Now you should be able to run the new workflow in SharePoint 2010. Set the NorthwindWorkflow2010 as your startup project, make sure you start the NorthwindDataService and then hit F5 to deploy and debug. When we add a new purchase order to the Orders doc library the workflow will run and process our order by putting the order data into the database using the data service just like before, but now we’re developing against SharePoint 2010 and we can take advantage of the new tools in Visual Studio 2010. &lt;/p&gt;

&lt;p&gt;If you’d like to play with this workflow (plus all the other pieces of the Northwind Traders application) you can &lt;a href="http://code.msdn.microsoft.com/OBANorthwind/Release/ProjectReleases.aspx?ReleaseId=3712" target="_blank"&gt;download the entire solution upgraded to Visual Studio, Office and SharePoint 2010 here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Next time I’ll show how we can create a simple Visual Web Part that displays inventory information from the Northwind database and allows us to assign tasks using the SharePoint server object model. &lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9949240" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Article" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Article/default.aspx" /><category term="Workflow" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Workflow/default.aspx" /><category term="ADO.NET Data Services" scheme="http://blogs.msdn.com/bethmassi/archive/tags/ADO.NET+Data+Services/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="SharePoint" scheme="http://blogs.msdn.com/bethmassi/archive/tags/SharePoint/default.aspx" /><category term="OBA" scheme="http://blogs.msdn.com/bethmassi/archive/tags/OBA/default.aspx" /></entry><entry><title>Visual Studio 2010 “Tip of the Day” Returns!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/01/13/visual-studio-2010-tip-of-the-day-returns.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/01/13/visual-studio-2010-tip-of-the-day-returns.aspx</id><published>2010-01-13T19:27:59Z</published><updated>2010-01-13T19:27:59Z</updated><content type="html">&lt;p&gt;If you used to rely on &lt;a href="http://blogs.msdn.com/saraford/archive/2010/01/11/visual-studio-2010-tip-of-the-day-returns.aspx"&gt;Sara Ford and her amazing Visual Studio tips&lt;/a&gt; you’ll be happy to know that there’s a new tipster in town taking over for her for Visual Studio 2010. Zain Naboulsi, a Developer Evangelist, has started the Tip of the Day series back up again! &lt;/p&gt;  &lt;p&gt;Check it out: &lt;a href="http://blogs.msdn.com/zainnab/archive/tags/vs2010/Tips+and+Tricks/default.aspx"&gt;http://blogs.msdn.com/zainnab/archive/tags/vs2010/Tips+and+Tricks/default.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947958" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Community" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Community/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /></entry><entry><title>Speaking at East Bay.NET Tomorrow Night on VSTO &amp; SharePoint 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2010/01/12/speaking-at-east-bay-net-tomorrow-night-on-vsto-sharepoint-2010.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2010/01/12/speaking-at-east-bay-net-tomorrow-night-on-vsto-sharepoint-2010.aspx</id><published>2010-01-12T19:37:00Z</published><updated>2010-01-12T19:37:00Z</updated><content type="html">&lt;P&gt;Wow, welcome back from the holidays! I hope yours were as fun and relaxing as mine were. It's always a wonderful time of year to stay with friends and family and concentrate on what's really important in life. &lt;/P&gt;
&lt;P&gt;Well it's time to get back at it and I am refreshed and ready to go! I'm working on a fun-filled presentation for &lt;A href="http://www.baynetug.org/DesktopDefault.aspx?tabindex=1&amp;amp;tabid=26" target=_blank mce_href="http://www.baynetug.org/DesktopDefault.aspx?tabindex=1&amp;amp;tabid=26"&gt;EastBay.NET&lt;/A&gt; on building business applications on the Office and SharePoint 2010 platform using Visual Studio 2010. Here's the official talk description:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Building Business Productivity Solutions with Visual Studio 2010&amp;nbsp;&lt;BR&gt;&lt;/STRONG&gt;&lt;EM&gt;The Visual Studio and Office teams have made significant investments in improving the developer experience for building and deploying Office and SharePoint applications. In this demo-heavy session, we will walk through an end-to-end business application built on Office and SharePoint 2010 and discuss architecture options to consider when building these systems. You'll learn how to use Visual Studio and it’s enhanced set of RAD tools that allows users to consume external line-of-business data within the familiar Office UIs.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;When&lt;/STRONG&gt;: Wednesday, 1/13/2010 at 6:45 PM&lt;BR&gt;&lt;STRONG&gt;Where&lt;/STRONG&gt;: University of Phoenix Learning Center in Livermore, 2481 Constitution Drive, Room 105 &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.baynetug.org/DesktopModules/DetailXEvents.aspx?ItemID=407&amp;amp;mid=143" target=_blank mce_href="http://www.baynetug.org/DesktopModules/DetailXEvents.aspx?ItemID=407&amp;amp;mid=143"&gt;&lt;STRONG&gt;Register for this meeting here.&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I'm also playing with some Silverlight right now to see if I can squeeze in how to deploy Silverlight web parts to SharePoint 2010. The deployment is made so easy with Visual Studio 2010. (Check out Mike's Channel 9 interview on how to do it: &lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/11/25/channel-9-interview-implementing-a-silverlight-sharepoint-webpart-with-visual-studio-2010.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/2009/11/25/channel-9-interview-implementing-a-silverlight-sharepoint-webpart-with-visual-studio-2010.aspx"&gt;Implementing a Silverlight SharePoint WebPart with Visual Studio 2010&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;And as an added bonus I talked &lt;A href="http://www.ideablade.com/" target=_blank mce_href="http://www.ideablade.com"&gt;Ward Bell from IdeaBlade&lt;/A&gt; (Silverlight MVP) into coming out and presenting FUNdamentals, a 30 minute intro session we do before our main talks here at &lt;A href="http://www.baynetug.org/DesktopDefault.aspx?tabindex=1&amp;amp;tabid=26" target=_blank mce_href="http://www.baynetug.org/DesktopDefault.aspx?tabindex=1&amp;amp;tabid=26"&gt;EastBay.NET&lt;/A&gt;. He's going to show you the basics of WCF Data Services (a.k.a ADO.NET Data Services, a.k.a Astoria). I'll be using this technology to expose our LOB data to Office and SharePoint but I won't have time to show you more than a brief overview on how to set it up. So if you've never used the technology then come early and learn from Ward how it works. &lt;/P&gt;
&lt;P&gt;It should be a very fun filled evening from two awesome speakers (if I do say so myself ;-)) so I hope to see you there.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947293" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Speaking" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Speaking/default.aspx" /><category term="Community" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Community/default.aspx" /><category term="Silverlight" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Silverlight/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Office" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Office/default.aspx" /><category term="ADO.NET Data Services" scheme="http://blogs.msdn.com/bethmassi/archive/tags/ADO.NET+Data+Services/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="SharePoint" scheme="http://blogs.msdn.com/bethmassi/archive/tags/SharePoint/default.aspx" /><category term="OBA" scheme="http://blogs.msdn.com/bethmassi/archive/tags/OBA/default.aspx" /></entry><entry><title>Build WPF Data Controls for Outlook Addins Easily with VS2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2009/12/21/build-wpf-data-controls-for-outlook-addins-easily-with-vs2010.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2009/12/21/build-wpf-data-controls-for-outlook-addins-easily-with-vs2010.aspx</id><published>2009-12-21T22:14:29Z</published><updated>2009-12-21T22:14:29Z</updated><content type="html">&lt;p&gt;Last post I showed &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/12/15/migrating-an-outlook-client-to-net-framework-4-in-visual-studio-2010.aspx" target="_blank"&gt;how to migrate our Northwind Outlook client to .NET 4 and Office 2010&lt;/a&gt;. This Outlook Add-in displays order history information in an adjoining form region so sales associates can see that data immediately when communicating with customers. When we &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx" target="_blank"&gt;originally built this with Visual Studio 2008&lt;/a&gt;, we used a WPF user control to display the data so that we could better match the look and feel of Outlook 2007. However we had to manually figure out the colors we needed and bind the data to the controls by writing XAML by hand. &lt;/p&gt;  &lt;p&gt;Today I want to show how we can use drag &amp;amp; drop data binding and the new WPF designer in Visual Studio 2010 to quickly create this control &lt;strong&gt;without writing one line of XAML ourselves&lt;/strong&gt;. &lt;/p&gt;  &lt;h4&gt;Displaying WPF Controls in Form Regions with ElementHost&lt;/h4&gt;  &lt;p&gt;Office clients by default work with Windows Forms controls. If you &lt;a href="http://msdn.microsoft.com/en-us/library/bb386177(VS.100).aspx" target="_blank"&gt;create a new Form Region&lt;/a&gt; you can add any Windows form control from the toolbox onto it. If you want to add WPF controls you simply add what’s called an &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.integration.elementhost.aspx" target="_blank"&gt;ElementHost control&lt;/a&gt; which you find in the WPF Interoperability tab on your toolbox. This allows you to select from and host WPF User Controls in your project.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb.png" width="670" height="318" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This is the same technique in VS2008 and VS2010. However, VS2010 makes it much easier to create the WPF User Control in the first place because you can now use the data sources window to design and data bind WPF controls. The WPF designer is also much easier to use. Let’s see how we can build a WPF control that displays Order information and have Visual Studio generate all the XAML we need automatically for us, and have it look good too.&lt;/p&gt;  &lt;h4&gt;Using the Data Sources Window with WPF&lt;/h4&gt;  &lt;p&gt;Let’s create a new WPF control called OrderHistoryDD where we’ll use drag &amp;amp; drop data binding from the data sources window. Project –&amp;gt; Add New Item, then select User Control (WPF). To view the data sources window select menu Data –&amp;gt; Show Data Sources. Because we already have added a service reference to our data service (which we built in &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx" target="_blank"&gt;part 1&lt;/a&gt;), you will see the client types that were generated for us appear in the data sources window. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_6.png"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_2.png" width="228" height="476" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;We want to display three levels of related information to the user. Orders, the related Order Details and the related Product inventory information. If you are familiar with Windows Forms development using the data sources window here is the same. You can select which controls should be dropped onto the design surface by selecting the desired control in the dropdown. &lt;/p&gt;  &lt;p&gt;The controls that are available to you depend on which target framework you are using. Since we are targeting .NET Framework 4 then we have some new controls at our disposal namely the WPF DataGrid and the DatePicker. &lt;/p&gt;  &lt;p&gt;However, we are only displaying data to the user here (&lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/12/oba-part-3-storing-and-reading-data-in-word-documents.aspx" target="_blank"&gt;new orders are handled as POs in Word&lt;/a&gt; and the &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/03/08/oba-part-4-building-an-excel-client-against-lob-data.aspx" target="_blank"&gt;editing is done by our shipping department in the Excel client&lt;/a&gt;) so we’ll select TextBox controls instead of the DatePicker control. I also only want to display the ShipName, OrderDate, RequiredDate and ShippedDate in the Order grid so for the rest of the fields you can select [None]. &lt;/p&gt;  &lt;p&gt;Now drag the Orders onto the WPF design surface and you will see those fields in the grid. By default it is anchored to the top and left of the control. Click on the arrow to the right of the grid to also anchor it to the right side so it will stretch.&lt;/p&gt;  &lt;p&gt;Since we are not allowing edits, in the Property window for the DataGrid, set the IsReadOnly property to &lt;em&gt;True&lt;/em&gt;. Also set the ColumnWidth property to &lt;em&gt;Auto&lt;/em&gt;. To modify the order in which the columns appear, click on the ellipsis (…) next to the Columns property to open up the columns editor. Here we can also set the data binding and formatting on our columns by selecting the Binding property and dropping down the editor. You’ll notice that the columns are already bound to the data based on what we specified in the data sources window. Expand Options and you’ll see some additional settings you can make on the Binding. For this example, set the String Format to a simple date for all three date columns. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_3.png" width="687" height="409" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can also set additional properties here like styles and widths, etc. Since we set the DataGrid Width to Auto, I’ll select each of the column’s widths here, right-click on the Width property and select “Reset value” so that they pick up the same setting. This means the cells will auto size to display all the data. &lt;/p&gt;  &lt;p&gt;Now we need to display the &lt;strong&gt;related &lt;/strong&gt;Order Details. To do this, back in the data sources window expand the Order Details &lt;strong&gt;under the Orders. &lt;/strong&gt;It’s very important you select the related Order Details under the Orders otherwise the user won’t see the Order Details change as they select the Order above. This sets up a master-detail binding when we do it this way. This time, just select drop controls as TextBoxes for Quantity and UnitPrice and drop the related Order Details DataDrid under the Orders DataGrid. We also want to display the ProductName here, but because that field is on the Product entity we will have to add a column and set up the binding to it in the Column editor instead. &lt;/p&gt;  &lt;p&gt;So click the Columns ellipsis button for the Order Details DataGrid in the Property window and then click the Add button to add a new column. Set the Header property to “Product”. Open up the Binding editor again and expand the Path section. Select Product then ProductName to set up the binding to that field.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_4.png" width="682" height="411" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Select the Bindings for Quantity and UnitPrice and expand the Options node to set the String Format for those columns to display as number and currency respectively.&lt;/p&gt;  &lt;p&gt;Now we want to display the inventory information for each Product selected on the Order Details. Same as before, in the data sources window expand the &lt;strong&gt;related &lt;/strong&gt;Product under the Order – Order Details. Select the dropdown on Product and select Details. Then select to drop Labels for just ProductName, UnitsInStock and UnitsOnOrder. Drag the Product onto the form under the Order Details DataGrid and it will create three labels bound to the corresponding fields on Product. It creates a Grid control (not to be confused with DataGrid) with two columns with the field labels on the left and the controls on the right. Dock the entire grid control to the bottom left by selecting the grid and then clicking on the dock arrow at the top. This will dock it to the bottom left. Next add an image control to the bottom right, select the Source property, and select the Northwind traders logo.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_14.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_6.png" width="520" height="390" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice that we haven’t typed any XAML at all to set any of this up so far. If you look in the generated XAML you will see all the control and data binding definitions. Visual Studio 2010 takes care of all of this for us. But we also want to set up some nice styles on the data grids. Let’s set the alternating row colors and set up a style in the control resources so that we can share it on both DataGrids. We don’t have to know XAML to do this either. &lt;/p&gt;  &lt;h4&gt;Styling the DataGrids and Sharing Style Resources&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_16.png"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_7.png" width="329" height="312" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To quickly set up a nice gradient style shared on both data grids for alternating rows, select a DataGrid and then AlternatingRowBackground in the property window. This opens up the new &lt;a href="http://msdn.microsoft.com/en-us/library/dd394490(VS.100).aspx" target="_blank"&gt;Brush Editor&lt;/a&gt;. Select the third glyph at the top left for gradient. You can select the start and stop gradient colors with the color selector on the left but it’s much easier if you already have an application in mind that has the colors you want, just click the eyedropper in order to pick up any color on your desktop. &lt;/p&gt;  &lt;p&gt;After you set up the style how you like it, you can extract it from the DataGrid control into the user control resources so that you can share it on both grids. Click on the diamond next to the AlternatingRowBackground property and select &lt;a href="http://msdn.microsoft.com/en-us/library/dd394488(VS.100).aspx" target="_blank"&gt;Extract Value to Resource&lt;/a&gt;. Name the resource and then click OK to add it to the resources section of the user control.&lt;/p&gt;  &lt;p&gt;Now you can go to the other DataGrid, click that AlternatingRowBackground and select “Apply Resource”. Then you can select from SystemColors and Local resources that match. Expand Local and you will see the resource you just created. We could spend all day styling our DataGrids but the nice thing is we can do a lot without having to know XAML. &lt;/p&gt;  &lt;h4&gt;Hooking Up the Data to CollectionViewSource&lt;/h4&gt;  &lt;p&gt;Now we need to hook up our WPF user control onto the form region and load it with data from our data service. If you haven’t already done so, build the project and then on the EmailForm select the ElementHost and chose the OrderHistoryDD user control we just built. &lt;/p&gt;  &lt;p&gt;We already have written the the code to load the data into a List(Of Orders). The &lt;a href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx" target="_blank"&gt;same code we wrote for our VS2008 version here&lt;/a&gt; applies in VS2010. The only difference now is that we need to set the List(Of Orders) to the CollectionViewSource.Source property for the master view source, in this case it’s called OrdersViewSource. &lt;a href="http://blogs.msdn.com/bethmassi/archive/2008/11/07/loading-data-and-binding-controls-in-wpf-with-collectionviewsource.aspx" target="_blank"&gt;I’ve talked about CollectionViewSources for master-details before&lt;/a&gt;. You can see this in the XAML that was generated for us, as well as the related OrdersOrder_DetailsViewSource: &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;CollectionViewSource &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Key&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;OrdersViewSource&amp;quot; &lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: red"&gt;d&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;DesignSource&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;d&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;DesignInstance &lt;/span&gt;&lt;span style="color: red"&gt;my&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Order&lt;/span&gt;&lt;span style="color: blue"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;CreateList&lt;/span&gt;&lt;span style="color: blue"&gt;=True}&amp;quot; /&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;CollectionViewSource &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Key&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;OrdersOrder_DetailsViewSource&amp;quot; &lt;br /&gt;                          &lt;/span&gt;&lt;span style="color: red"&gt;Source&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;Path&lt;/span&gt;&lt;span style="color: blue"&gt;=Order_Details, &lt;br /&gt;                                           &lt;/span&gt;&lt;span style="color: red"&gt;Source&lt;/span&gt;&lt;span style="color: blue"&gt;={&lt;/span&gt;&lt;span style="color: #a31515"&gt;StaticResource &lt;/span&gt;&lt;span style="color: red"&gt;OrdersViewSource&lt;/span&gt;&lt;span style="color: blue"&gt;}}&amp;quot; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Because the CollectionViewSources are chained together (similar to how Winforms BindingSources are set up), all we need to do is set the master’s Source property and all the controls will pick up their bindings properly. To make this easier, create a property on the OrderHistoryDD user control that exposes the OrdersViewSource. In the code-behind for the WPF user control:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System.Windows.Data&lt;br /&gt;&lt;span style="color: blue"&gt;Public Class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;OrderHistoryDD

    &lt;/span&gt;&lt;span style="color: blue"&gt;Public ReadOnly Property &lt;/span&gt;OrdersViewSource &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CollectionViewSource
        &lt;/span&gt;&lt;span style="color: blue"&gt;Get
            Return CType&lt;/span&gt;(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Resources(&lt;span style="color: #a31515"&gt;&amp;quot;OrdersViewSource&amp;quot;&lt;/span&gt;), &lt;span style="color: #2b91af"&gt;CollectionViewSource&lt;/span&gt;)
        &lt;span style="color: blue"&gt;End Get
    End Property&lt;br /&gt;End Class&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Now in the code-behind for the form region (the FormRegionShowing event handler for EmailForm) change the line of code that sets the DataContext of the old user control and set the OrdersViewSource.Source property instead:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: green"&gt;'Load the data from the service
&lt;/span&gt;&lt;span style="color: blue"&gt;Dim &lt;/span&gt;ordersList &lt;span style="color: blue"&gt;As New &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;(&lt;span style="color: blue"&gt;Of &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order&lt;/span&gt;)(customerOrders)
&lt;span style="color: green"&gt;'Set this ordersList as the DataContext of our WPF user control:
'Me.OrderHistory1.DataContext = ordersList

'In VS2010 CollectionViewSources are used instead:
&lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.OrderHistoryDD1.OrdersViewSource.Source = ordersList&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Now rebuild and run it to see your lovely new user control appear in Outlook:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_22.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_10.png" width="615" height="669" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;But something is missing. We want to display the line item and order totals in the grids. We could add a property onto the Order partial class, but we also want to sub-total each of the line items. Instead of adding read-only properties to the partial classes we can write one WPF value converter that handles both of these cases and then use that in our DataGrids. &lt;/p&gt;

&lt;h4&gt;Writing a Converter to Aggregate Totals&lt;/h4&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;I’ve talked about how to write a &lt;a href="http://blogs.msdn.com/bethmassi/archive/2008/12/12/formatting-data-in-wpf-controls.aspx" target="_blank"&gt;converter to format data in controls exactly how you like&lt;/a&gt;. In this case we want to write one that will take either a single Order_Detail to calculate the line item total or a collection of Order_Details to calculate the Order total. Here’s one way to do that.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System.Windows.Data
&lt;span style="color: blue"&gt;Imports &lt;/span&gt;NorthwindOutlookClient.NorthwindService.NorthwindModel

&lt;span style="color: green"&gt;'Used by the OrderHistory WPF control to display line totals and Order total in the UI
&lt;/span&gt;&lt;span style="color: blue"&gt;Public Class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;OrderTotalConverter
    &lt;/span&gt;&lt;span style="color: blue"&gt;Implements &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IValueConverter

    &lt;/span&gt;&lt;span style="color: blue"&gt;Public Function &lt;/span&gt;Convert(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;value &lt;span style="color: blue"&gt;As Object&lt;/span&gt;, &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;targetType &lt;span style="color: blue"&gt;As &lt;/span&gt;System.&lt;span style="color: #2b91af"&gt;Type&lt;/span&gt;,
                            &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;parameter &lt;span style="color: blue"&gt;As Object&lt;/span&gt;,
                            &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;culture &lt;span style="color: blue"&gt;As &lt;/span&gt;System.Globalization.&lt;span style="color: #2b91af"&gt;CultureInfo&lt;/span&gt;) &lt;span style="color: blue"&gt;As Object &lt;/span&gt;_
                        &lt;span style="color: blue"&gt;Implements &lt;/span&gt;System.Windows.Data.&lt;span style="color: #2b91af"&gt;IValueConverter&lt;/span&gt;.Convert

        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;total &lt;span style="color: blue"&gt;As Double &lt;/span&gt;= &lt;span style="color: brown"&gt;0.0
        &lt;/span&gt;&lt;span style="color: blue"&gt;If TypeOf &lt;/span&gt;value &lt;span style="color: blue"&gt;Is &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order_Detail &lt;/span&gt;&lt;span style="color: blue"&gt;Then
            &lt;/span&gt;&lt;span style="color: green"&gt;'return the line item total
            &lt;/span&gt;&lt;span style="color: blue"&gt;Dim &lt;/span&gt;o = &lt;span style="color: blue"&gt;CType&lt;/span&gt;(value, &lt;span style="color: #2b91af"&gt;Order_Detail&lt;/span&gt;)
            total += o.Quantity * o.UnitPrice

        &lt;span style="color: blue"&gt;ElseIf TypeOf &lt;/span&gt;value &lt;span style="color: blue"&gt;Is &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IEnumerable&lt;/span&gt;(&lt;span style="color: blue"&gt;Of &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order_Detail&lt;/span&gt;) &lt;span style="color: blue"&gt;Then
            &lt;/span&gt;&lt;span style="color: green"&gt;'return the order total
            &lt;/span&gt;&lt;span style="color: blue"&gt;For Each &lt;/span&gt;o &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Order_Detail &lt;/span&gt;&lt;span style="color: blue"&gt;In &lt;/span&gt;value
                total += o.Quantity * o.UnitPrice
            &lt;span style="color: blue"&gt;Next
        End If
        Return &lt;/span&gt;total
    &lt;span style="color: blue"&gt;End Function

    Public Function &lt;/span&gt;ConvertBack(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;value &lt;span style="color: blue"&gt;As Object&lt;/span&gt;,
                                &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;targetType &lt;span style="color: blue"&gt;As &lt;/span&gt;System.&lt;span style="color: #2b91af"&gt;Type&lt;/span&gt;,
                                &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;parameter &lt;span style="color: blue"&gt;As Object&lt;/span&gt;,
                                &lt;span style="color: blue"&gt;ByVal &lt;/span&gt;culture &lt;span style="color: blue"&gt;As &lt;/span&gt;System.Globalization.&lt;span style="color: #2b91af"&gt;CultureInfo&lt;/span&gt;) &lt;span style="color: blue"&gt;As Object &lt;/span&gt;_
                            &lt;span style="color: blue"&gt;Implements &lt;/span&gt;System.Windows.Data.&lt;span style="color: #2b91af"&gt;IValueConverter&lt;/span&gt;.ConvertBack
        &lt;span style="color: blue"&gt;Return Nothing
    End Function
End Class&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Once you add this class rebuild the project. Now go back to the Order DataGrid and select Columns in the Property window to open the Column editor. Add a new TextBoxColumn, set the Header property to “Total” and then open up the Binding property. Set the Path to Order_Details and then expand Converter and select the NorthwindOutlookClient then OrderTotalConverter. Under Resources select “Create New…” and name and save the OrderTotalConverter in the resources section so you can select it on the Order_Details DataGrid. Expand Options and select the currency String Format. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_26.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_12.png" width="679" height="406" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Next Select the Order_Details DataGrid, add a new column, set the Header property to say “Total”. Select the Bindings property but this time don’t select anything for the Path. Expand Converter and select select the NorthwindOutlookClient then OrderTotalConverter and now in the Resources you will see OrderTotalConverter1, select that. Expand Options and select the currency String Format for this column as well. &lt;/p&gt;

&lt;p&gt;Now rebuild and run the project again. You can set a breakpoint on the Convert method and you will see that different value types are getting passed in depending on what DataGrid column is requesting the conversion. And best of all, now the user can see line item and order totals in the form region. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_28.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/QuicklyBuildaWPFUserControlforanOutlookC_903D/image_thumb_13.png" width="606" height="264" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;As you can see Visual Studio 2010 has much improved RAD designers for data binding and styling business applications like this one. I’ve uploaded the &lt;a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=OBANorthwind&amp;amp;ReleaseId=3712" target="_blank"&gt;source code which works with Visual Studio 2010 Beta 2 and Outlook 2010 Beta&lt;/a&gt; onto Code Gallery so have a look.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9939814" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="WPF" scheme="http://blogs.msdn.com/bethmassi/archive/tags/WPF/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Article" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Article/default.aspx" /><category term="Office" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Office/default.aspx" /><category term="Data" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Data/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="OBA" scheme="http://blogs.msdn.com/bethmassi/archive/tags/OBA/default.aspx" /></entry><entry><title>Migrating an Outlook Client to .NET Framework 4 in Visual Studio 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2009/12/15/migrating-an-outlook-client-to-net-framework-4-in-visual-studio-2010.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2009/12/15/migrating-an-outlook-client-to-net-framework-4-in-visual-studio-2010.aspx</id><published>2009-12-16T07:12:00Z</published><updated>2009-12-16T07:12:00Z</updated><content type="html">&lt;P&gt;Early this year we built a &lt;A href="http://code.msdn.microsoft.com/OBANorthwind" target=_blank mce_href="http://code.msdn.microsoft.com/OBANorthwind"&gt;business application for order management for Northwind Traders&lt;/A&gt; on the Office and SharePoint platform using Visual Studio 2008 and Office &amp;amp; SharePoint 2007. If you missed them:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/02/building-an-office-business-application-for-techready-8.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/02/building-an-office-business-application-for-techready-8.aspx"&gt;Architecture of the Northwind Office Business Application&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx"&gt;OBA Part 1 - Exposing Line-of-Business Data&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx"&gt;OBA Part 2 - Building an Outlook Client against LOB Data&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/12/oba-part-3-storing-and-reading-data-in-word-documents.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/12/oba-part-3-storing-and-reading-data-in-word-documents.aspx"&gt;OBA Part 3 - Storing and Reading Data in Word Documents&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/03/08/oba-part-4-building-an-excel-client-against-lob-data.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/03/08/oba-part-4-building-an-excel-client-against-lob-data.aspx"&gt;OBA Part 4 - Building an Excel Client against LOB Data&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;
&lt;DIV align=left&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/04/21/oba-part-5-building-the-sharepoint-2007-workflow.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/04/21/oba-part-5-building-the-sharepoint-2007-workflow.aspx"&gt;OBA Part 5 - Building the SharePoint 2007 Workflow&lt;/A&gt; &lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The solution consists of an Outlook client that pulls up order history when a customer email arrives in the sales associate’s inbox. This way they don’t have to leave Outlook (the application that they live in all day) to see corresponding line-of-business (LOB) data, in this case order history, right in the email message. LOB data is exposed via a simple REST-based WCF data service (&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx"&gt;built in part 1&lt;/A&gt;) and is displayed in the reading pane in Outlook for each customer.&lt;/P&gt;
&lt;P&gt;Today I want to take a look at how we can migrate the &lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx"&gt;Outlook client we built in part 2&lt;/A&gt; to Office 2010 and &lt;A href="http://msdn.microsoft.com/en-us/library/cc656912(VS.100).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/cc656912(VS.100).aspx"&gt;.NET Framework 4.0 Client Profile&lt;/A&gt; using Visual Studio 2010. The VSTO 4 Runtime has changed so there are some manual steps you may have to take when you migrate your solutions depending on what features you are using.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I set up a Windows 7 VHD with Visual Studio, SharePoint &amp;amp; Office Betas that I’ll be using for development, just like I explained in this post - &lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/12/02/setting-up-windows-7-for-office-sharepoint-2010-beta-development.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/2009/12/02/setting-up-windows-7-for-office-sharepoint-2010-beta-development.aspx"&gt;Setting up Windows 7 for Office &amp;amp; SharePoint 2010 Beta Development&lt;/A&gt;. If you’d like to follow along you can &lt;A href="http://code.msdn.microsoft.com/OBANorthwind" target=_blank mce_href="http://code.msdn.microsoft.com/OBANorthwind"&gt;download the Visual Studio 2008 version of the code here&lt;/A&gt;.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Required Changes for the New VSTO 4 Runtime&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;First I want to point out some excellent information on MSDN that you should familiarize yourself with if you are migrating Office solutions built with Visual Studio (VSTO). All the samples, walkthroughs and videos on the &lt;A href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx"&gt;Visual Studio 2010 resources page&lt;/A&gt; on the &lt;A href="http://msdn.com/vsto" target=_blank&gt;VSTO Dev Center&lt;/A&gt; are valuable but if you are migrating you should pay close attention to this item - &lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/vsto/ee207231(VS.100).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vsto/ee207231(VS.100).aspx"&gt;&lt;EM&gt;&lt;STRONG&gt;Migrating Office Solutions to the .NET Framework 4&lt;/STRONG&gt;&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I also recommend familiarizing yourself with the new VSTO4 Runtime here - &lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb608603(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb608603(VS.100).aspx"&gt;&lt;STRONG&gt;&lt;EM&gt;Visual Studio Tools for Office Runtime Overview&lt;/EM&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In particular, if your Outlook project uses Form Regions or the Ribbon designer then you will have some work to do &lt;STRONG&gt;if you target .NET Framework 4 &lt;/STRONG&gt;because the VSTO 4 runtime has been updated to use Office object model interfaces and not directly inherit from classes like was done in the previous versions of the VSTO runtime. Moving forward this is a very good thing because it removes the dependency on specific versions of Office and enables Office solutions to use the new embedded interop types feature (sometimes referred to as “no-PIAs”) in the .NET Framework 4. This means solutions can run on end user computers without installing these primary interop assemblies (PIAs).&lt;/P&gt;
&lt;P&gt;So you may have to reach into the designer generated files and tweak some code. Note that depending on how you structure your application it may be easier after you retarget to .NET 4 to just create a new Form Region and a new Ribbon and copy your user code into them. This is especially true if you are migrating solutions using Visual Studio Beta 2 to .NET 4 because of a bug which I’ll show you how to work around. Let’s take a look at what we need to do for our &lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx"&gt;Northwind Outlook client&lt;/A&gt;.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Migrating the Outlook Solution to Visual Studio 2010&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Before I jump into migrating this solution I should point out that building Office client solutions in Visual Studio became a lot easier starting in Visual Studio 2008 with all the designer support that was added directly into the Visual Studio box. You can create form regions, ribbons, and host WPF controls easily using these tools in VS2008 without having to install additional extensions. These tools have been updated in Visual Studio 2010 to allow you to build upon Office 2010 but they are just as easy to use.&lt;/P&gt;
&lt;P&gt;So let’s start with opening the NorthwindOutlookClient solution in Visual Studio 2010. The migration wizard will open and you’ll be guided through conversion of the project to VS2010. Note that depending on what you have installed on your development machine will determine what Visual Studio does with the solution. If you have the .NET 3.5 framework installed then the target framework will not change, however if you only have .NET 4 then it will update to that automatically. (For more information see &lt;A href="http://msdn.microsoft.com/en-us/library/4bez6837(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/4bez6837(VS.100).aspx"&gt;How to Upgrade Office Solutions&lt;/A&gt; and &lt;A href="http://msdn.microsoft.com/en-us/library/bb398242(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb398242(VS.100).aspx"&gt;Configuring a Computer to Develop Office Solutions&lt;/A&gt;). &lt;/P&gt;
&lt;P&gt;Since &lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/12/02/setting-up-windows-7-for-office-sharepoint-2010-beta-development.aspx" target=_blank mce_href="http://blogs.msdn.com/bethmassi/archive/2009/12/02/setting-up-windows-7-for-office-sharepoint-2010-beta-development.aspx"&gt;my development environment&lt;/A&gt; is a Windows 7 machine set up with Office 2010, Visual Studio 2010 and SharePoint Foundation 2010 I get some warnings immediately about the version of Office being wrong. “This project requires Microsoft Office Outlook 2007, but this application is not installed.” &lt;STRONG&gt;However it will build and run just fine in Outlook 2010&lt;/STRONG&gt;. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_2.png" width=599 height=529 mce_src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Updating the Target Framework to .NET 4&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Now let’s change the target framework to .NET Framework 4 Client Profile. In Visual Basic you do this by selecting the project properties Compile tab, scroll down to “Advanced Compile Options…” and then select the new framework in the dropdown.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_1.png" width=651 height=472 mce_src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I should mention that the Client Profile is a subset of the full .NET 4 Framework meant for client applications like WPF, Windows Forms and Office solutions.&amp;nbsp; This means it’s a smaller install if your users don’t have the .NET Framework installed at all. It doesn’t include any server pieces like ASP.NET. This is also now the default framework target for &lt;STRONG&gt;new &lt;/STRONG&gt;Windows, WPF and Office projects.&lt;/P&gt;
&lt;P&gt;So once we change the framework, this will close and then reopen the project. Now we’ve got a bunch of stuff in our errors list. Ouch. There are 48 errors but only 25 of them are related to the VSTO 4 runtime changes. The minor problem is that the WPF control is referencing System.Xaml and when we switched the target this gets dropped (at least it does in Beta 2) so we need to just reference this 4.0 assembly. If you open up the OrderHistory.g.vb file, hover over the error, and drop down the error correction it will take care of this for you. &lt;/P&gt;
&lt;P&gt;Much more important is the 25 errors around our Form Region. We have two options, we can either add a brand new Form Region to the project, add our controls, paste our custom code into it, and delete the old one, or we can modify the designer generated code. In this case, because there is only one user control on the Form Region, it’s much easier to just create a new one. But if you have very complicated layouts you may need to take the route of updating the designer code to use the new interfaces. For the sake of learning what we need to do in these trickier situations, I’ll opt to go that route too. &lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Update Outlook Projects that Contain Form Regions&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Since we’ll be modifying the designer generated code you’ll need to make sure you click the &lt;A href="http://msdn.microsoft.com/en-us/library/26k97dbc.aspx#sectionToggle0" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/26k97dbc.aspx#sectionToggle0"&gt;Show All Files toolbar button on the Solution Explorer&lt;/A&gt;. Now we can open up the EmailForm.Designer.vb file in the editor. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#outlook" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#outlook"&gt;This documentation contains the step-by-step code conversions that you need to perform to upgrade your form regions&lt;/A&gt;. First we need to modify the declaration of the form region class so that it derives from &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.outlook.formregionbase(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.outlook.formregionbase(VS.100).aspx"&gt;FormRegionBase&lt;/A&gt; instead of FormRegionControl:&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE class=code&gt;&amp;lt;System.ComponentModel.&lt;SPAN style="COLOR: #2b91af"&gt;ToolboxItemAttribute&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;False&lt;/SPAN&gt;)&amp;gt; _
&amp;lt;&lt;SPAN style="COLOR: blue"&gt;Global&lt;/SPAN&gt;.Microsoft.VisualBasic.CompilerServices.&lt;SPAN style="COLOR: #2b91af"&gt;DesignerGenerated&lt;/SPAN&gt;()&amp;gt; _
&lt;SPAN style="COLOR: blue"&gt;Partial Class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EmailForm
    &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="COLOR: blue"&gt;Inherits &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;/STRONG&gt;&lt;SPAN style="COLOR: #2b91af"&gt;&lt;STRONG&gt;FormRegionBase&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;The documentation also shows what the code looks like against a 3.5 target and what it should look like against a 4.0 target. For instance we have a problem with the constructor. In 3.5 we have:&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;    Public Sub New&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;formRegion &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Interop.Outlook.FormRegion)
        &lt;SPAN style="COLOR: blue"&gt;MyBase&lt;/SPAN&gt;.New(formRegion)
        &lt;SPAN style="COLOR: blue"&gt;Me&lt;/SPAN&gt;.InitializeComponent()
&lt;SPAN style="COLOR: blue"&gt;    End Sub&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;However in .NET 4 we need to change this to:&lt;/P&gt;&lt;PRE class=code&gt;    &lt;SPAN style="COLOR: blue"&gt;Public Sub New&lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;formRegion &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Interop.Outlook.FormRegion)
        &lt;SPAN style="COLOR: blue"&gt;MyBase&lt;/SPAN&gt;.New(&lt;SPAN style="COLOR: #2b91af"&gt;Globals&lt;/SPAN&gt;.Factory, formRegion)
        &lt;SPAN style="COLOR: blue"&gt;Me&lt;/SPAN&gt;.InitializeComponent()
    &lt;SPAN style="COLOR: blue"&gt;End Sub&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Next we need update the signature of the InitializeManifest method (note that underscores are not necessary here in Visual Basic when targeting .NET Famework 4)&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;Private Shared Sub &lt;/SPAN&gt;InitializeManifest(&lt;BR&gt;     &lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;manifest &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;FormRegionManifest&lt;/SPAN&gt;,
     &lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;factory &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;Factory&lt;/SPAN&gt;)&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;A Better Way to Upgrade (for now) – Working Around a Bug in Visual Studio 2010 Beta 2&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#outlook" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#outlook"&gt;Steps 5-8 of the documentation&lt;/A&gt; tell us to create a new Form Region to get the new factory code that we need -- this is why it may just be easier for you to start this way. Unfortunately there’s a bug in Visual Studio 2010 Beta 2 when you attempt to add a new item to the project it will select the wrong language. If you have a C# project it will select VB templates and if you have a VB project it will select C# templates. Doh! (Now that’s taking language parity thing a bit too far ;-)) So the way you have to work around this is to create a new Outlook Add-in project based on .NET 4 already and then add a new form region there. This is a bug only with migrated projects and it will be fixed in the final release. &lt;/P&gt;
&lt;P&gt;However, if you also want to keep building upon this solution in Beta 2, you should recreate the project, selecting a .NET 4 target, and add your existing files into it. This will ensure that things work smoothly going forward. You can actually name the project the same thing, you just need to put it into a different folder. Here’s how you do it.&lt;/P&gt;
&lt;P&gt;First &lt;STRONG&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/h2c9cdc0(VS.100).aspx#sectionToggle5" mce_href="http://msdn.microsoft.com/en-us/library/h2c9cdc0(VS.100).aspx#sectionToggle5"&gt;clean the solution to remove the registered Add-In&lt;/A&gt;&lt;/STRONG&gt;. From the menu select Build –&amp;gt; Clean NorthwindOutlookClient. &lt;/P&gt;
&lt;P&gt;Now since we have multiple projects in this solution you can right-click on the NorthwindOutlookClient in the Solution Explorer and then select Remove. Then close Visual Studio and open the folder where the NorthwindOutlookClient resides and rename that folder to NorthwindOutlookClient_OLD. Reopen the solution in Visual Studio. &lt;/P&gt;
&lt;P&gt;Next go to the main menu and select File –&amp;gt; Add –&amp;gt; New Project then make sure you select .NET Framework 4 and then choose Outlook 2010 Add-in and name it NorthwindOutlookClient. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_14.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_6.png" width=683 height=472 mce_src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Next right-click on the project and select Set as StartUp Project. Then Add –&amp;gt; Existing Item and select all the code, app.config, .xaml and .gif files in the NorthwindOutlookClient_OLD directory:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_18.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_8.png" width=638 height=528 mce_src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;When prompted, say YES to overwrite ThisAddIn but say NO to overwrite ThisAddIn.Designer file. (Even though we didn’t select the designer file, it is automatically brought in when we select ThisAddin.) &lt;/P&gt;
&lt;P&gt;Next we need to re-add our Service Reference to our data service by right clicking and select Add –&amp;gt; Service Reference, click Discover button and then name the service the same thing, NorthwindService. &lt;/P&gt;
&lt;P&gt;Next make sure the .gif file is set to a Resource in the file properties. Select the file in the Solution Explorer and in the properties window set the Build Action to Resource.&lt;/P&gt;
&lt;P&gt;Finally, because we are using WPF controls in this solution, right-click and select Add Reference to add the .NET assembly references for System.Xaml, PresentationCore, PresentationFramework, WindowsBase and WindowsFormsIntegration.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Back to Migrating the Form Region&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Now you can get back to upgrading your Form Region as explained in &lt;A href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#outlook" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#outlook"&gt;steps 5-8 &lt;/A&gt;. Add a new Form Region by selecting Project –&amp;gt; Add New Item and then selecting Form Region (now you’ll see the right templates). Walk through the wizard and then Show All Files again to open the designer generated file and grab the code for the two partial classes (note that the factory is an embedded class): &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_12.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_5.png" width=462 height=492 mce_src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/MigratinganOutlookClienttoVisualStudio20_CB9A/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;It’s not too painful to change your original code once you get the right template for it. You just need to make sure that after you paste in these two partial classes, you update all instances of the class name with yours. In our case the name of the Form Region is EmailForm so the updated code back in the NorthwindOutlookClient project will look like this (I know it’s ugly that’s why it’s designer generated ;-). As an aside, look at where underscores are still necessary to resolve ambiguity if there is a line break):&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;Partial Public Class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EmailFormFactory
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Implements &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;IFormRegionFactory

    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Public Event &lt;/SPAN&gt;FormRegionInitializing &lt;SPAN style="COLOR: blue"&gt;As  &lt;/SPAN&gt;_
        Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;FormRegionInitializingEventHandler

    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Private &lt;/SPAN&gt;_Manifest &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;FormRegionManifest

    &lt;/SPAN&gt;&amp;lt;System.Diagnostics.&lt;SPAN style="COLOR: #2b91af"&gt;DebuggerNonUserCodeAttribute&lt;/SPAN&gt;()&amp;gt; _
    &lt;SPAN style="COLOR: blue"&gt;Public Sub New&lt;/SPAN&gt;()
        &lt;SPAN style="COLOR: blue"&gt;Me&lt;/SPAN&gt;._Manifest = &lt;SPAN style="COLOR: #2b91af"&gt;Globals&lt;/SPAN&gt;.Factory.CreateFormRegionManifest()
        &lt;SPAN style="COLOR: #2b91af"&gt;EmailForm&lt;/SPAN&gt;.InitializeManifest(&lt;SPAN style="COLOR: blue"&gt;Me&lt;/SPAN&gt;._Manifest, &lt;SPAN style="COLOR: #2b91af"&gt;Globals&lt;/SPAN&gt;.Factory)
    &lt;SPAN style="COLOR: blue"&gt;End Sub

    &lt;/SPAN&gt;&amp;lt;System.Diagnostics.&lt;SPAN style="COLOR: #2b91af"&gt;DebuggerNonUserCodeAttribute&lt;/SPAN&gt;()&amp;gt; _
    &lt;SPAN style="COLOR: blue"&gt;ReadOnly Property &lt;/SPAN&gt;Manifest() &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;FormRegionManifest &lt;/SPAN&gt;_
             &lt;SPAN style="COLOR: blue"&gt;Implements &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;IFormRegionFactory&lt;/SPAN&gt;.Manifest
        &lt;SPAN style="COLOR: blue"&gt;Get
            Return Me&lt;/SPAN&gt;._Manifest
        &lt;SPAN style="COLOR: blue"&gt;End Get
    End Property

    &lt;/SPAN&gt;&amp;lt;System.Diagnostics.&lt;SPAN style="COLOR: #2b91af"&gt;DebuggerNonUserCodeAttribute&lt;/SPAN&gt;()&amp;gt; _
   &lt;SPAN style="COLOR: blue"&gt;Function &lt;/SPAN&gt;CreateFormRegion(&lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;formRegion &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Interop.Outlook.FormRegion) &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;_
             Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;IFormRegion &lt;/SPAN&gt;_
             &lt;SPAN style="COLOR: blue"&gt;Implements &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;IFormRegionFactory&lt;/SPAN&gt;.CreateFormRegion&lt;/PRE&gt;&lt;PRE class=code&gt;        &lt;SPAN style="COLOR: blue"&gt;Dim &lt;/SPAN&gt;form &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EmailForm &lt;/SPAN&gt;= &lt;SPAN style="COLOR: blue"&gt;New &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EmailForm&lt;/SPAN&gt;(formRegion)
        form.Factory = &lt;SPAN style="COLOR: blue"&gt;Me
        Return &lt;/SPAN&gt;form
    &lt;SPAN style="COLOR: blue"&gt;End Function

    &lt;/SPAN&gt;&amp;lt;System.Diagnostics.&lt;SPAN style="COLOR: #2b91af"&gt;DebuggerNonUserCodeAttribute&lt;/SPAN&gt;()&amp;gt; _
    &lt;SPAN style="COLOR: blue"&gt;Function &lt;/SPAN&gt;GetFormRegionStorage(&lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;outlookItem &lt;SPAN style="COLOR: blue"&gt;As Object&lt;/SPAN&gt;,
                  &lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;formRegionMode &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Interop.Outlook.OlFormRegionMode,
                  &lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;formRegionSize &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Interop.Outlook.OlFormRegionSize) _&lt;BR&gt;             &lt;SPAN style="COLOR: blue"&gt;As Byte&lt;/SPAN&gt;() _&lt;BR&gt;             &lt;SPAN style="COLOR: blue"&gt;Implements &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;IFormRegionFactory&lt;/SPAN&gt;.GetFormRegionStorage

        &lt;SPAN style="COLOR: blue"&gt;Throw New &lt;/SPAN&gt;System.&lt;SPAN style="COLOR: #2b91af"&gt;NotSupportedException&lt;/SPAN&gt;()
    &lt;SPAN style="COLOR: blue"&gt;End Function

    &lt;/SPAN&gt;&amp;lt;System.Diagnostics.&lt;SPAN style="COLOR: #2b91af"&gt;DebuggerNonUserCodeAttribute&lt;/SPAN&gt;()&amp;gt; _
    &lt;SPAN style="COLOR: blue"&gt;Function &lt;/SPAN&gt;IsDisplayedForItem(&lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;outlookItem &lt;SPAN style="COLOR: blue"&gt;As Object&lt;/SPAN&gt;,
                &lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;formRegionMode &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Interop.Outlook.OlFormRegionMode,
                &lt;SPAN style="COLOR: blue"&gt;ByVal &lt;/SPAN&gt;formRegionSize &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Interop.Outlook.OlFormRegionSize) _
            &lt;SPAN style="COLOR: blue"&gt;As Boolean _&lt;BR&gt;            Implements &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;IFormRegionFactory&lt;/SPAN&gt;.IsDisplayedForItem

        &lt;SPAN style="COLOR: blue"&gt;Dim &lt;/SPAN&gt;cancelArgs &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;FormRegionInitializingEventArgs &lt;/SPAN&gt;=
            &lt;SPAN style="COLOR: #2b91af"&gt;Globals&lt;/SPAN&gt;.Factory.CreateFormRegionInitializingEventArgs(outlookItem,
                                                                  formRegionMode,
                                                                  formRegionSize,
                                                                  &lt;SPAN style="COLOR: blue"&gt;False&lt;/SPAN&gt;)
        cancelArgs.Cancel = &lt;SPAN style="COLOR: blue"&gt;False
        RaiseEvent &lt;/SPAN&gt;FormRegionInitializing(&lt;SPAN style="COLOR: blue"&gt;Me&lt;/SPAN&gt;, cancelArgs)
        &lt;SPAN style="COLOR: blue"&gt;Return Not &lt;/SPAN&gt;cancelArgs.Cancel
    &lt;SPAN style="COLOR: blue"&gt;End Function

    &lt;/SPAN&gt;&amp;lt;System.Diagnostics.&lt;SPAN style="COLOR: #2b91af"&gt;DebuggerNonUserCodeAttribute&lt;/SPAN&gt;()&amp;gt; _
    &lt;SPAN style="COLOR: blue"&gt;ReadOnly Property &lt;/SPAN&gt;Kind() &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;FormRegionKindConstants &lt;/SPAN&gt;_
             &lt;SPAN style="COLOR: blue"&gt;Implements &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;IFormRegionFactory&lt;/SPAN&gt;.Kind
        &lt;SPAN style="COLOR: blue"&gt;Get
            Return &lt;/SPAN&gt;Microsoft.Office.Tools.Outlook.&lt;SPAN style="COLOR: #2b91af"&gt;FormRegionKindConstants&lt;/SPAN&gt;.WindowsForms
        &lt;SPAN style="COLOR: blue"&gt;End Get
    End Property
End Class
End Class

Partial Class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;WindowFormRegionCollection

    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Friend ReadOnly Property &lt;/SPAN&gt;EmailForm() &lt;SPAN style="COLOR: blue"&gt;As &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EmailForm
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Get
            For Each &lt;/SPAN&gt;Item &lt;SPAN style="COLOR: blue"&gt;As Object In Me
                If &lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;TypeOf &lt;/SPAN&gt;(Item) &lt;SPAN style="COLOR: blue"&gt;Is &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;EmailForm&lt;/SPAN&gt;) &lt;SPAN style="COLOR: blue"&gt;Then
                    Return CType&lt;/SPAN&gt;(Item, NorthwindOutlookClient.&lt;SPAN style="COLOR: #2b91af"&gt;EmailForm&lt;/SPAN&gt;)
                &lt;SPAN style="COLOR: blue"&gt;End If
            Next
            Return Nothing
        End Get
    End Property
End Class&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Now it looks like all our project errors have disappeared (thanks to Visual Basic’s background compiler). However if you didn’t create a brand new project like I explained above in order to work around that migration bug, then when you rebuild the solution you’ll see the build still fails. In this case we have one more thing to do.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Removing the SecurityTransparent Attribute &lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;The next section of the documentation on upgrading Office solutions has information on how to &lt;A href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#upgrade" mce_href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx#upgrade"&gt;Remove the SecurityTransparent attribute from Office Projects that you upgrade from Visual Studio 2008&lt;/A&gt;. Under My Project node in the Solution Explorer, open up the AssemblyInfo file and you’ll see at the bottom the SecurityTransparent attribute. Remove that line of code. If you created a new project based on .NET 4 from the get-go this file will already be correct. &lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Run it!&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Now you should be able to rebuild the project and it will succeed. Hit F5 and now we have the Outlook client working and looking as before, but now we are targeting the .NET framework 4 and we have all the new features at our disposal. &lt;/P&gt;
&lt;P&gt;As you can see there are some manual steps to migrating Office solutions to the .NET Framework 4, but once you are familiar with the changes, it’s pretty straightforward. Keep in mind that if you are migrating your own solutions and you have code that loads form regions and/or ribbons dynamically at runtime you will also have to update that code as well to use the factory methods and interfaces instead of classes, &lt;A href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee207231(VS.100).aspx"&gt;take a look at the documentation for details&lt;/A&gt;. Hopefully dealing with a little migration pain now will pay off in the long run to you and your users. &lt;/P&gt;
&lt;H4&gt;Resources&lt;/H4&gt;
&lt;P&gt;For more information on building Office solutions with Visual Studio please check out:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Office Development with Visual Studio Developer Center on MSDN = &lt;A href="http://msdn.com/vsto" mce_href="http://msdn.com/vsto"&gt;http://msdn.com/vsto&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Visual Studio Tools for Office Team Blog = &lt;A href="http://blogs.msdn.com/vsto" mce_href="http://blogs.msdn.com/vsto"&gt;http://blogs.msdn.com/vsto&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx" mce_href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx"&gt;Visual Studio 2010 Resources&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;For more information on underscores in Visual Basic 10 in Visual Studio 2010 see:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://channel9.msdn.com/posts/funkyonex/No-More-Underscrores-in-Visual-Basic-10/" mce_href="http://channel9.msdn.com/posts/funkyonex/No-More-Underscrores-in-Visual-Basic-10/"&gt;No More Underscores in Visual Basic 10&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vbasic/ee681551.aspx" mce_href="http://msdn.microsoft.com/en-us/vbasic/ee681551.aspx"&gt;How Do I: Use Implicit Line Continuation in Visual Basic 10?&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vbasic/dd819153.aspx" mce_href="http://msdn.microsoft.com/en-us/vbasic/dd819153.aspx"&gt;Visual Basic 2010 Resources&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9937506" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="Visual Basic" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Visual+Basic/default.aspx" /><category term="WPF" scheme="http://blogs.msdn.com/bethmassi/archive/tags/WPF/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Article" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Article/default.aspx" /><category term="Office" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Office/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="OBA" scheme="http://blogs.msdn.com/bethmassi/archive/tags/OBA/default.aspx" /></entry><entry><title>Office Development with Visual Studio Tutorial Series – Part 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2009/12/08/office-development-with-visual-studio-2008-tutorial-series-part-2.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2009/12/08/office-development-with-visual-studio-2008-tutorial-series-part-2.aspx</id><published>2009-12-08T18:51:00Z</published><updated>2009-12-08T18:51:00Z</updated><content type="html">&lt;P&gt;Last month &lt;A href="https://mvp.support.microsoft.com/profile=169AE602-45EF-47E6-8868-CA3E91D0A1EE" mce_href="https://mvp.support.microsoft.com/profile=169AE602-45EF-47E6-8868-CA3E91D0A1EE"&gt;Robert Green&lt;/A&gt;, VSTO MVP, started a series of tutorials on building on Office 2007. Today we published part 2 of his step-by-step tutorials. Thanks Robert!&lt;/P&gt;
&lt;P&gt;In this second part of the series of tutorials on Office Business Applications, learn how to create a Word 2007 price quote generation solution using Visual Studio 2008. This tutorial shows you how to create a custom task pane to display data from a database and binding that data to content controls. This step-by-step tutorial also includes full source code in Visual Basic. Check out the tutorial on the &lt;A href="http://msdn.microsoft.com/en-us/vsto/ee620548.aspx" mce_href="http://msdn.microsoft.com/en-us/vsto/ee620548.aspx"&gt;VSTO Developer Center&lt;/A&gt;: &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://msdn.microsoft.com/en-us/vsto/ee861194.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vsto/ee861194.aspx"&gt;Building an Office Business Application Part 2 – Generating Automobile Quotes&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;And if you missed part 1:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/vsto/ee620548.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vsto/ee620548.aspx"&gt;Building an Office Business Application Part 1 - Scheduling Customer Appointments&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If you’re just getting started with Office development in Visual Studio, this is a great place to start.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9934207" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="VS2008" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2008/default.aspx" /><category term="Community" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Community/default.aspx" /><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Article" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Article/default.aspx" /><category term="Office" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Office/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="OBA" scheme="http://blogs.msdn.com/bethmassi/archive/tags/OBA/default.aspx" /></entry><entry><title>Setting up Windows 7 for Office &amp; SharePoint 2010 Beta Development</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/bethmassi/archive/2009/12/02/setting-up-windows-7-for-office-sharepoint-2010-beta-development.aspx" /><id>http://blogs.msdn.com/bethmassi/archive/2009/12/02/setting-up-windows-7-for-office-sharepoint-2010-beta-development.aspx</id><published>2009-12-03T03:16:00Z</published><updated>2009-12-03T03:16:00Z</updated><content type="html">&lt;P&gt;So I decided to get my Windows 7 laptop installed with all the latest public Betas this week which includes Visual Studio Beta 2, SharePoint 2010 Beta and Office 2010 Beta. I had been using internal builds and thought it would be better to get in sync with everyone else in the community. I have to say there were a couple bumps that I experienced along the way that had me scratching my head and searching the web so I thought I’d consolidate all the resources I found and document the steps I did which resulted in a successful install. There is a lot of information out there depending on how you want to configure your system and I’m definitely not going to cover all the possibilities, I’m just going to focus on setting up a Windows 7 development environment and what worked for me in hopes of saving some time for other folks out there. &lt;STRONG&gt;As always, your mileage may vary.&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;NOTE: If you don’t plan on doing any SharePoint development then the install of Visual Studio and Office 2010 should be very smooth. I only experienced issues installing SharePoint 2010 Beta on my Windows 7 development machine. Also be aware that SharePoint 2010 Beta is supported on Windows 7 (and Vista) only for development purposes. So you will still need to have a testing environment built on Windows 2008 Server (or R2). For more information please see, &lt;A href="http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx"&gt;Setting Up the Development Environment for SharePoint Server&lt;/A&gt; , &lt;A href="http://technet.microsoft.com/en-us/library/cc262957(office.14).aspx" target=_blank mce_href="http://technet.microsoft.com/en-us/library/cc262957(office.14).aspx"&gt;SharePoint Deployment&lt;/A&gt;, &lt;A href="http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx" target=_blank mce_href="http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx"&gt;Determine hardware and software requirements&lt;/A&gt; and &lt;A href="http://blogs.msdn.com/sharepointdeveloperdocs/archive/2009/11/20/sharepoint-2010-beta-release-known-issues.aspx" target=_blank mce_href="http://blogs.msdn.com/sharepointdeveloperdocs/archive/2009/11/20/sharepoint-2010-beta-release-known-issues.aspx"&gt;SharePoint 2010 Beta Release Known Issues&lt;/A&gt;.&lt;/EM&gt;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;OS Requirements &amp;amp; Boot From VHD&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Before you attempt to set up a Windows 7 development environment, I &lt;STRONG&gt;highly &lt;/STRONG&gt;recommend booting from VHD. Do yourself a favor and create a Windows 7 bootable VHD so that if you mess up any part of an install you can simply delete it/roll back and start over. There’s a lot of information out there on how to do this but &lt;A href="http://blogs.technet.com/aviraj/archive/2009/01/18/windows-7-boot-from-vhd-first-impression-part-2.aspx" target=_blank mce_href="http://blogs.technet.com/aviraj/archive/2009/01/18/windows-7-boot-from-vhd-first-impression-part-2.aspx"&gt;I used these instructions to create a Win7 64-bit VHD&lt;/A&gt; via Hyper-V, sysprep-ed it, copied it to my local hard drive, and then used BCDEdit to add the VHD to my boot menu. &lt;/P&gt;
&lt;P&gt;Make sure you create a 64-bit Windows 7 Professional or higher edition with at least 4GB RAM if you’re going to do SharePoint development. You'll need Windows 7 Enterprise or Ultimate to boot from VHD.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;What to Install - SharePoint Foundation or SharePoint Server?&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;There are two versions of SharePoint that you can choose to install. It’s recommend that you install SharePoint Foundation (formerly known as WSS) if you only have 4 GB of RAM on your machine because there’s a lot less services running than the Server version (formerly known as MOSS). But if you need all the functionality of SharePoint Server then make sure you have enough of RAM. Just for fun I installed the Server version on my machine with only 4GB and it’s maxed out at 95% so I went with Foundation in the end. :-) &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=906c9f5a-6505-4eba-bf24-95e423ac1703&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=906c9f5a-6505-4eba-bf24-95e423ac1703&amp;amp;displaylang=en"&gt;Download Microsoft SharePoint Foundation 2010 Beta here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=77c30c6c-47fc-416d-88e7-8122534b3f37" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=77c30c6c-47fc-416d-88e7-8122534b3f37"&gt;Download Microsoft SharePoint Server 2010 Beta here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note that you do not need to register or obtain a product key for installing SharePoint Foundation but you do for Server. The Product Key for Server is located at the bottom of the download page after you register (I missed it the first time so make sure you grab that before installing). &lt;/P&gt;
&lt;H4&gt;&lt;IMG style="DISPLAY: inline; MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px" align=left src="http://i.msdn.microsoft.com/ee402630.Sharepoint_lg(en-us,MSDN.10).png" mce_src="http://i.msdn.microsoft.com/ee402630.Sharepoint_lg(en-us,MSDN.10).png"&gt; &lt;BR&gt;Installing SharePoint 2010 Beta on Windows 7&lt;/H4&gt;
&lt;P&gt;&lt;BR&gt;Read these instructions carefully: &lt;A href="http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx"&gt;Setting Up the Development Environment for SharePoint Server&lt;/A&gt;&lt;STRONG&gt;&lt;/STRONG&gt;.&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;These are the instructions you’ll need to follow with a few additions I’ve added below as you go. Now that you’ve got your 64-bit Windows 7 VHD (are logged in as an administrator account) and downloaded SharePoint 2010 Beta you’re ready to proceed to Step 2 in the instructions. &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Step 2: Install the Prerequisites for SharePoint 2010&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;There are a lot of prerequisites that you’ll need to install before you get to actually installing the SharePoint Beta. Follow all the instructions in Step 2 exactly as it says for Windows 7 to install all the prereqs and Windows features. But note that figure 3 in bullet #9 is incorrect. WCF Non-HTTP Activation should appear as checked. The script in bullet #8 is correct, it’s just a problem with the screenshot so don’t get confused. &lt;/P&gt;
&lt;P&gt;Next reboot. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BEFORE &lt;/STRONG&gt;going to Step 3, you will need to install a WCF hotfix &lt;A href="http://blogs.msdn.com/sharepointdeveloperdocs/archive/2009/11/20/sharepoint-2010-beta-release-known-issues.aspx" target=_blank mce_href="http://blogs.msdn.com/sharepointdeveloperdocs/archive/2009/11/20/sharepoint-2010-beta-release-known-issues.aspx"&gt;as described in this post&lt;/A&gt; which fixes an "Unrecognized attribute 'allowInsecureTransport'" error. The WCF &lt;A href="http://go.microsoft.com/fwlink/?LinkID=166231" target=_blank mce_href="http://go.microsoft.com/fwlink/?LinkID=166231"&gt;hotfix for Windows 7 is available here&lt;/A&gt;. After installing this hotfix, reboot.&lt;/P&gt;
&lt;P&gt;Now you’re at Step 3 and ready to install SharePoint. &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Step 3: Install SharePoint 2010&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Follow the instructions listed in this step to install SharePoint until you get to bullet #5. When you get here, you need to download and install the &lt;A href="http://support.microsoft.com/kb/970315" target=_blank mce_href="http://support.microsoft.com/kb/970315"&gt;SQL Server 2008 KB 970315 x64&lt;/A&gt; hotfix SQL_Server_2008_SP1_Cumulative_Update_2 build &lt;BR&gt;10.00.2714.00 which you get to by clicking the &lt;A href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=970315&amp;amp;kbln=en-us" target=_blank mce_href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=970315&amp;amp;kbln=en-us"&gt;View and request hotfix downloads&lt;/A&gt;&lt;EM&gt;&lt;/EM&gt; link at the top of the KB article. &lt;/P&gt;
&lt;P&gt;When installing this though I got the error "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." To resolve it, I closed the all open windows including the SharePoint Configuration wizard (which is sitting open after SharePoint is installed) and then I reran the hotfix. Not sure what is going on here but it looks like it’s a &lt;A href="http://blogs.msdn.com/petersad/archive/2009/08/14/invoke-or-begininvoke-cannot-be-called-on-a-control-until-the-window-handle-has-been-created.aspx" target=_blank mce_href="http://blogs.msdn.com/petersad/archive/2009/08/14/invoke-or-begininvoke-cannot-be-called-on-a-control-until-the-window-handle-has-been-created.aspx"&gt;known issue on Win 7 64 according to this post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;After that successfully installed I rebooted again. &lt;/P&gt;
&lt;P&gt;Now you need to run the SharePoint Configuration wizard, Start –&amp;gt; Programs –&amp;gt; Microsoft SharePoint 2010 Products –&amp;gt; SharePoint 2010 Products Configuration. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note to domain users:&lt;/STRONG&gt; If you are installing as an administrator but your account is part of a domain, you will need to make sure you have online access to the domain controller! Otherwise configuration will fail on Step 2 with “Exception: Microsoft.SharePoint.SPException: User cannot be found.” This happens even though you select to install the standalone version. This bit me because I was installing on a laptop at home and was not on the corporate domain. I had to start my VPN and then I was good to go, until step 5 that is. ;-) &lt;/P&gt;
&lt;P&gt;On Step 5 I ran into another error “Failed to register SharePoint services. An exception of type System.ServiceProcess.TimeoutException was thrown.” This happened when I was installing the Server version and not Foundation. However &lt;A href="http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/d5bc40dc-88cf-42b5-8a6c-120e5a8e1dc4" target=_blank mce_href="http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/d5bc40dc-88cf-42b5-8a6c-120e5a8e1dc4"&gt;I found a thread&lt;/A&gt; that told me this is related to low memory so I closed some other programs I had running and tried it again and it ran fine. This is why you should make sure you have enough memory before starting. ;-)&lt;/P&gt;
&lt;P&gt;You made it! SharePoint 2010 Beta should now be installed. To verify, open your browser to http://&lt;EM&gt;&amp;lt;MachineName&amp;gt; &lt;/EM&gt;and you should be able to start playing with your new SharePoint site. &lt;STRONG&gt;&lt;IMG style="MARGIN: 0px 10px 0px 0px; DISPLAY: inline" align=left src="http://i.msdn.microsoft.com/ee402630.VisualStudio_lg(en-us,MSDN.10).png" mce_src="http://i.msdn.microsoft.com/ee402630.VisualStudio_lg(en-us,MSDN.10).png"&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;H4&gt;Installing Visual Studio 2010 Beta 2&lt;/H4&gt;
&lt;P&gt;&lt;BR&gt;Everything should be super easy to install now but just in case you may want to save your VHD after you get SharePoint successfully installed ;-). &lt;/P&gt;
&lt;P&gt;You’ll need Visual Studio 2010 Beta Professional edition or higher to work with Office &amp;amp; SharePoint. I just picked the whole she-bang, Visual Studio 2010 Ultimate. I used the web installer but you can also choose the ISO package if you want to bring it all down once. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://go.microsoft.com/fwlink/?LinkID=165573" target=_blank mce_href="http://go.microsoft.com/fwlink/?LinkID=165573"&gt;Download Visual Studio 2010 Ultimate (web bootstrapper)&lt;/A&gt; (See &lt;A href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx"&gt;this page for more&lt;/A&gt; download options).&lt;/P&gt;
&lt;P&gt;There was no hitch to install all the components of Visual Studio 2010 and .NET Framework 4. It took me about 35 minutes to wait for it to complete with one reboot in the middle. For more information, see the &lt;A href="http://go.microsoft.com/fwlink/?LinkID=166199" target=_blank mce_href="http://go.microsoft.com/fwlink/?LinkID=166199"&gt;Visual Studio 2010 Beta 2 Readme&lt;/A&gt;, &lt;A href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx" target=_blank mce_href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx"&gt;Visual Studio 2010 Product Information&lt;/A&gt; and &lt;A href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx"&gt;Featured Overviews and Walkthroughs&lt;/A&gt;.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;&lt;IMG style="MARGIN: 0px; DISPLAY: inline" align=left src="http://i.msdn.microsoft.com/ee402630.Office2010_lg(en-us,MSDN.10).png" mce_src="http://i.msdn.microsoft.com/ee402630.Office2010_lg(en-us,MSDN.10).png"&gt;&amp;nbsp; &lt;BR&gt;&lt;/STRONG&gt;Installing Microsoft Office 2010 Beta&lt;/H4&gt;
&lt;P&gt;&lt;BR&gt;This one is probably the easiest to install. &lt;/P&gt;
&lt;P&gt;&lt;A title=http://msdn.microsoft.com/en-us/evalcenter/ee390822.aspx href="http://msdn.microsoft.com/en-us/evalcenter/ee390822.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/evalcenter/ee390822.aspx"&gt;Download Office 2010 Beta here.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Scroll to the bottom of the page to get started. You’ll need to register and then you’ll get a product key page with a download button at the bottom. Save your product key and then select the language to download. Note that it says “&lt;EM&gt;Download the 32-bit (x86) version:&lt;/EM&gt;” but the download will include both 32-bit and 64-bit so don’t worry. &lt;/P&gt;
&lt;P&gt;Once you click the download button you’ll actually have to install a little download manager to get the setup package. Once you download the package, click on the ProfessionalPlus.exe to start the install. You’ll see a big button “Install Now”. Click that and in about 15 minutes you’ll have Office installed. It doesn’t get much easier than that.&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Let ‘er Rip!&lt;A href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/SettingupWindows7forOfficeSharePoint2010_CA0B/spsite_4.png" target=_blank mce_href="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/SettingupWindows7forOfficeSharePoint2010_CA0B/spsite_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 0px 10px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=spsite border=0 alt=spsite align=right src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/SettingupWindows7forOfficeSharePoint2010_CA0B/spsite_thumb_1.png" width=341 height=362 mce_src="http://blogs.msdn.com/blogfiles/bethmassi/WindowsLiveWriter/SettingupWindows7forOfficeSharePoint2010_CA0B/spsite_thumb_1.png"&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Okay so you want to be able to test these things are all installed and playing happily. In order to develop against SharePoint you’ll need to open Visual Studio as &lt;STRONG&gt;run as Administrator. &lt;/STRONG&gt;Next, open the Server Explorer and you should see a SharePoint Connections node. Expand that node and you should be able to browse your SharePoint site.&lt;/P&gt;
&lt;P&gt;You should also explore some of the awesome new project templates under the Office &amp;gt; 2010 and SharePoint &amp;gt; 2010 nodes in the File &amp;gt; New Project dialog. &lt;/P&gt;
&lt;H4&gt;What’s Next?&lt;/H4&gt;
&lt;P&gt;Now it’s time for us to learn how to use these Office and SharePoint tools in Visual Studio! Check out some of my favorite resources:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Office 2010 Development Resources&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/vsto/ee676911.aspx"&gt;Office Development in Visual Studio 2010 Beta Samples, Walkthroughs and Videos&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://social.msdn.microsoft.com/Forums/en-US/officedevelopmentprerelease/threads" target=_blank mce_href="http://social.msdn.microsoft.com/Forums/en-US/officedevelopmentprerelease/threads"&gt;Office Development in Visual Studio 2010 Forums&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/vsto/default.aspx" target=_blank mce_href="http://blogs.msdn.com/vsto/default.aspx"&gt;Office Development with Visual Studio Team Blog&lt;/A&gt;&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/office/ee513173.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/office/ee513173.aspx"&gt;Office 2010 Beta Resources&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.technet.com/gray_knowlton/archive/2009/11/10/office-2010-application-compatibility-deep-dive-on-the-code-compatibility-inspector.aspx" target=_blank mce_href="http://blogs.technet.com/gray_knowlton/archive/2009/11/10/office-2010-application-compatibility-deep-dive-on-the-code-compatibility-inspector.aspx"&gt;Office 2010 Application Compatibility Tools&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;SharePoint 2010 Development Resources&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx#Sharepoint" target=_blank mce_href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx#Sharepoint"&gt;SharePoint Development in Visual Studio 2010 Walkthroughs&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://channel9.msdn.com/tags/Sharepoint+2010+Beta/" target=_blank mce_href="http://channel9.msdn.com/tags/Sharepoint+2010+Beta/"&gt;SharePoint Development in Visual Studio 2010 Videos&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopmentprerelease/threads" target=_blank mce_href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopmentprerelease/threads"&gt;SharePoint Development Forums&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx"&gt;SharePoint 2010 Development Resources&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/sharepoint/" target=_blank mce_href="http://blogs.msdn.com/sharepoint/"&gt;SharePoint Team Blog&lt;/A&gt; 
&lt;P&gt;Enjoy!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9931766" width="1" height="1"&gt;</content><author><name>bethmassi</name><uri>http://blogs.msdn.com/members/bethmassi.aspx</uri></author><category term="DevCenter" scheme="http://blogs.msdn.com/bethmassi/archive/tags/DevCenter/default.aspx" /><category term="Article" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Article/default.aspx" /><category term="Office" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Office/default.aspx" /><category term="VS2010" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VS2010/default.aspx" /><category term="VSTO" scheme="http://blogs.msdn.com/bethmassi/archive/tags/VSTO/default.aspx" /><category term="SharePoint" scheme="http://blogs.msdn.com/bethmassi/archive/tags/SharePoint/default.aspx" /><category term="Windows 7" scheme="http://blogs.msdn.com/bethmassi/archive/tags/Windows+7/default.aspx" /></entry></feed>