2012-11-24 96 views
1

我已將「Visual C++ CLR」項目添加到我的解決方案中。一切都是沒有錯誤的構建。然後在「Configuration Manager」中,我將「Win32」配置更改爲「x64」,因爲我需要爲x64編譯。現在我的項目無法建立。我有很多錯誤,我不知道如何修復無法爲x64構建空的「Visual C++ CLR庫」

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 

爲什麼x64配置在C++中不起作用 - cli項目?

upd我知道可能項目引用「32位」版本的系統,而我需要「64位」版本。這可能嗎?

回答

0

如果您將您的項目切換到/clr:safe它將同時針對32位機器和64位3232位機器。另外, 認爲,對於每個新配置,您需要重新設置所有設置。

+0

感謝,由於某種原因,新創建的「x64」配置是「沒有clr運行時支持」。我已啓用clr支持,現在項目幾乎可以建立,我只有一個錯誤'錯誤LNK1561:入口點必須定義' – javapowered

+0

爲什麼?這是類庫。 win32版本很好。 – javapowered

+1

我看到發生了什麼事。 probaly當創建x64配置我需要從Win32複製所有設置! – javapowered

相關問題