WinForms Hosted Infopath Forms Having Trouble With External Custom DLLs - InfoPath Dev
in

InfoPath Dev

WinForms Hosted Infopath Forms Having Trouble With External Custom DLLs

Last post 08-31-2012 01:02 PM by GeekSage. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-31-2012 09:00 AM

    WinForms Hosted Infopath Forms Having Trouble With External Custom DLLs

    We have a WinForms app in C# that uses InfoPath forms on laptops that our nurses use out in the field. We have multiple custom DLLs that are used by the InfoPath forms and the way the program was originally created it has a local copy of every referenced DLL in the XSN file. The issue is that almost every one of those DLLs is the same between each of these forms so we have many copies of the same DLLs being installed on the client machines and the install size got out of hand. I've just recently become involved with this project and figured out that I could remove the DLLs from being contained in the XSN easy enough but I want to be able to access those DLLs from a central location (which the main app uses some of those same DLLs as well). The problem is when the form is loaded in the application it can't find the DLLs unless they are either in the XSN file or you install them into the GAC which I'm trying to avoid. Does anyone know a way around this or would I be forced to use the GAC? We are currently using InfoPath 2007 and VS2008. I guess the reason this project hasn't been updated to VS2010/IP2010 is because MS removed the ability to develop the InfoPath forms within the VS IDE in 2010 which is unfortunate.
  • 08-31-2012 12:17 PM In reply to

    Re: WinForms Hosted Infopath Forms Having Trouble With External Custom DLLs

    GeekSage:
    it has a local copy of every referenced DLL in the XSN file
     

    GeekSage:
    I'm trying to avoid. Does anyone know a way around this or would I be forced to use the GAC?
     

    Just publish XSN template to a network share, no need to install dll into GAC, if they were developed through Infopath.

    GeekSage:
    We are currently using InfoPath 2007 and VS2008. I guess the reason this project hasn't been updated to VS2010/IP2010 is because MS removed the ability to develop the InfoPath forms within the VS IDE in 2010 which is unfortunate

    Infopath 2010 as well as 2007 is integrated with  VSTA (Visual Studio Tools for Applications) on the basis of no more than  VS2005 and .NET 2.0. VSTA is part of MS Office suite, installed from Office setup. For developing client-side Infopath code, you need neither VS2008 nor VS2010

    I couldn't grasp how you connected Infopath 2010 with VS 2010. VS2008 or VS2010 are indispensable for server-side sharepoint development but not for client-side Infopath development "if the program was originally created it has a local copy of every referenced DLL in the XSN file".

     

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 08-31-2012 01:02 PM In reply to

    Re: WinForms Hosted Infopath Forms Having Trouble With External Custom DLLs

    I can't put it on a shared drive because these are used in a disconnected environment on laptops by our nursing staff. To give an example of one of our large forms they created many (30+) form parts and then in the Visual Studio environment joined the parts together in one large form. They then added references to some custom DLLs and reference them from the "code behind" of the form to save data to the database, etc. We don't use SharePoint here at all though. The program was working but the real issue is that the shared DLLs are contained in each of the form's XSN files that reference them. I just set the option so that they won't copy locally and therefore don't include them in the distributed XSN file. These DLLs already exist in a resource directory on the client's laptops so I just wanted the forms to reference those DLLs from that central location. The problem I've run into is that no matter what I seem to do the "code behind" of the InfoPath form will not see these DLLs unless they are either contained in the form's XSN file or I put them in the GAC. I just want the "code behind" to be able to use the DLLs from their current central location (on that laptop).
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.