Dotaz InfoPath 2010 Code Not Updating

  • 12. března 2012 21:35
     
     

    I have an InfoPath form whose code I update before redeploying the form to SharePoint via a solution package.

    I added a new field to the form, added code to set its value, and though it works when running locally, it doesn't when deployed to SharePoint as a browser-based form.

    I can even comment out old code, but it continues to function even though I see the new field I added to the form (implying the latest version was deployed).

    I'm scratching my head a bit: what could be going on?

Všechny reakce

  • 12. března 2012 23:18
     
     

    So I think I figured out what my issue was: the .dll was actually manually copied to the feature folder awhile ago as part of troubleshooting, and it never went away.

    However, I'm now stuck with the problem, where I get this error:

    "An unexpected FileNotFound failure occurred loading assembly: Could not load file or assembly 'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\MyFeature\MyInfoPathForm.dll'"

    The InfoPath .xsn gets deployed fine otherwise, it just gets confused trying to load the assembly.

    Does anyone know what could be happening there? I may try to ask this as a new question if I don't get a response.

  • 12. března 2012 23:30
     
     
    Did you delete the DLL from that location?
  • 12. března 2012 23:48
     
     

    Yes, but the point I'm at now is that Forms Services isn't automatically loading the embedded .dll of the XSN and I don't know why. Instead, Forms Services is looking for the .dll in the feature folder where the XSN is deployed.

    What I've resorted to for the time being is extracting the .dll from the XSN, then deploying it along with the form as an ElementFile of the feature.

    It works, but it's labor-intensive and it's definitely not the correct way to go about a solution.

  • 13. března 2012 15:23
     
     
    Why did you choose to deploy the form as a solution package and not uploading it normally through central admin?
  • 13. března 2012 16:24
     
     
    Why did you choose to deploy the form as a solution package and not uploading it normally through central admin?

    Usability. I want deployment of all functional components to be in one place (site columns, list instance, view creation, XSN, event receiver, etc.).

    Otherwise, deployment is laborious and error-prone.

  • 14. března 2012 8:24
    Moderátor
     
     

    Hi ,

    How do you redeploy the form ?

    Since your form have been updated ,you can uninstall the solution package form Central Administration>System Settings>Manage Farm
    Solutions .Then create a new solution to deploy the form .

    Thanks


    Entan Ming

    TechNet Community Support

  • 14. března 2012 15:50
     
     

    I deploy the solution through Visual Studio, which does a retract, delete, add and deploy (plus it deletes the existing lists and recreates them).

    To be clear, the file updates are occuring without issue, it's just that Forms Services is trying to load the XSN assembly from my feature folder for some reason (instead of using the XSN's embedded .dll).