.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
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>
40 Responses to “.Net Framework Initialization Error – Unable to find a version of the runtime to run this application”
RSS feed for comments on this post. TrackBack URL
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!
Comment by Tino — July 15, 2011 @ 4:15 am
Hey can someone skype with me to help me? i dont know how t ocreate it. thanks, add my skype: nathaniel.marlowe
Comment by nathaniel — August 15, 2011 @ 2:32 pm
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.
Comment by Billy Bob — October 14, 2011 @ 8:20 am
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?
Comment by Mirna — November 1, 2011 @ 8:11 am
In the file I put:
startup
supportedRuntime version=”v4.0.30319″
startup
(but with the lesser than and more than signs)
Comment by Mirna — November 1, 2011 @ 8:15 am
Hmm, are you getting any errors? Please let me know.
Comment by Anuraj P — November 1, 2011 @ 11:02 am
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.
Comment by Mirna — November 1, 2011 @ 1:40 pm
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
Comment by Adrien — November 1, 2011 @ 9:58 pm
Comment by Adrien — November 1, 2011 @ 10:00 pm
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.
Comment by Adrien — November 1, 2011 @ 10:11 pm
It worked thank you so much for your time!
Comment by Mirna — November 2, 2011 @ 4:27 am
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??
Comment by Mirna — November 2, 2011 @ 4:28 am
but my software running .net 2.0 version is it possible pls mail me
Comment by Aro Nelson — November 26, 2011 @ 11:03 pm
Sorry I didn’t get you
Comment by Anuraj P — November 30, 2011 @ 8:02 pm
Hola me aparece ese texto al querer entrar en el virtua tennis 4. no entendi como hacer para solucionarlo. Espero puedas ayudarme. Gracias!!
Comment by Franco — January 7, 2012 @ 9:50 am
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.
Comment by Bob — January 7, 2012 @ 10:14 am
@Bob : Are you getting the same error for NON-.Net application? Strange. Sorry I don’t have answer for that
Comment by Anuraj P — January 7, 2012 @ 8:48 pm
very very very nice…..thanks a lot buddy
Comment by khashayar — January 10, 2012 @ 11:09 am
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.
Comment by Chaim Krause — January 30, 2012 @ 11:04 am
Comment by Anuraj P — January 30, 2012 @ 9:41 pm
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.
Comment by Vitor — February 1, 2012 @ 12:07 pm
@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
Comment by Anuraj P — February 1, 2012 @ 6:56 pm
[...] I got a comment from Vitor, Vitor is getting an exception like this while starting application. The application has failed to [...]
Pingback by 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 — February 1, 2012 @ 8:18 pm
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.
Comment by Mitch — February 2, 2012 @ 1:50 pm
@Mitch: You can do something like this, it may help you
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedruntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
Source : http://stackoverflow.com/questions/7335133/net-framework-unable-to-find-a-version-of-the-runtime-to-run-this-applicatio
Comment by Anuraj P — February 2, 2012 @ 6:22 pm
thnxx buddy for your support………!!!!1
Comment by Pranav — March 3, 2012 @ 4:10 am
thanks bobby…it works perfect,, pretty easy, i’m not coder as well but the instructions were simple to follow
Comment by wally — March 7, 2012 @ 3:38 am
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.
Comment by Suresh — March 8, 2012 @ 10:30 pm
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??
Comment by Suresh — March 8, 2012 @ 10:43 pm
Oh…forgot again…am running Windows XP Professional SP3
Comment by Suresh — March 8, 2012 @ 10:44 pm
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!
Comment by Suresh — March 8, 2012 @ 10:54 pm
Suresh hope you resolved the issue
Comment by Anuraj P — March 9, 2012 @ 1:04 am
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.
Comment by vetrivel — March 17, 2012 @ 12:34 pm
ok, 1 problem!!! you explain what to do but you DID NOT explain how to add that support tag!!! I AM TOTALLY LOST!!!
Comment by moltres_rider — April 2, 2012 @ 2:39 pm
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
Comment by Reshiram_lover — April 2, 2012 @ 2:46 pm
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>
Comment by Anuraj P — April 3, 2012 @ 2:34 am
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>
Comment by Anuraj P — April 3, 2012 @ 2:39 am
You should instal .net Framework V2.0,V4.0 can’t support to run your application
Comment by perfect — April 12, 2012 @ 8:15 pm
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.
Comment by i dont understand — April 29, 2012 @ 3:22 am
Are you getting this error? What you want to resolve?
Comment by Anuraj P — April 29, 2012 @ 6:51 pm