Visual C++ Version Redistributable Pop-Up When Compiling LabVIEW FPGA Code

Updated May 21, 2018

Reported In

Software

  • LabVIEW FPGA Module

Other

Xilinx

Issue Details

When I try to run a compilation of my LabVIEW FPGA code, I get a Visual Studio 2012 Visual C++ Runtime installation window telling me to repair or uninstall.

Solution

There are a couple of different possible solutions that have varying degrees of success for people running into this error. They are:
  1. Renaming the xvcredist.exe to something like xvcredist.exebak such that it doesn't get called at all.
  2. Uninstalling all newer versions of Microsoft Visual C++ Redistributable. Then using the xvcredist.exe popup to install the compatible version.
  3. Setting an environmental variable in Windows: XIL_PA_NO_REDIST_CHECK = 1 

Option A:

Rename every file of that name on your system. You may be able to find them at the following locations:
  • E:\NIFPGA\programs\AutoESL2015_4\tps\win32\xvcredist.exe
  • E:\NIFPGA\programs\Xilinx14_7\common\bin\nt64\xvcredist.exe
  • E:\NIFPGA\programs\Xilinx14_7\PlanAhead\tps\win32\xvcredist.exe
  • E:\NIFPGA\programs\Xilinx14_7\PlanAhead\tps\win64\xvcredist.exe
  • E:\NIFPGA\programs\AutoESL2015_4\tps\win64\xvcredist.exe
  • E:\NIFPGA\programs\Xilinx14_7\common\bin\nt\xvcredist.exe

Option C:

  1. Go to your start menu and type in edit the system environment variables to open the System Properties. 
  2. Click Environment Variables under the Advanced tab
  3. Under "System variables" click New...
  4. Set the Variable name as XIL_PA_NO_REDIST_CHECK 
  5. Set the Variable value to 1
  6. Press Ok on each window. 
  7. Make sure to press Apply on the System Properties window. 
  8. Restart your computer and verify the XIL_PA_NO_REDIST_CHECK variable is still equal to 1 by repeating the above steps. 
  9. Try the compilation again. 

Additional Information

According to the forum post Solved: Vivado/Xilinx SDK Error Incorrect Visual C++ Version there are some lines in the a batch file that say: 

[...] 
set XVREDIST=%RDI_APPROOT%\tps\%RDI_PLATFORM%\xvcredist.exe 
if not [%XIL_PA_NO_REDIST_CHECK%] == [1] ( 
if exist "%XVREDIST%" ( 
"%XVREDIST%" -check 
if [!ERRORLEVEL!] == [1] ( 
echo. 
echo ERROR: This host does not have the appropriate Microsoft Visual C++ 
echo redistributable packages installed. 
echo. 
[...] 


Options A and C work by modifying some of the checks in the code above.