Using 2003 Compatible C# Code in VS2008 - InfoPath Dev
in

InfoPath Dev

Using 2003 Compatible C# Code in VS2008

Last post 01-30-2010 05:49 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-27-2010 06:51 PM

    Using 2003 Compatible C# Code in VS2008

    I have found similar postings to people having this problem, but never did I find a solution.

    It seems that with VS2008, if you create a 2007 InfoPath project, remove the code, and try to use C# (2003 Compatible) object model, it creates 6 compiler errors.   Complaining that it cannot find type or namespace 'VisualStudio' nor can it find 'InfoPath' in the Microsoft.Office namespace.

    Apparently when you remove code, it does not rebuild the FormCode.Designer.cs file to conform to IP2003.   Instead, it seems to leave it as IP2007 object model, so the compile fails.

    Anyone have any solution around this problem?

     

  • 01-30-2010 05:49 AM In reply to

    Re: Using 2003 Compatible C# Code in VS2008

    Well, I'm sure what I'm about to suggest is not recommended. So, the usual caveats about backing up anything you care about, etc, apply. I just tried this, and when it failed, I deleted everything in the FormCode.Designer.cs file and saved it.

    Then I added a new event to my form code (added a button to my form, added code) and, after a brief pause while VS nicely rewrote the FormCode.Designer.cs file, I was in business. Previewed my form, clicked my button and everything was sunshine and buttercups.

    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.