Infopath VSTA, Visual Studio 2008 - InfoPath Dev
in

InfoPath Dev

Infopath VSTA, Visual Studio 2008

Last post 03-29-2011 05:36 AM by sam stephen. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-16-2009 02:30 AM

    Infopath VSTA, Visual Studio 2008

    I've been asked to work on Infopath to create workflows in SharePoint. I use Visual Studio 2008 to program any code I normally do.

    If I design an Infopath form, when I click Tools -> Programming -> Microsoft Visual Studio Tools for Applications, it creates a Visual Studio 2005 project. I don't even have Visual Studio 2005 installed on my machine, although a VS2005 environment loads up.

    Is there a way I can get it to create a VS2008 project instead. I have tried to open the project in VS2008, but it just upgrades the project, which then breaks the form if you try and access the code again in Infopath.

    I want to be able to do this so I can debug, as MVSTA doesn't allow you to attach a debugger. The easiest step would be just to find my MSDN disk and install Visual Studio 2005 so I can debug the Infopath projects, but that seems overkill to have VS2003, VS 2005 and VS 2008 installed on my machine.

  • 10-29-2009 02:40 AM In reply to

    Re: Infopath VSTA, Visual Studio 2008

    I found out how to do it.

     First you need to convert VSTA project to Microsoft Visual Studio Tools for Office (VSTO).

    1. Copy the VS2005 solution Infopath creates to a new folder (e.g. C:\[user]\My Documents\Visual Studio 2008\Project\)
    2. Start Visual Studio 2008 and open projectname.sln from the location where you copied the project folder in step 1. (Allow the project to upgrade).
    3. In Solution Explorer, right-click the project fodler, point to Add, then click New Folder.
    4. Name the new folder InfoPath Form Template. The name of the folder must be exact to work correctly.
    5. Close Visual Studio 2008.
    6. Start InfoPath and open the original form template for the project in Design mode.
    7. On the File menu, click Save as Source Files, and then save the files to the InfoPath Form Template folder. This will be located inside the folder where you copied the project in step 1.
    8. Close Infopath.
    9. Start Visual Studio 2008, and then open the project you opened in step 2.
    10. In Solution Explorer, click the Show All Files button. Inside the InfoPath Form Template you should find a bunch of files. Right click each one and Include in project.
    11. In Solution Explorer, double-click manifest.xsf file to open the form template in Design mode in Visual Studio.

    You should now be able to perform everything you could do in InfoPath inside Visual Studio, including adding code, designing and publishing it!

    Finally to debug, after you have published your form into SharePoint, all you do is attached the debugger to the SharePoint w3wp.exe process.

  • 03-29-2011 05:36 AM In reply to

    Re: Infopath VSTA, Visual Studio 2008

    I had the same problem, just follow this simple answer https://msmvps.com/blogs/sundar_narasiman/archive/2008/05/20/how-to-install-vsta-visual-studio-tools-for-applications.aspx I hope it will work for you as well.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.