Note that there are some explanatory texts on larger screens.

plurals
  1. POOpening InfoPath forms in .Net 4.0
    primarykey
    data
    text
    <p>I'm working on upgrading an older application from .Net 2 to .Net 4. The program utilizes infopath forms, and they are causing a fair amount of annoyance to get working. First, it was throwing a FileLoadException, with the message "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information." I did some research and added the following to my app.config file:</p> <pre><code>&lt;startup useLegacyV2RuntimeActivationPolicy="true"&gt; &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt; &lt;/startup&gt; </code></pre> <p>I then re-ran the application out of Visual Studio, and when it just tries to open a form, it now throws a COMException, and that "This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch." So I do. I added the following to my app.config file:</p> <pre><code>&lt;runtime&gt; &lt;NetFx40_LegacySecurityPolicy enabled="true"/&gt; &lt;/runtime&gt; </code></pre> <p>Now when it tries to open an InfoPath form, it tells me that I need to install .Net 3.5 onto my computer. I guess my question from all of this is, do I really have to install the .Net 3.5 framework onto a computer to get this application running, even though it is in .Net 4.0? The compact version of .Net 3.5 doesn't work, and I'm assuming this is all over the CAS changes from 3.5 to 4.0, but I'm hoping there's a programmatic way to rememdy this and open/save InfoPath forms without having to make the user install another Framework onto their computer.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload