安装.NET 4.6.1 SDK不会更新MSBuild属性或Visual Studio宏中的DotNetSdk/NETFX文件夹 [英] Installing .NET 4.6.1 SDK does not update DotNetSdk/NETFX folders in MSBuild properties or Visual Studio macros

查看:196
本文介绍了安装.NET 4.6.1 SDK不会更新MSBuild属性或Visual Studio宏中的DotNetSdk/NETFX文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Visual Studio 2015中构建C ++项目,尽管我的项目运行正常,但有一次我考虑过检查我的环境宏.我意识到所有引用NETFXSDK的VC ++目录都是 指向错误的版本.我的系统上安装了.NET 4.6.1,但它们都指向v4.6.

I am building C++ projects in Visual Studio 2015, and at one point I thought about checking out my environment macros, even though my projects are working properly.  I realized that all VC++ directories that refered to the NETFXSDK were pointing to the incorrect version.  I have .NET 4.6.1 installed on my system, but they all point to v4.6.

$(DotNetSdkRoot)= C:\ Program Files(x86)\ Windows Kits \ NETFXSDK \ 4.6

$(DotNetSdkRoot) = C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6

我已经安装了4.6.1.反过来,许多指向此位置子文件夹的宏也是不正确的.

I have 4.6.1 installed.  And in turn many macros pointing to sub-folders from this location are incorrect as well.

$(SDK40ToolsPath)= C:\ Program Files(x86)\ Windows SDKs \ Windows \ v10.0A \ bin \ NETFX 4.6 Tools

$(SDK40ToolsPath) = C:\Program Files (x86)\Windows SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools

同样,我有一个名为"NETFX 4.6.1 Tools"的文件夹

Again, I have a folder named "NETFX 4.6.1 Tools"

每个WindowsSDK_Library或WindowsSDK_Include宏都指向C:\ Program Files(x86)\ Windows Kits \ NETFXSDK \ 4.6下的某个位置,该位置应为4.6.1.

Every WindowsSDK_Library or WindowsSDK_Include macro point to a location under C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6, where it should be 4.6.1.

等等...

我已经设置了< TargetFrameworkVersion>到4.6.1的项目属性中,即使我的项目运行正常,我仍然会根据在宏中看到的内容,在构建它们时使用不正确的包含和库文件.

I have set the <TargetFrameworkVersion> to 4.6.1 in my project properties, and even though my projects work fine, I still feel that the incorrect include and library files are used when I build them, based on what I've seen in the macros.

当我试图找出可能发生的情况时,我注意到在文件系统中,4.6.1版的所有文件夹位置均在4.6版相应文件夹位置之前约2小时安装.因此,我认为好,我必须已安装 类似于SDK 10 AFTER .NET 4.6.1,因此所有设置的最新更新均指向4.6"......所以我继续卸载.NET 4.6.1,重新启动,然后重新安装...

When I tried to find out how that could have happened, I noticed in my file system that all folder locations for 4.6.1 were installed about 2 hours before the corresponding folder locations for version 4.6.  So I thought "Fine, I must have installed something like SDK 10 AFTER .NET 4.6.1 so all the settings were last updated to point to 4.6"...  So I proceeded to uninstall .NET 4.6.1, rebooted, then re-installed...

没有变化! 所有Visual Studio宏仍指向.NET 4.6文件夹. MSBuild的Microsoft.Cpp.Common.props仍设置默认的< FrameworkVersion>是4.6而不是4.6.1.

No change!  All Visual Studio macros are STILL pointing to .NET 4.6 folders.  MSBuild's Microsoft.Cpp.Common.props still sets the default <FrameworkVersion> at 4.6 and not 4.6.1.

我的意思是,可以肯定,手动更改props文件很容易.但是我觉得我不必这样做.我认为这不是鼓励的方法.因此,我是否错过了某些内容,或者.NET 4.6.1 Developer是否存在问题? Pack的安装程序?

I mean, sure, it would be easy to change the props file manually.  But I feel that I shouldn't have to.  I don't think that this has been an encouraged approach.  So, have I missed something, or is there an issue with the .NET 4.6.1 Developer Pack's installer?

推荐答案

嗨lesergeur,

Hi lesergeur,

感谢您在MSDN论坛中发帖.

Thank you for posting in MSDN forum.

>> 我错过了一些东西,还是.NET 4.6.1 Developer Pack的安装程序有问题?

如果您想知道计算机上是否可以正常安装.NET 4.6.1,请 .NET Framework安装验证工具 ,以检查.NET Framework是否正常.
http://blogs.msdn.com/b /astebner/archive/2008/10/13/8999004.aspx

If you are wondering if .NET 4.6.1 is installed ok on your machine,  I suggest you use .NET Framework Setup Verification Tool to check if the .NET Framework is ok. 
http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx

如果您如果发现.NET Framework有问题,则可以使用 Microsoft .NET Framework修复工具进行修复,

If you find there is anything wrong with .NET Framework, you may use Microsoft .NET Framework Repair Tool to do a repair,

此工具检测并尝试修复与Microsoft .NET Framework的安装或Microsoft更新有关的一些经常出现的问题 .NET Framework.

This tool detects and tries to fix some frequently occurring issues with the setup of Microsoft .NET Framework or with updates to the Microsoft .NET Framework.

https://www.microsoft.com/zh-cn/download /details.aspx?id=30135

https://www.microsoft.com/en-us/download/details.aspx?id=30135

 

此外,您可以尝试使用独立安装程序来安装.NET Framework 4.6.1. 链接:

Besides, you could try using a standalone installer to install .NET Framework 4.6.1 You can get the Standalone Installer from following link:

https://support.microsoft.com/en-us/kb/3102436

https://support.microsoft.com/en-us/kb/3102436

最好的问候,


这篇关于安装.NET 4.6.1 SDK不会更新MSBuild属性或Visual Studio宏中的DotNetSdk/NETFX文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆