“The name does not exist” error when switching target platform from AnyCPU to x86

北战南征 提交于 2019-12-10 19:52:41

问题


I am building a WPF project on VS2013 Community. I wanted to use CefSharp in the project, but it cannot run on AnyCPU build configuration, so I changed it to x86. After that MainWindow.xaml.cs started throwing The name 'InitializeComponent' does not exist in the current context and 25 more errors saying that none of my XAML control's names can be found. When I change to x64 it's the same. When I return to AnyCPU the project compiles and runs perfectly.

So what else do I need to change in the configuration in order to make it work?

EDIT: I finally decided to drop CefSharp and returned the AnyCPU option everywhere. Now VS gives me the same errors only when building for Release. I reverted to the last stable version of the project in Git, but the errors won't go away. I've looked at Debug/Release settings in Configuration manager and Project properties, but everything seems fine. Is there somewhere else to look for Release settings?

来源:https://stackoverflow.com/questions/30710557/the-name-does-not-exist-error-when-switching-target-platform-from-anycpu-to-x8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!