none
Installing .NET 4.6.1 SDK does not update DotNetSdk/NETFX folders in MSBuild properties or Visual Studio macros RRS feed

  • Question

  • 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

    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

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

    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.

    Etc...

    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.

    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...

    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.

    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?

    Friday, March 18, 2016 10:39 PM

All replies

  • Hi lesergeur,

    Thank you for posting in MSDN forum.

    >> have I missed something, or is there an issue with the .NET 4.6.1 Developer Pack's installer?

    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

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

    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/en-us/download/details.aspx?id=30135

     

    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

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Monday, March 21, 2016 2:48 AM
    Moderator
  • Hello Lana,

    I definitely have been using the stand-alone .NET installer from the very beginning.  File : NDP461-DevPack-KB3105179-ENU.exe

    I had already uninstalled and re-installed this .NET 4.6.1 SDK exe, so I doubted that the .NET repair tool was going to accomplish much.  It collected a whole bunch of logs to report to Microsoft (I can't attach the .cab here, however).

    .Net setup verification tool...  First, I must point out that the link you included is not responding, as seems to be the case with the entire backlog of Aaron Stebner's blog.  So, I had to find the tool from another website.  Once I ran the tool, I was able to scan .NET v4.6.1 and it found no issue.  From what I can see from the log file, it verifies only the integrity of the files and registry entries for the core .NET Framework.  It does not look into SDK components at all, and I get the feeling that it might be the same for the .NET repair tool.

    Monday, March 21, 2016 7:38 PM
  • Further demonstrations that make me believe that something is not right with the installation are found in the registry.  My system is a 32-bit Windows 7.

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0\14.0]
    "VCTargetsPath"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V140\\'))"
    "VCTargetsPath10"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath10)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\'))"
    "VCTargetsPath11"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath11)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V110\\'))"
    "VCTargetsPath12"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath12)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V120\\'))"
    "VCTargetsPath14"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath14)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V140\\'))"
    "FrameworkSDKRoot"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\NETFXSDK\\4.6@InstallationFolder)"
    "SDK35ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0A\\WinSDK-NetFx35Tools-x86@InstallationFolder)"
    "SDK40ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\NETFXSDK\\4.6\\WinSDK-NetFx40Tools-x86@InstallationFolder)"
    "WindowsSDK80Path"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1@InstallationFolder)"

    Most everything looks fine from the above key (although I have WindowsSDK10 installed and would have, perhaps, expected that version here and not version 8).  For the 2 highlighted values, however, I do not get why they were not updated to point to version 4.6.1 when I installed that version, which I do have now:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6]
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\"
    "ProductVersion"="4.6.00081"
    "ProductName"="Microsoft .NET Framework 4.6 SDK"
    "KitsInstallationFolder"="C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools]
    "ProductVersion"="4.6.00081"
    "ComponentName"="Microsoft .NET Framework 4.6 SDK"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6 Tools\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools-x64]
    "ProductVersion"="4.6.00081"
    "ComponentName"="Microsoft .NET Framework 4.6 SDK"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6 Tools\\x64\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools-x86]
    "ProductVersion"="4.6.00081"
    "ComponentName"="Microsoft .NET Framework 4.6 SDK"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6 Tools\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1]
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\"
    "ProductVersion"="4.6.01055"
    "ProductName"="Microsoft .NET Framework 4.6.1 SDK"
    "KitsInstallationFolder"="C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools]
    "ProductVersion"="4.6.01055"
    "ComponentName"="Microsoft .NET Framework 4.6.1 SDK"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.1 Tools\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools-x64]
    "ProductVersion"="4.6.01055"
    "ComponentName"="Microsoft .NET Framework 4.6.1 SDK"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.1 Tools\\x64\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools-x86]
    "ProductVersion"="4.6.01055"
    "ComponentName"="Microsoft .NET Framework 4.6.1 SDK"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.1 Tools\\"

    And I am further perplexed by the 32-bit settings for MSBuild which point to some 64-bit registry entries:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\14.0\14.0]
    "VCTargetsPath"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V140\\'))"
    "VCTargetsPath10"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath10)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\'))"
    "VCTargetsPath11"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath11)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V110\\'))"
    "VCTargetsPath12"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath12)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V120\\'))"
    "VCTargetsPath14"="$([MSBuild]::ValueOrDefault('$(VCTargetsPath14)','$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\V140\\'))"
    "FrameworkSDKRoot"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\NETFXSDK\\4.6@InstallationFolder)"
    "SDK35ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0A\\WinSDK-NetFx35Tools-x86@InstallationFolder)"
    "SDK40ToolsPath"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\NETFXSDK\\4.6\\WinSDK-NetFx40Tools-x86@InstallationFolder)"
    "WindowsSDK80Path"="$(Registry:HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1@InstallationFolder)"

    Thing is... the NETFXSDK key does not exist at that location!

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows]
    "CurrentVersion"="v8.0A"
    "CurrentInstallFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.0A\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A]
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.1A\\"
    "ProductVersion"="7.1.51106"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A\XPSupport]
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.1A\\"
    "ProductVersion"="7.1.51106"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools]
    "ProductVersion"="8.0.50727"
    "ComponentName"="Windows SDK Multi-targeting Utilities for .NET Framework 3.5"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x64]
    "ProductVersion"="8.0.50727"
    "ComponentName"="Windows SDK Multi-targeting Utilities for .NET Framework 3.5 (x64)"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin\\x64\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x86]
    "ProductVersion"="8.0.50727"
    "ComponentName"="Windows SDK Multi-targeting Utilities for .NET Framework 3.5"
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin\\"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1A]
    "InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1A\\"
    "ProductVersion"="8.1.51636"
    "ProductName"="Microsoft .NET Framework 4.5.1 SDK"

    So, I don't know...  All these keys, and the Visual Studio macros, are updated by the .NET 4.6 installer, but when the 4.6.1 installer is run, these don't seem to matter anymore.  Are these registry keys and VS macros irrelevant between 4.6 and 4.6.1, or is the .NET 4.6.1 dev package really doing a sloppy installation?

    Monday, March 21, 2016 10:53 PM
  • Hi lesergeur,

    If you think the cause is pending on the messing registry key, you could SubInACL tool to repair file and registry permissions.

    Please refer to:
    http://blogs.msdn.com/b/astebner/archive/2006/09/04/739820.aspx

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.

    Tuesday, March 22, 2016 5:18 AM
    Moderator
  • Can someone confim what happens when THEY install the .NET 4.6.1 Developer package?  Are their Visual Studio macros and registry keys updated (the ones I mentionned above)?

    My starting point was a Windows 7 system setup with a Visual Studio 2015 installed just before .NET 4.6.1 Developer pack (I was running Visual Studio 2012 before that).  I then installed Windows Kits 10.0.10586.  I thought that maybe the Windows Kits installation changed the settings that seem to me to be incorrect, so I uninstalled .NET 4.6.1 and re-installed it hoping it would supercede potential Windows Kits 10 changes.  This did not do anything and all my VS macros and registry keys remained what I outlined in previous posts.

    Not that I consider myself a .NET expert, far from it, but all these references to .NET 4.6 while I can see equivalent locations on my system for .NET 4.6.1 make me wonder about the installation process.  If my user rights were fine to update these macros and keys to 4.6, then why would they be insufficient to make it 4.6.1?

    Thursday, March 24, 2016 9:01 PM
  • Hi lesergeur,

    Sorry for my delay reply.

    For this question, the update of .NET Framework 4.6.1 change some DLLs version, but the .NET Framework file and URL are the same as .NET Framework 4.6.

    Although you have set the <TargetFrameworkVersion> to 4.6.1, when loading some DLLs, it still point to .NET Framework 4.6.

    In addition, This forum is discuss about .NET Framework Setup and Servicing, if you still have question about DLL verison, please direct to .NET Framework Common Language Runtime Internals and Architecture  forum for dedicated support.

    Thank you for your understanding

    Best Regards,




    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click HERE to participate the survey.


    Monday, March 28, 2016 8:46 AM
    Moderator
  • I apologize if I am wrong about this, BUT......

    After I install .NET 4.6.1 DEV package:

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

    and not C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1

    Those folders contain the .NET SDK files.  That Visual Studio macro means that projects built will include the header files and link to the lib files from .NET 4.6, even though I installed 4.6.1.

    This is NOT an installation issue?  How come?

    Tuesday, April 12, 2016 11:30 PM