Fatal Error C1197
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Fatal Error C1197.
cannot reference 'mscorlib.dll_1' as the program has already referenced 'mscorlib.dll_2'
The compiler is matched to a version of the common language runtime. However, an attempt was made to reference a version of a common language runtime file from a previous version.
To resolve this error, only reference files from the version of the common language runtime that shipped with the version of Visual C++ you are compiling with.
The following sample generates C1197:
// C1197.cpp // compile with: /clr /c // processor: x86 #using "C:\Windows\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll" // C1197 // try the following line instead // #using "mscorlib.dll"
Show: