.Net Framework Initialization Error – Unable to find a version of the runtime to run this application

I got this error yesterday while running FxCop application from Microsoft. I think the problem was because of the .Net framework installed on my machine, I have only .Net 4.0 installed and no other versions of .Net. And I think FxCop was expecting .Net 2.0 in the system.

.Net Framework Initialization Error – Unable to find a version of the runtime to run this application

.Net Framework Initialization Error – Unable to find a version of the runtime to run this application

After few searches I found the resolution for this issue. You can add supportedRuntime tag to the application config (It will be like ApplicationName.exe.config in the same folder where application installed.) file, under startup tag, and set the attribute of the supportedRuntime as the version of the .Net Framework installed in the system.

<startup>
  <supportedRuntime version="v4.0.30319" />
</startup>
  • Tino

    Hello. I happen to stumble upon your website to search a solution for the same problem. However i am not a coder. Still your post has saved me a lot of time to get my applications fixed and up n running again. Thx!

  • nathaniel

    Hey can someone skype with me to help me? i dont know how t ocreate it. thanks, add my skype: nathaniel.marlowe

  • Billy Bob

    Thank you very much!

    Nathaniel:

    To fix this issue, say you have a Application named “BillyBob.exe”, just create a text file called “BillyBob.exe.config” and inside that put this info:

    Save “BillyBob.exe.config” in the same directory as “BillyBob.exe” and it should work. You can test it by giving it an invalid number, such as “v7.0.30319″ and it should come up with a warning message that you do not have V7 installed, would you like to download it.

    • wally

      thanks bobby…it works perfect,, pretty easy, i’m not coder as well but the instructions were simple to follow

  • Mirna

    Hey, I’m having the same problem with the program YouTubeDownloader and I have the .net framework v4.0.30319. I tried doing what you said by making a text file in the youtubedownloader folder entitled YouTubeDownloader.exe.config and in the file I put:

    Then I try reopening YouTubeDownloader.exe but it still doesn’t work. What am I doing wrong?

  • Mirna

    In the file I put:
    startup
    supportedRuntime version=”v4.0.30319″
    startup
    (but with the lesser than and more than signs)

    • http://www.dotnetthoughts.net/ Anuraj P

      Hmm, are you getting any errors? Please let me know.

      • Aro Nelson

        but my software running .net 2.0 version is it possible pls mail me

        • http://www.dotnetthoughts.net/ Anuraj P

          Sorry I didn’t get you :(

  • Mirna

    Yea I get the error like the image you have above except for YouTubeDownloader:

    Unable to find a version of the runtime to run this application.

  • Adrien

    Try including the above code in the “configuration” element as below:

    Also, beginning with the .NET Framework version 4, only the major and minor version numbers are required (that is, “v4.0″ instead of “v4.0.30319″). The shorter string is recommended.

    More details: http://msdn.microsoft.com/en-us/library/w4atty68.aspx

    • Adrien

  • Adrien

    The code i’m typing doesn’t seem to appear on this forum, even with the code markups, anyway, try adding the ‘configuration’ tag like this:

    -configuration-
    -startup-
    -supportedRuntime version=”v4.0″ /-
    -/startup-
    -/configuration-

    and replace the – signs with “less than” and “greater than” signs.

    Also, make sure the extension of the configuration file you created is .config and not .config.txt ! :-) in order to check that, make the file extensions visible. (to do that: In the window where the file is located, in the top menu, got to Tools-Folder options-View tab and UNcheck “Hide extensions for known file types”). Then, if the file extension is .config.txt, just remove the .txt part of it by renaming the file.

    • Ravenwolf Foxtrack

      This worked like a charm. thank you for the help there, as this has been bothering me for months now.

    • w.izzy

      Thank you very much

      you rule indeed

    • Aikie

      Sir I had this same problem and followed instructions carefully, I still have the same error occur as I run the application. Please advise. I tried reinstalling and stuff.

      here was the code I had inserted on text file.
      And app name is Game. please advise.

      • http://www.dotnetthoughts.net Anuraj P

        Which version of .Net Framework you are installed on the system?

  • Mirna

    It worked thank you so much for your time!

  • Mirna

    Unfortunately, I still have a YouTube problem where I keep getting the error:
    An error occurred, please try again later.

    I have researched for solutions and tried everything, and I have adobe flash player 11 but my problem wasn’t solved so I tried downloading the YouTubeDownloader so that I could download the videos instead, but it didn’t work. Any ideas??

  • Franco

    Hola me aparece ese texto al querer entrar en el virtua tennis 4. no entendi como hacer para solucionarlo. Espero puedas ayudarme. Gracias!!

  • Bob

    Hello. I am trying to hook into the _corexemain function from a application that was already running. Your config file example works when you are trying to startup a .exe file written in .NET but how about if you are executing a .NET operation out of an application not written in .NET??? Is there a different config setup for this? Or is something entirely different needed? Thanks.

    • http://www.dotnetthoughts.net/ Anuraj P

      @Bob : Are you getting the same error for NON-.Net application? Strange. Sorry I don’t have answer for that :(

  • khashayar

    very very very nice…..thanks a lot buddy

  • http://chaim.com/blog Chaim Krause

    Thank you for posting this to your blog. It helped me fix a problem that had already wasted over a half hour of my time.

    • https://profiles.google.com/anuraj.p Anuraj P

      :) Welcome. Keep visiting dotnetthoughts

  • Vitor

    I’ve done what Billy Bob said to do, and after that occurred to appear this error:

    C:\UDK\UDK-2012-01\Binaries\UDKLift.exe

    The application has failed to start because its side-by-side configuration is incorrect. Please
    see the application event log or use the command-line sxstrace.exe tool for more detail.

    • https://profiles.google.com/anuraj.p Anuraj P

      @Vitor: Please make sure your exe.config is a valid XML (not missing any tags). I wrote a blog post related to this

      http://www.dotnetthoughts.net/?p=2332

  • Pingback: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail | dotnet thoughts

  • Mitch

    I got another problem: ArcaneMS.exe – .NET Framework Initialization Error “Unable to find a version of the runtime to this application” can someone help me? I’m on a Windows XP SP2.

  • Pranav

    thnxx buddy for your support………!!!!1 :)

  • Suresh

    I’m running in to the same problem and am unable to solve it by going through the steps above. I have downloaded this file from the MS website: dotNetx40_Full_x86_x64 Iam assuming that this is a .exe file and this is located in a folder called Softwares on my D drive. What I did was opened Notepad and copied this code on to it:

    Then I went ahead to save it, deleted the .txt extension that comes automatically and saved the file as “dotNetx40_Full_x86_x64.exe.config” (without the quotes) and put it in the Softwares folder of my D drive where the downloaded file is located.
    But am still running in to the same error. What am I doing wrong here?
    The “dotNetx40_Full_x86_x64.exe.config” (without the quotes, that is) appears a Text Document when I click on it’s Properties and it says the document opens with Notepad.
    Am I doing something wrong with the saving of the file?
    I also checked in C:\WINDOWS\Microsoft.NET\Framework\ and there is a folder named v4.0.30319 there. So there is no doubt about the version installed.
    Pl help me.

    • Suresh

      Something is missing from my post above. What I put in the Notepad was:
      -configuration-
      -startup-
      -supportedRuntime version=”v4.0″ /-
      -/startup-
      -/configuration-

      I did replace the hyphens with lesser than & greater than symbols.

      I did realize that I had made a mistake saving the file as Adrien had mentioned above. So, I did as he has suggested and now the file “dotNetx40_Full_x86_x64.exe.config” (without the quotes) shows as a CONFIG file and is located in the Softwares directory of my D drive.

      Still, I keep running in to the same error. What could I be doing wrong??

      • Suresh

        Oh…forgot again…am running Windows XP Professional SP3

  • http://WMU3 Suresh

    OK…I could not get any dumber than this even if I tried very hard…I got it.
    I created another config file with the name of the application this time and got it to work.
    Thanks to the author of this post and all other people who have posted replies here for your help- it was my dumbness that prevented me from understanding it the first time.
    Sorry for the posts- I have a hole where my head should be :-)
    Cheers!

    • https://profiles.google.com/anuraj.p Anuraj P

      Suresh hope you resolved the issue :)

  • vetrivel

    if this only for installed programs, if some programs (ex: Sharecashdownload.exe) those are without installing it can run. But those errors are showing. How we can solve. Plz any one can solve this problem.

  • moltres_rider

    ok, 1 problem!!! you explain what to do but you DID NOT explain how to add that support tag!!! I AM TOTALLY LOST!!!

    • https://profiles.google.com/anuraj.p Anuraj P

      Which support tag? I didn’t get you. The modification required is like this

      <?xml version=”1.0″?>
      <configuration>
      <startup>
      <supportedruntime version=”v4.0″/>
      </startup>
      </configuration>

  • Reshiram_lover

    I copied the code into notepad but it didn’t work! now I get this error!
    “the application failed to start because the application configuration is incorrect”

    what am I doing wrong

    • https://profiles.google.com/anuraj.p Anuraj P

      It should be like this. And make sure it a valid XML file.

      <?xml version=”1.0″?>
      <configuration>
      <startup>
      <supportedruntime version=”v4.0″/>
      </startup>
      </configuration>

  • perfect

    You should instal .net Framework V2.0,V4.0 can’t support to run your application

  • http://facebook.com i dont understand

    i cant understand some1 explain in specific form pls and pls write the steps not just say aplications pls :[ im 10 and i cant understand it rly.

    • https://profiles.google.com/anuraj.p Anuraj P

      Are you getting this error? What you want to resolve?

  • Ken

    Sir Anuraj P help please..

    I want to play Minecraft but trying to open it, says
    “Unable to find a version of the runtime to run this application”

    Trying to look for the “Minecraft.exe.config” theres no file like that in Minecraft folder..

    please help..

  • Ken

    ok i manage to make the config file and has this lines:

    now my problem is this:

    This application has failed to start because the application configuration is incorrect.

  • http://iwanttvseries.blogspot.com addicttv

    thanks so much! it’s working now!

  • Warren Peters

    “To fix this issue, say you have a Application named “BillyBob.exe”, just create a text file called “BillyBob.exe.config” and inside that put this info:

    Save “BillyBob.exe.config” in the same directory as “BillyBob.exe” and it should work.”

    What info? Those two lines are blank here.

    Warren

  • stanislava

    Thank you very much! It’s working perfect!

  • http://www.google.com/ Sankalp Anand

    Hi All,
    I got stuck in the same problem.
    Even after installing Dot Net framework 4.0 and adding section, my application – “Vai Vocabulary” failed to start. Now it gave this familiar error message – ViaVocabulary has encountered a problem and needs to close. We are sorry for the inconvenience.
    1. Send Error Report
    2. Don’t send.

    Please help me out.

    • http://www.dotnetthoughts.net Anuraj P

      @Sankalp Anand: Please make sure your config file (.config) is in valid XML. Also please check the Application event log, what is causing the problem.

  • http://www.xfb.com aLexzu

    Hi.I have a problem like this too.My OS is Windows XP SP2 updated on SP3…I have installed on my PC Microsoft NET Framework v4.0.30319 and I try to open a Metin2 Patcher but I cannot.It give me this:
    “Metin2.exe – .NET Framework Initialization Error”
    “Unable to find a version of the runtime to run this application.”

    If i install NET Framework v3.5 and keep v4.0.30319 also,it shows to me this: “Metin2.exe has encountered a problem and needs to close.We are sorry for the inconvenience”
    HELP me please!thank you!

    • http://www.dotnetthoughts.net Anuraj P

      @aLexzu Which version of .net framework this application requires? If it is .Net 3.5, it should not create any problem. Try modify your app.config file as per the post. Hope it helps.

  • http://wwww.massiosare.net NSM

    Thanks a lot! I was having trouble here in México, Feb 2013, trying to make work the Determinacion_IMSS_2013.exe

    That application is mandatory for all bussiness here in México, it must be used to show IMSS the “Prima de Riesgo”… this very month …

    First, computer only had Service Pack 2, and in order to make work the Framework 4.0 you need to have installed Service Pack 3… checked

    Still not working. Installing and desinstalling FrameWork… same error:
    ” Net Framework Initialization Error – Unable to find a version of
    the runtime to run this application ”

    I googled and got to this site, with notepad, I created a file with the same name that the application:

    Determinacion_IMSS_2013.exe.config
    with this content:

    And finally the application is working :)

    Note, the .NetFramework that I installed is dotNetFx40_Full_x86_x64.exe
    the version of the file is 4.0.30319.1
    but in the file I just put
    and that works.

    Thansk again!