Recover VSTA Project File - InfoPath Dev
in

InfoPath Dev

Recover VSTA Project File

Last post 08-22-2011 08:40 AM by Qurator. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-22-2011 06:42 AM

    Recover VSTA Project File

    Hi,

     I've recently been asked to modify a published form and update the code. Unfortunately, no one knows where the code is actually located. The only versions I've been able to find so far appear to be missing quite a bit of functionality. Is there anyway to locate the .cs file from the published .xsn?

     

    Thanks,

  • 08-22-2011 08:08 AM In reply to

    Re: Recover VSTA Project File

    Hello Qurator,

    unfortunately but as far as I know there is no way to get the .cs file from a published template form. When you publish the form, all files are packaged in the .XSN (template) and the code is also packaged in the XSN in the form of a DLL. The code is compiled into a DLL (dynamic link library) and it is packaged inside the template file (XSN) so when you publish the form, the published template already has the code compiled into it. So there´s no source code in a published form at all.

    I´m really sorry but you will have to search for the originally saved template with the VSTA project.

    Regards,

    Karsten
  • 08-22-2011 08:21 AM In reply to

    Re: Recover VSTA Project File

    There are tools to disassemble a .NET DLL and return them to some human-readable format.  I haven't tried them myself and I reckon it would take a fair amount of know-how to use.  Mr. Brocksieper is correct that there's no way to get back the original .cs without finding it somewhere.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 08-22-2011 08:40 AM In reply to

    Re: Recover VSTA Project File

    Hi,

     Just a quick update. I've managed to decompile the .dll using Telerik JustDecompile BETA. Nice and easy to use if anyone has the same problem. It showed all the functions that were inside in .cs or .vb or IL. It appears to have the ability to make a .cs file but I opted to copy and paste. Although the code isn't 100% it gives a good idea of what was happening and I've managed to recreate the functionality of the old form and introduce the new features. No doubt there will be some bugs, but hopefully this will be a 1 off thing.

     Thanks for the help. :)

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