0
votes

I have a clickonce application being tested on a virtual machine. This virtual machine is empty and my application requires .Net Framework 4.6.1 on the machine. Now, my application is able to install .Net 4.6.1 but I'm having a weird behavior after install. I'm receiving this message when the application is being open after the installation of .Net 4.6.1.

I added 4.6.1 on my prerequisite by following this guide. How to Create .Net Framework Prerequisites Entry in Microsoft Visual Studio 2015

enter image description here

Here's the message

enter image description here

When I try to run the setup again, the setup process goes through then it launches my application. It seems the setup cannot detect the framework installed right after it install it. Or something went wrong somewhere during the installation. Is there a way to handle this? Any suggestion will be appreciated. Thanks!

1

1 Answers

1
votes

The error message says that your application requires CLR 4.0.xxxx. If you specify .NET 4.0 as requirement too ? Maybe you are trying to execute something developped with .NET 4.0 anyway. This could help you :

Backward compatibility and the .NET Framework 4.5 :

The .NET Framework 4.5 and its point releases are backward-compatible with apps that were built with earlier versions of the .NET Framework.In other words, apps and components built with previous versions will work without modification on the .NET Framework 4.5.However, by default, apps run on the version of the common language runtime for which they were developed, so you may have to provide a configuration file to enable your app to run on the .NET Framework 4.5.For more information, see the Version compatibility for apps section earlier in this article.

source