简体   繁体   中英

Visual Studio target framework not changing to 4.0

I am writing a Windows Forms program which doesn't use any new tech from .net framework 4.5-4.7, but unfortunately I started the project with .net Framework set to 4.6.2. (Because in the beginning the company told me they only want to use it on win 7/8.1/10, later they changed their mind) I know Windows XP is obsolete, but I have to run this program on a XP machine as well.

I already tried to set the targeting framework to .NET 4.0, but when I try on the XP machine with a .msi installer, it throws an error, that I cannot run a .net 4.6.2 dependent program, even before it starts the install process.

Can I “convert” the whole project to .net 4.0, or I have to copy all buttons, textboxes, couple thousands lines of code, etc. to a new project which only uses .net 4.0? I'm using Visual Studio 2017.

Looking at the log you shared I can see DIRCA_CheckFX so I'm guessing the setup project is a vdproj which has been deprecated in favour of a framework like WiX .

The CheckFX step is a launch condition which you should be able to delete/manipulate, by opening the project and finding the launch conditions:

View -> Editor -> Launch conditions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM