简体   繁体   English

.NET Framework-降低版本

[英].NET Framework - Lower the version

I am having issues lowering the version of my .NET framework to work on machines with .NET 4.0. 我在降低.NET Framework版本以在具有.NET 4.0的计算机上工作时遇到问题。 I tried the answer listed on How to lower the requirements for a WPF app Visual Studio Installer? 我尝试了如何降低WPF应用程序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. 然后,我尝试了降低依赖版本的编译(VB.NET)中列出的解决方案,但没有像它们所指示的那样具有“编译”选项卡。

We developed the WPF using .NET 4.5, however, the client machines have .NET 4.0 and cannot be upgraded at this time. 我们使用.NET 4.5开发了WPF,但是客户端计算机具有.NET 4.0,并且目前无法升级。 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. 遵循上面列出的第一个链接,即使当我运行安装程序时,它也会要求我安装.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. 以下代码位于WPF.exe.config.delopy文件中,但在使用oneclick时,仍然要求我升级到.NET 4.5。

<?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. 在这里可以选择程序要检查的Framework版本。

在项目属性的“应用程序”选项卡中,更改目标版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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