简体   繁体   English

VS 2017 C#交互式不是有效的Win32应用程序

[英]VS 2017 c# interactive is not a valid Win32 application

I'm trying to use VS C# Interactive on a project (dll output) which is referencing com x86 references. 我正在尝试在引用com x86引用的项目(dll输出)上使用VS C#Interactive。 I'm selecting the project and right click on "Initialize Interactive with Project". 我正在选择项目,然后右键单击“初始化与项目的交互”。 When then I try to execute my code. 那时候我尝试执行我的代码。 I get a count not load file or assembly .... or one if its dependencies is not a valid Win32 application. 我得到一个不加载文件或程序集的计数..或者一个依赖项不是有效的Win32应用程序的计数。 Is C# Interactive limited to Any CPU project? C#Interactive是否限于任何CPU项目?

Thanks 谢谢

Another option is to reset the execution engine of the interactive window using #reset 32 for 32-bit mode and #reset 64 for 64-bit mode. 另一种选择是使用#reset 32对于32位模式)和#reset 64对于64位模式)来重置交互式窗口的执行引擎。
Tested with VS 2017 Enterprise version 15.8.6 使用VS 2017 Enterprise 15.8.6版进行测试

Thanks, I changed the plateform target of my project (in that case a dll which is referenced by different solution) and I was able to get C# Interactive working. 谢谢,我更改了项目的平台目标(在这种情况下,这是一个由其他解决方案引用的dll),因此我能够使用C#Interactive。 It made me evaluate carrefully the difference between platform target of referenced assembly (where c# interactive is valuable as the output cannot be executed) vs applications where testing can be done in inline editing in debug. 它使我认真地评估了引用程序集的平台目标(其中的c#交互式很有价值,因为无法执行输出)与可以在调试中进行内联编辑进行测试的应用程序之间的差异。 It was indeed a nice exercise. 这确实是一个不错的练习。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM