none
Compile error when trying to use license.licx from 3rd party for a project using 4.0 runtime while the 3rd party controls are older runtimes. RRS feed

  • General discussion

  • I ran into a compile issue stating Error: "Mixed mode assembly is built against version of runtime v1.1.4322 and cannot be loaded in 4.0 runtime without additional configuration information" for a License.licx file from a 3rd party component included inside my Project I wanted to update to .Net 4.0

    The problem was not in the license.licx file or the assembly, but lc.exe included with Visual Studio 2010 C:\<ProgramFilesFolder>\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\lc.exe

    This is the exe that processes the license.licx file when compiling the project.

    I needed to add support inside a config file in order resolve this error. So I created  a new lc.exe.config inside notepad and added this information then copied it to the same directory as the exe and now my license can be checked appropriately and my project can now use the .Net 4.0 Framework.

    lc.exe.config

    <?xml version ="1.0"?>

    <configuration>

        <runtime>

            <generatePublisherEvidence enabled="false"/>

        </runtime>

          <startup useLegacyV2RuntimeActivationPolicy="true">

                <supportedRuntime version="v4.0"/>

          </startup>

    </configuration>

    Good luck if you run into the same issue.

    Heath Morris


    Wednesday, May 12, 2010 5:07 PM

All replies

  • Hi,

    We have one more think,

    We can resolve this error by clear the content of license.licx

    -> Open license.licx using notepad

    -> Delete the content and save the file

    With Regards,

    DP

    Thursday, May 13, 2010 12:11 PM
  • Thank you!  This fixed the problem for me too.

    The library and license I was building against was for Framework 1.0.

    Sunday, June 20, 2010 5:31 PM
  • Same problem here, and this fixed it. Many thanks.
    Thursday, November 18, 2010 5:38 PM
  • I know this is a late reply, but I am glad this helped you
    Friday, June 3, 2011 4:47 PM
  • Glad it helped, I know it was frustrating when I came across this.
    Friday, June 3, 2011 4:47 PM
  • This only works if you don't care about licensing the 3rd party libraries. The point is that we need to license these 3rd party components inside our application.

    Heath L. Morris

    Thursday, March 6, 2014 10:09 PM
  • This solved the problem - I am very grateful for this information.

    The error occurred ("Mixed mode assembly built against version v2.0.50727...") when I upgraded the application from VS 2008 with Framework 3.5 to VS 2010 with Framework 4.0.  

    I spent a long time trying to modify the startup section of the app.config file without success. 

    Adding your config file for the LC.exe did the trick.  Excluding licenses.licx from the project also fixed the error, but wasn't practical - we need the licenses!

    Thank you!

    Saturday, August 17, 2019 5:47 AM