[VS2017][CUDA] Problems encountered after updating visual studio 2017 v15.6.1 [script error on current page, etc.]

I don't know why I updated VS2017 today, and directly mentioned the version number from 14.1.1 to 15.6.1.

Ahhh my precious 14.1.1 version, it's gone ==

Two problems followed, one was that CUDA9.1 could not keep up with the update rhythm of VS2017, and it exploded as expected; the other was that the old version of IE was compatible with VS2017-15.6.1.

--------------------------

Let's talk about the compatibility between VS2017-15.6.1 and the old version of IE.

First of all, my IE is relatively old, which is IE9.0.8112. This is mainly to test the compatibility of pages and JS scripts with the old version of IE and display problems during development. However, the relationship between IE and JS has always been relatively "ambiguous". MS is promoting its own JS architecture, and at the same time, it engages in a routine with Google between browser objects. These are background.

When I debug with VS2017, a box like this pops up:


Obviously, this is the problem of the "," error at the end of the text when the old IE interprets the JS script and interprets the object. for example:

var a = {
    f : 120, // this, OnePlus will report an error
};
To solve the problem, of course, manually go to \Common7\IDE\PrivateAssemblies\plugin.vs.js and change it line by line.

But there is a faster way, and that is to update IE. Of course, after backing up this file, it is not a big problem to simply delete this file. Generally, it is not needed.


Secondly, an error will be reported: the object does not have the method addEventListener.

This is simpler, without updating IE, directly open the relevant file, and change this method to attachEvent() in the old version of the window object.

--------------------------

Then talk about the problem of CUDA9.1. It is well known that CUDA cannot keep up with the update speed of VS. After this update, the following problem was encountered:

error -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
According to the usual experience, it is enough to forcibly increase the version limit of VS in CUDA's precompiled detection:

Open C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include\crt\host_config.h and put line 133:

#if _MSC_VER < 1600 || _MSC_VER > 1911

Change it to:

#if _MSC_VER < 1600 || _MSC_VER > 1920 // As long as the version number is high enough, just pick a number

But this time the problem is a little more serious. Because VS14.x and VS15.x have made changes in compilation, the following errors still occur:


The solution is to open the visual studio installer-modify-single component, and install the following: (Yes, it is to use the old version of VC++)


Then: project - $ project name properties - replace the toolset with 2015's:


Next, click: Generate - Regenerate.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325644717&siteId=291194637