简体   繁体   中英

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. 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. Is C# Interactive limited to Any CPU project?

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.
Tested with VS 2017 Enterprise version 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. 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. It was indeed a nice exercise.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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