之前安装Unity的时候一块安装了Visual Studio Community2015,一直没用过,上次需要用C++编写程序,才发现VS2015为了推C#,默认是不安装VC++的,只好进入New Project->Visual C++里面安装,安装方式如下:
结果update界面的界面在configuring feed后出现Setup Blocked,详细内容为:Invalid entries passed to /FilterFeatureSelectionTree and /InstallSelectableItems switch,后续多次重启尝试也会出错。
因为配置CUDA必须需要VC++编译器,多次尝试不行只好打算卸载重装,结果在程序卸载界面依然Setup Blocked,无法下载,只好尝试多种方法解决。
在失败界面,Microsoft提供了两种解决途径:
1、Common issues and workarounds
在网页里找到Common issues in Visual studio 2015 setup:https://support.microsoft.com/en-us/help/3039361/common-issues-in-visual-studio-2015-setup,找到问题关键在于Feed.xml文件中,虽然不知道这个文件是做什么的,但是在update界面启动中都会configure这个文件,因此需要重置替换这个文件,官方解决方案如下:
—————————————————————————————————————————————————————————————————————————————
Invalid entries passed to /FilterFeatureSelectionTree and /InstallSelectableItems switch
When you install a Visual Studio 2015 update, and the setup fails or cancels out, and then you try to run the same Visual Studio 2015 Update installer again, you receive the following error messages:Invalid entries passed to /InstallSelectableItems switch. For more details, please see the setup log
This issue occurs when the initial failed or canceled setup did not persist the latest feed.xml. The next time the Visual Studio Update installer runs, it tries to use the outdated feed.xml that it detects from earlier Visual Studio install sessions.
To work around this issue, run the command that resembles the following:
VS2015.3.exe /overridefeeduri <Path to feed.xml>
The path of feed.xml can be a web link from the following table. Or, you can download files from the web link and save the feed.xml to your local disk, and then the "Path to feed.xml" will be your local path.
Note The feed.xml is language specific. Therefore, please select the feed.xml that matches the language version of your Visual Studio. If you have multiple languages installed, please select the one that you used to install Visual Studio at first.
For example, if you have CHS Visual Studio installed on the computer, then the command line to use would be as following:
VS2015.3.exe /overridefeeduri http://go.microsoft.com/fwlink/?LinkID=564093&clcid=0x804
Or, if you download the feed.xml from http://go.microsoft.com/fwlink/?LinkID=564093&clcid=0x804 to your local disk at d:\VisualStudio\feed.xml, then the command line to use would be as follows:
VS2015.3.exe /overridefeeduri d:\VisualStudio\feed.xml
————————————————————————————————————————————————————————————————————————————————————————————————————————————————
但我在尝试此种方案后没有成功,因此自己手动查找feed.xml文件进行替换,结果仍未成功,只好查看查看Microsoft提供的第二种解决途径:Log File
2、Log File
进入 Log File,方式有两种,一、单击对话框中链接自动跳出本次log文件,二、手动找到Users/用户名/AppData/Local/Temp,Visual Studio Community 2015 log文件格式如下:
[1518:1B44][2017-04-04T21:26:07]i000: MUX: Cached feed is selected as a local feed.
[1518:1B44][2017-04-04T21:26:07]i000: MUX: Local copy of the dynamic feed is present: C:\ProgramData\Microsoft\VisualStudioSecondaryInstaller\14.0\LastUsedFeed\{79b486b9-c5f0-4096-a00c-8351f59587c2}\Feed.xml
[1518:1B44][2017-04-04T21:26:07]i000: MUX: Feed uri to register: http://go.microsoft.com/fwlink/?LinkID=659004&clcid=0x409
[1518:1B44][2017-04-04T21:26:10]e000: MUX: Exception: Info: Unable to load dynamic feed
[1518:1B44][2017-04-04T21:26:10]e000: MUX: ERROR: Access to the path 'C:\Users\Suo_ivy\AppData\Local\Temp\preprocessor\-576416314.xml' is denied.
[1518:1B44][2017-04-04T21:26:10]e000: MUX: Stack: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)