Black Blade Associates Logo A Black Blade Associates blog. Struggling with SharePoint? We can help.




Blog moved: This blog has moved to http://thingsthatshouldbeeasy.wordpress.com. Go there now to see the new posts.


Wednesday, July 28, 2010

Why You Shouldn’t Upgrade to Visual Studio 2010

microsoft-visual-studio-2010-logo-vs2010I have been eagerly anticipating the release of Visual Studio 2010 and the ..Net Framework 4.0 for a while. I even did some work with the betas and release candidates. Now that Visual Studio 2010 has released, I have been working on an adoption plan for my company, Black Blade Associates.

I was hoping to embrace Visual Studio 2010 quickly, but after some investigations it seems that we will need to take a much more conservative approach. Here are some reasons that I’ve found not to upgrade to Visual Studio 2010:

No InfoPath forms development support

It seems that the InfoPath integration first introduced with Visual Studio 2008 is gone in Visual Studio 2010. If you want to create an InfoPath form with custom code and manage the code in Team Foundation Server, you will need to flip between three different applications. Don’t take my word for it. Watch a video demonstration from the Microsoft product team. This seems like a crazy way to work.

Why do I care so much about it? We do a lot of workflow development for the SharePoint platform, and web-enabled InfoPath forms are a big part of that. The painful InfoPath forms development story in Visual Studio 2010 is a deal breaker for us.

No support for Windows Mobile 5, 6, 6.5

Visual Studio 2010 only supports developing Windows Phone 7 application development. Developers needing to create Windows Mobile 5, 6, or 6.5 applications will need to use Visual Studio 2008. This is not such a huge issue for me, but it would be a big problem for the large community of Windows Mobile developers needing to support the new Windows Phone 7 operating system while maintaining support for existing mobile operating systems.

Have you upgraded?

Have you found other reasons that prevent you from upgrading quickly to Visual Studio 2010? Post a comment. I’d love to keep a list of known upgrade impediments.

Tuesday, July 27, 2010

Creating SharePoint Custom Field Types with Visual Studio

I am excited to be presenting a session on Creating SharePoint Custom Field Types with Visual Studio at SharePoint Saturday New York, July 31, 2010.

SharePoint has many customization options for the user interface and for the data model. SharePoint custom field types are unique in that they provide an integrated mechanism for customizing SharePoint user interface, data storage, data entry, data validation, and rendering. Best of all, these customizations stay with your data anywhere a List View Web Part or List View Form Page is used.

Here are the topics I will cover in the presentation:

  • Custom Field Types Defined
    Learn what custom field types are and how they work.
  • Business Cases
    Implementing custom field types is not trivial. What business reasons justify the effort?
  • Custom Field Types and Alternate SharePoint Extensibility
    How do custom field types compare to other forms of SharePoint extensibility like web parts and event receivers? What are the pros and cons using each extensibility option?
  • Custom Field Types Implementation
    What does it take to create a new custom field type? We will see all the components we need, including the CAML XML, the C# code, and the WSP.DDF file used for packaging and deployment.
  • Demo: Code walkthrough and demo of a media player custom field type
    There’s nothing more exciting to users that seeing video on their portal site. We’ll create a custom field type that will let you turn your SharePoint site into a mini YouTube, well, almost :).

SharePoint Saturday New York is at the Microsoft Manhattan office at

1290 Avenue of the Americas
New York, NY

July 31, 2010

See you there. If you can’t make it, don’t worry. I will post the presentation and code.

Friday, July 09, 2010

InfoPath 2010 Development with Visual Studio 2008

Have you recently done a fresh installation of Office 2010 with InfoPath 2010 and tried to work on an InfoPath Form Template or InfoPath Add-in project? If you are getting one of these errors:

 

image

One or more projects in the solution could not be loaded for the following reason(s):

The application for the project is not installed.

These projects will be labeled as unavailable in Solution Explorer. Expand the project node to show the reason the project could not be loaded.

-or-

image 

Error: this template attempted to load an untrusted component 'Microsoft.Office.InfoPath.Vsta, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL'.  For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates.

-or-

image

Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

How did I get myself into this mess? I had to re-install Windows 7 on my development box. So, I figured I would install Office 2010 rather than 2007. I then installed Visual Studio 2008 with the Office tools (we have lots of customers that still require our solutions be delivered in 2008 rather than 2010 format). I tried opening an InfoPath Forms project that I had previously been able to open and compile, and got the first error. I tried creating a new InfoPath Forms project and got the second error.

The short of it is that an Office 2010 installation does not contain the necessary DLLs, COM Object registrations, and assemblies that Visual Studio 2008 needs in order to do create the Office 2007 projects surfaced by the Office Tools for Visual Studio components packaged with Visual Studio. You need to have the Office 2007 applications installed before you install Visual Studio 2008.

Here are the steps I used to fix the errors. Notice that I already had Office 2010 and Visual Studio installed before I started on the steps to fix the errors in this post:

  1. Install InfoPath 2007, including the shared features
  2. Install Office 2007 Service Pack 2
  3. Uninstall Visual Studio 2005 Tools for Office Second Edition (VSTA)
  4. Uninstall Visual Studio Tools for Office Runtime 3.0 (VSTO)
  5. Install VSTO
    <Visual Studio Install Disc>:\WCU\VS Tools for Office\vstor30.exe
  6. Install VSTA
    <Visual Studio Install Disc>:\WCU\VS Tools for Office\vstor.exe
  7. Full repair of Visual Studio 2008

After I completed steps 1 and 2, I no longer received the first two errors about missing assemblies. Now I received the error about the missing COM library registration. I did not get rid of all errors until I completed step 7. I should note that I don’t know if steps 3-6 were necessary since I ultimately did a complete repair of Visual Studio in step 7. I list those steps for the sake of completeness.

You may be wondering why I just didn’t upgrade to Visual Studio 2010 and potentially save myself some headaches here. Well there are a few reasons. First, most of customers still require our solutions be delivered in 2008 rather than 2010 format, so even if I were to install Visual Studio 2010, I would still need to work with Visual Studio 2008 for the majority of our customer projects. But more importantly, it appears that Visual Studio 2010 does not support integrated InfoPath development with any version of InfoPath, 2007 or 2010. So for now, it looks like I will be using Visual Studio 2008 with InfoPath 2007 for my InfoPath forms development.

Thursday, July 08, 2010

InfoPath Development with Visual Studio 2010

It is uncertain what the InfoPath development story is for Visual Studio 2010. Christopher Brotsos a Microsoft program manager on the InfoPath 2010 team indicates that there is no Visual Studio 2010 support for InfoPath development.

http://social.msdn.microsoft.com/Forums/en/officedevelopmentprerelease/thread/18a93486-0773-44cb-ae04-cc4b8f75c205?prof=required

So how does one create InfoPath 2010 forms that have code? Say “hello again” to Visual Studio for Applications. Philip Newman and Christopher Brotsos show how to create forms with code by flipping between InfoPath and VSTA. Oh, and if you want source control integration too, then you also get to flip to a third application, Visual Studio 2010, to perform your check-in / check-outs.

Get Microsoft Silverlight

http://blogs.msdn.com/b/infopath/archive/2010/06/10/using-tfs-for-source-control-in-infopath-2010.aspx

I can’t help but feel that InfoPath development has taken a huge step backwards with the Visual Studio 2010 / Office 2010 product releases. Here’s hoping that a service pack makes things better.