{"id":18352,"date":"2015-07-14T08:48:27","date_gmt":"2015-07-14T08:48:27","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/dotnet\/?page_id=4521"},"modified":"2018-09-07T13:14:13","modified_gmt":"2018-09-07T20:14:13","slug":"targetingdotnet-2","status":"publish","type":"page","link":"https:\/\/devblogs.microsoft.com\/dotnet\/p\/targetingdotnet-2\/","title":{"rendered":"Targeting .NET Framework Versions"},"content":{"rendered":"<p>\ufeff\n    var _daAnalytics = _daAnalytics || {}; _daAnalytics.init = function (d) {_daAnalytics.Commands = _daAnalytics.Commands || []; for (var a = function (a) { return function () { _daAnalytics.Commands.push([a].concat(Array.prototype.slice.call(arguments, 0))) } }, b = &#8220;siteId trackLinkClicks setUserId setProperty setView trackPage trackAction trackEvent trackView setAppId setAccountId setUserId&#8221;.split(&#8221; &#8220;), c = 0; c &lt; b.length; c++) _daAnalytics[b[c]] = a(b[c]); _daAnalytics.setAppId(d); var a = document.createElement(&quot;script&quot;); a.type = &quot;text\/javascript&quot;; a.src = &quot;\/\/az416426.vo.msecnd.net\/scripts\/da.js&quot;; a.async = !0; var b = document.getElementsByTagName(&quot;script&quot;)[0]; b.parentNode.insertBefore(a, b); };<\/p>\n<p>        _daAnalytics.init(&quot;23bf885d-8b68-4e8f-97d8-a55ead01f2af&quot;);\n        _daAnalytics.trackPage();<\/p>\n<p>  var _gaq = _gaq || [];\n  _gaq.push([&#8216;_setAccount&#8217;, &#8216;UA-38776283-1&#8217;]);\n  _gaq.push([&#8216;_trackPageview&#8217;]);<\/p>\n<p>  (function() {\n    var ga = document.createElement(&#8216;script&#8217;); ga.type = &#8216;text\/javascript&#8217;; ga.async = true;\n    ga.src = (&#8216;https:&#8217; == document.location.protocol ? &#8216;https:\/\/ssl&#8217; : &#8216;http:\/\/www&#8217;) + &#8216;.google-analytics.com\/ga.js&#8217;;\n    var s = document.getElementsByTagName(&#8216;script&#8217;)[0]; s.parentNode.insertBefore(ga, s);\n  })();<\/p>\n<p>document.title = &#8220;Targeting .NET Framework Versions&#8221;;<\/p>\n<div style=\"font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif;font-size:30px;vertical-align:middle\">\n    <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\">\n    <img decoding=\"async\" src=\"\" style=\"vertical-align:middle\" \/><\/a>Targeting .NET Framework Versions\n    <\/div>\n<p>Every .NET app targets a particular .NET version. This is either the target version of the app project, which is automatically recorded with the app, or a version that is manually updated later. When an app is launched, the .NET runtime checks to see if this version is installed on a given machine before running an app. If that version is not installed, you will see an error message similar to the one shown in the image below.<\/p>\n<p><img decoding=\"async\" title=\"clip_image001\" style=\"border: 0px currentcolor;margin-right: auto;margin-left: auto;float: none\" border=\"0\" alt=\"clip_image001\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2015\/07\/0488.shim_dialog-1.png\" width=\"415\" height=\"196\" \/><\/p>\n<p>It is important that the correct version of the .NET Framework is installed prior to running an app, or else an app will not run correctly.<\/p>\n<p>You should validate that the correct version is installed. You can look at the <a href=\"http:\/\/msdn.microsoft.com\/vstudio\/gg189183\">Installing a .NET Framework Version Required by an Application<\/a> page to fine the .NET Framework version you need. You can also look at the <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=229561\">.NET SDKs and Targeting Packs<\/a> page to find the runtime version you need.<\/p>\n<p>You may also want to troubleshoot why you are seeing this error. The .NET team has provided the following resources to help you:<\/p>\n<ul>\n<li><a href=\"http:\/\/msdn.microsoft.com\/library\/jj157063(v=vs.110).aspx\">.NET Framework Initialization Errors: Managing the User Experience<\/a><\/li>\n<li><a href=\"http:\/\/msdn.microsoft.com\/library\/jj152929(v=vs.110).aspx\">How to: Debug CLR Activation Issues<\/a><\/li>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2013\/06\/27\/get-the-latest-net-bits\/\">.Get the latest .NET bits<\/a><\/li>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/p\/dotnet45xp\/\">.NET Framework 4.5 and Windows XP<\/a><\/li>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/p\/dotnet4xp\/\">Installing the .NET Framework 4 on Windows XP<\/a><\/li>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\">.NET Team Blog<\/a><\/li>\n<\/ul>\n<p>You can <a href=\"mailto:dotnethelp@microsoft.com?subject=Having trouble targeting .NET\">contact Microsoft<\/a> for help if you cannot correctly target the .NET Framework.<\/p>\n<p>This information has been provided by the <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\">.NET team<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ufeff var _daAnalytics = _daAnalytics || {}; _daAnalytics.init = function (d) {_daAnalytics.Commands = _daAnalytics.Commands || []; for (var a = function (a) { return function () { _daAnalytics.Commands.push([a].concat(Array.prototype.slice.call(arguments, 0))) } }, b = &#8220;siteId trackLinkClicks setUserId setProperty setView trackPage trackAction trackEvent trackView setAppId setAccountId setUserId&#8221;.split(&#8221; &#8220;), c = 0; c &lt; b.length; c++) _daAnalytics[b[c]] = [&hellip;]<\/p>\n","protected":false},"author":344,"featured_media":58792,"parent":4241,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-18352","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/pages\/18352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/344"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=18352"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/pages\/18352\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/pages\/4241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=18352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}