سؤال

I am having issues lowering the version of my .NET framework to work on machines with .NET 4.0. I tried the answer listed on How to lower the requirements for a WPF app Visual Studio Installer? and that didn't seem to work. I then tried the solution listed at Lowering Dependancy Version of Compile (VB.NET) but I do not have a "Compile" tab like they are indicating.

We developed the WPF using .NET 4.5, however, the client machines have .NET 4.0 and cannot be upgraded at this time. So I am trying to lower it. Following the first link listed above, even when I run the installer it asks me to install .NET 4.5.

All help is greatly appreciated!

** Edit **

The following code is located in the WPF.exe.config.delopy file but it still asks me to upgrade to .NET 4.5 when using oneclick.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0 sku=".NETFramework,Version=v4.0,Profile=Client"/>
    </startup>
</configuration>
هل كانت مفيدة؟

المحلول

I was able to figure out the issue. On the Properties tab click on "Publish" on the left hand side. When the menu pops up, select Prerequesites from the the "Install Mode and Settings" portion. This is where you select the Framework version that the program checks for.

نصائح أخرى

In the Application tab in Project Properties, change the Target Version.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top