【发布时间】:2021-12-13 14:07:31
【问题描述】:
我有在 Visual Studio 中创建的 C# .Net Framework Winforms 项目。在 Visual Studio 中,一切都很好,它可以编译、调试、运行等。
但是当我尝试使用 Omnisharp 扩展在 vscode 中处理我的项目时,Omnisharp 甚至无法解析我的项目,它失败并出现错误:
...\packages\ScreenRecorderLib.3.1.2\build\ScreenRecorderLib.targets(6,5): Error: ScreenRecorderLib does not work correctly on 'AnyCPU' platform. You need to specify platform (x86, Win32 or x64).
- 问题 #1:为什么这只是 vscode/Omnisharp 的问题,而 Visual Studio 中一切正常?
- 问题 #2:我该如何解决?
我已经尝试在 Visual Studio 中查看项目属性,并且我已经将所有内容都设置为 x64,只要我能找到我的项目(请参见下面的屏幕截图)。虽然错误与我正在使用的 Nuget 包有关:ScreenRecorderLib... 那么这甚至可以在我自己的项目文件中修复吗?
【问题讨论】:
标签: c# .net visual-studio-code omnisharp