I’ve added “Visual C++ CLR” project to my solution. Everything was build with no errors. Then In “Configuration Manager” I’ve changed “Win32” config to “x64”, because I need to compile for x64. And now my project can’t be built. I have a lot of errors which I don’t know how to fix
Error 1 error C2871: 'System' : a namespace with this name does not exist C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 3 1 ACliAdapter
Error 2 error C2653: 'System' : is not a class or namespace name C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 4 1 ACliAdapter
Error 3 error C2871: 'Reflection' : a namespace with this name does not exist C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 4 1 ACliAdapter
Error 4 error C2653: 'System' : is not a class or namespace name C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 5 1 ACliAdapter
Error 5 error C2871: 'CompilerServices' : a namespace with this name does not exist C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 5 1 ACliAdapter
Error 6 error C2653: 'System' : is not a class or namespace name C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 6 1 ACliAdapter
Error 7 error C2871: 'InteropServices' : a namespace with this name does not exist C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 6 1 ACliAdapter
Error 8 error C2653: 'System' : is not a class or namespace name C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 7 1 ACliAdapter
Error 9 error C2871: 'Permissions' : a namespace with this name does not exist C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 7 1 ACliAdapter
Error 10 error C2337: 'AssemblyTitleAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 14 1 ACliAdapter
Error 11 error C2337: 'AssemblyDescriptionAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 15 1 ACliAdapter
Error 12 error C2337: 'AssemblyConfigurationAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 16 1 ACliAdapter
Error 13 error C2337: 'AssemblyCompanyAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 17 1 ACliAdapter
Error 14 error C2337: 'AssemblyProductAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 18 1 ACliAdapter
Error 15 error C2337: 'AssemblyCopyrightAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 19 1 ACliAdapter
Error 16 error C2337: 'AssemblyTrademarkAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 20 1 ACliAdapter
Error 17 error C2337: 'AssemblyCultureAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 21 1 ACliAdapter
Error 18 error C2337: 'AssemblyVersionAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 34 1 ACliAdapter
Error 19 error C2337: 'ComVisible' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 36 1 ACliAdapter
Error 20 error C2337: 'CLSCompliantAttribute' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 38 1 ACliAdapter
Error 21 error C2337: 'SecurityPermission' : attribute not found C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 40 1 ACliAdapter
Error 22 error C2653: 'SecurityAction' : is not a class or namespace name C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 40 1 ACliAdapter
Error 23 error C2065: 'RequestMinimum' : undeclared identifier C:\Oleg\projects\Va.MBClient\ACliAdapter\AssemblyInfo.cpp 40 1 ACliAdapter
Error 24 error C2871: 'System' : a namespace with this name does not exist c:\oleg\projects\Va.mbclient\Acliadapter\ACliAdapter.h 5 1 ACliAdapter
Error 25 error C2059: syntax error : 'public' c:\oleg\projects\Va.mbclient\Acliadapter\ACliAdapter.h 9 1 ACliAdapter
Error 26 error C2143: syntax error : missing ';' before '{' c:\oleg\projects\Va.mbclient\Acliadapter\ACliAdapter.h 10 1 ACliAdapter
Error 27 error C2447: '{' : missing function header (old-style formal list?) c:\oleg\projects\Va.mbclient\Acliadapter\ACliAdapter.h 10 1 ACliAdapter
Error 34 The type or namespace name 'ACliAdapter' could not be found (are you missing a using directive or an assembly reference?) C:\Oleg\projects\Va.MBClient\Va.MBClient\Program.cs 14 7 Va.MBClient
Error 35 The type or namespace name 'ACliAdapterMain' could not be found (are you missing a using directive or an assembly reference?) C:\Oleg\projects\Va.MBClient\Va.MBClient\Program.cs 28 24 Va.MBClient
Error 36 Metadata file 'C:\Oleg\projects\Va.MBClient\Va.MBClient\bin\x64\Debug_TestGate\Va.MBClient.exe' could not be found C:\Oleg\projects\Va.MBClient\TerminatorConsole2\CSC TerminatorConsole2
Why x64 configuration doesn’t work in c++-cli project?
upd I know think that likely project reference “32-bit” version of System, while I need “64-bit” version. Is this possible?
If you switch your project to
/clr:safeit will target both 64 & 32 bit machine. Also,consider that for each new configuration you need to set all your settings again.