none
Common Language Runtime or Microsoft .NET Framework Could Not Be Loaded

    Question

  • Hello everybody!

    I've developed a Client-server solution on Visual Studio team suite 2008, on C# language. A component of the applicattion works with ".xltx" file. When i try to open this ".xltx" file on a pc with Windows XP and office 2007 (i'll call this PC "PC-Test") got the error described before.

    I have found this link
    http://msdn.microsoft.com/en-us/library/6s0wczt9(VS.80).aspx

    but, it doesn't help me because "PC-Test" have .Net Framework 3.5 SP1 installed, and my PC (where i developed the solution) too!

    Any help or clue?

    Thanks

    Friday, May 29, 2009 9:42 PM

Answers

All replies

  • I don't see the error message you mention in the article to which you link. The closest thing I see in the article is about the customization assembly not loading. But the message you quote in the subject has to do with the CLR and the .NET Framework?

    Please provide the exact wording of the error message you're seeing.

    Also, is this xltx a VSTO customization or is it just a "plain" Excel file?
    Cindy Meister, VSTO/Word MVP
    Tuesday, June 02, 2009 9:11 AM
  • Hello Cindy!

    Answering your questions, the error message i have is exactly as mentioned on the link that i've posted: "Common Language Runtime or Microsoft .NET Framework Could Not Be Loaded" it's the first item on the article. Here is the content:

    Common Language Runtime or Microsoft .NET Framework Could Not Be Loaded

    This problem causes the following error message to be displayed:

    The common language runtime could not be loaded by <application>. Contact your administrator for further assistance.

    The version of the Microsoft .NET Framework on the end user's computer must be the same as or later than the version on the computer that was used to develop the solution. For more information about installing the .NET Framework and the common language runtime, see the Microsoft .NET Framework downloads page (http://msdn.microsoft.com/netframework/downloads/).

    As you can see, this article say: "The version of the Microsoft .NET Framework on the end user's computer must be the same as or later than the version on the computer that was used to develop the solution" but the solution is not working for me because the PC where i developed the solution, has the same version that "PC test" and i don't know why this error is happening.

    And yes, this is a .xltx VSTO customization, is a customized report.

    Thanks for your help
    Tuesday, June 02, 2009 3:59 PM
  • Is there any chance that there's another VSTO solution already running on this one machine, that uses a different version of the .NET Framework? And Office application can only load one version of the CLR at a time, so if a different one has already been loaded (for an Add-in, for example) the error message could be showing up due to that, I suppose. This is covered in the other error message (about the customizatino assembly not being able to laod), but it can't hurt to check.

    BTW, since you're working with VSTO 2008 and Office 2007 you should be using this page; the one you link to is for an older version.

    Are you seeing this problem only when that other application tries to open the document, or also if you try to open it as an end-user, directly?


    Cindy Meister, VSTO/Word MVP
    Wednesday, June 03, 2009 10:29 AM
  • There has been a couple of occasions where I have seen applications hard code the Runtime to run .NET 1.1 or .NET 1.0 based on the application, this is done with a .CONFIG file for the application you are running. If you look for excel.exe.config in the same directory as where Excel.exe is on your machine you may have something like this in it

    <?xml version ="1.0"?>
    <configuration>
      <startup>
        <supportedRuntime version="v1.1.4322" />
      </startup>
    </configuration>


    This will specify that Excel hosts the older .NET Runtime and may give your error.

    Regards
    Mike Walker MVP - Visual Developer VSTO - Please mark the best replies as Answers !
    Wednesday, June 03, 2009 12:02 PM

  • I have found the solution for this issue.

    I have to install on the "PC Test" this component and everything went good! :)

     

    http://www.microsoft.com/downloads/details.aspx?FamilyID=54eb3a5a-0e52-40f9-a2d1-eecd7a092dcb&DisplayLang=en


    Thanks everybody for your answers!

    Friday, June 05, 2009 11:45 PM