安装VS 2017专业版不会更新VS环境变量 [英] installation of VS 2017 professional does not update the VS environment variables

查看:133
本文介绍了安装VS 2017专业版不会更新VS环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我打算使用VS 2017 professional来在Fluent流程解算器中编译UDF代码。为此,我已经获得了VS2017专业版,让我公司的IT人员将其安装在我的机器上。


显然,我不能在Fluent环境中编译任何代码,尽管产品是按照ANSYS获得的说明中列出的指南安装的。此外,还安装了各种SDK版本和.Net产品。

经过数小时的调查,我们了解到我遗漏了一些非常必要的变量。

当我看到我的Visual Studio命令提示符窗口并键入:set它将列出变量。我遗漏了一些非常必要的变量。我不应该手动添加它们,它们应该自动填充在该窗口中,以便Fluent可以找到
编译器及其所需的SDK


缺少的一些是:


WindowsSdkBinPath = C:\Program Files(x86)\ Windows Wits\\\\


WindowsSdkDir = C:\程序文件(x86)\ Windows Wits\10\


WindowsSDKLibVersion = 10.0.16299.0 \


WindowsSdkVerBinPath = C:\Program文件(x86)\ Windows Wits\10\bin\10.0.16299.0 \


WindowsSDKVersion = 10.0.16299.0 \


WindowsSDK_ExecutablePath_x64 = C:\Program Files(x86)\ Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1工具\ x64 \


WindowsSDK_ExecutablePath_x86 = C:\Program Files(x86)\ MicroSoft SDKs \ Windows \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\公司以及ANSYS coul的客户技术人员d不明白为什么会发生这种情况。

请指教。


谢谢,

Ali Nikparto

解决方案

如果你可以查看批处理文件,那么这就是从哪里开始的。特别是批处理文件winsdk.bat在%ProgramFiles(x86)% \ Mesrosoft Visual Studio \2017 \< Edition> \ Common7 \ Tools \ vsdevcmd \ core deal中查看SDK的
并设置环境变量。


我建议您查看它运行的命令行命令并检查输出并检查它批处理文件的期望。检查头文件和它检查的库文件等其他内容也很有用。


如果您对批处理文件不满意,那么我建议您按照此顺序进行操作。


1)在"设置" - >"应用"或"控制面板" - >"程序和功能"中检查Windows 10 SDK。您提到它后,找到Windows 10 10.0.16299 SDK,更改/修改安装并确保以下内容:



应该检查Windows SDK for Desktop C ++ x86应用程序和amd64应用程序。是的,这是18362 SDK,但这不应该与16299 SDK不同。


2)尝试添加Visual Studio 2017的桌面



如果没有为您添加,那么也许你错过了让命令提示工作的东西。


3)如果失败然后尝试修复安装一切。


但你应该能够看到:



我设置了这些变量。如果我要安装SDK的16299版本,那么我确信这些变量仍然会被设置。


Hi,
I intend to use VS 2017 professional to be able to compile UDF codes in Fluent flow solver. For that purpose, I have acquired VS2017 pro and have had IT people of my company install it on my machine.
Apparently, I cannot compile any codes in Fluent environment although the product was installed according to the guidelines listed in the instructions obtained from ANSYS. Also, various SDK versions and .Net products were installed as well.
After hours of investigation, we learned that I am missing some very necessary variables.
When I look at my Visual Studio Command prompt window and type : set it will list the variables. I am missing some very necessary variables. I should not have to add these manually, they should automatically be populated in that Window so Fluent can find the compiler and the SDK it needs

Some that are missing are:

WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\

WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\

WindowsSDKLibVersion=10.0.16299.0\

WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\

WindowsSDKVersion=10.0.16299.0\

WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\

WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\

The IT people of my company and also the customer technician of ANSYS could not figure out why this is happening.
Please advise.

Thanks,
Ali Nikparto

解决方案

If you are fine with looking through batch files, then that would be where to start. In particular, the batch file winsdk.bat in %ProgramFiles(x86)%\Microsoft Visual Studio\2017\<Edition>\Common7\Tools\vsdevcmd\core deals with looking for the SDK and setting the environment variables.

I would suggest you look at the command line commands it runs and check the output and check it against what the batch file expects. Also other things like checking for the header files and library files that it checks for would also be useful.

If you aren't fine with batch files then I would suggest you follow this order.

1) Check for the Windows 10 SDK in either Settings->Apps or Control Panel->Programs and Features. Since you mention it, find the Windows 10 10.0.16299 SDK, Change/Modify the installation and make sure of the following:

The Windows SDK for Desktop C++ x86 Apps and amd64 Apps at the minimum should be checked. Yes, this is the 18362 SDK, but this shouldn't be that different from the 16299 SDK.

2) Try adding the Visual Studio 2017's Desktop

If this isn't added for you, then maybe you are missing something to get the command prompts working.

3) If this fails then try repair installing everything.

But as you should be able to see:

I have these variables set. If I was to install the 16299 version of the SDK, then I am sure that these variables would still be set.


这篇关于安装VS 2017专业版不会更新VS环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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