0

I have a console application which has:

  • target framework ".NET Framework 4",
  • and app.config like this:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      </startup>
    </configuration>
    

If I run it on two different virtual machines with Windows 7 installed I get two different dialogs, both starting with:

.NET Framework Initialization Error
To run this application, you first must install one of the following versions of the .NET Framework: v4.0

But then these dialogs start to differ, the first has only "OK" button and says:

Contact your application publisher for instructions about obtaining the appropriate version of the .NET Framework.

while the second has "YES", "NO" buttons and reads:

Would you like to download and install .NETFramework,Version=v4.0 now?

Why is this different? What to do to unify this behaviour? Is some Windows update needed in order to get the later dialog? Because I would personally expect to see the later dialog on Win7 regardless of any other conditions based on e.g. this SO thread and linked blog post.

EDIT:

I just performed clean installation of Win7 SP1 and after starting .NET v4.0 app I still receive an error on startup that I should "Contact your application publisher for instructions" instead of more suitable one with download redirect...

Community
  • 1
  • 1
Michal Hosala
  • 5,570
  • 1
  • 22
  • 49
  • http://blogs.msdn.com/b/vsnetsetup/archive/2011/05/20/net-framework-initialization-error.aspx – Hans Passant Nov 03 '14 at 10:14
  • @HansPassant I receive the message about contacting the app publisher on clean win7 (SP1) machine without any further update installed and with .NET v3.5 pre-installed by default. So while the blog post is interesting I don't think it is directly related to my situation. – Michal Hosala Nov 03 '14 at 10:26
  • "Is some Windows update needed in order to get the later dialog, which I would personally prefer and expect" - I'm interested in what you will do differently if this is the case since you apparently can't enforce that .NET Framework 4 is installed - why is it somehow easier to ensure that a particular windows update is installed? – Damien_The_Unbeliever Nov 03 '14 at 15:43
  • @Damien_The_Unbeliever sorry I should probably be more clear, I wanted to say that I would prefer and expect to see the later dialog all the time on win7, regardless the conditions, but was wondering whether are there some rperequisities such as particular win update for this version of ".NET Framework Initialization Error" dialog to appear. – Michal Hosala Nov 03 '14 at 15:51

0 Answers0