vshost.exe file in Release folder?

有些话、适合烂在心里 提交于 2019-12-08 14:47:25

问题


Why there is a appname.vshost.exe file generated for the release version of my application? I might add that I'm using an external dll library and some unsafe code.

What's even more interesting, my application launched from Release folder does not work correctly (it works OK when launched from Debug folder).

It's bit hard to explain - feel free to ask if you need more info.


回答1:


For anyone else having the issue, it is probably because "Enable the Visual Studio hosting process" checkbox (in Project Properties -> "Debug" Tab) is checked under your Release configuration.

You probably want it only checked under your Debug configuration so

  1. just delete all files from your Release folder OR run Clean on the project;
  2. then uncheck the checkbox
  3. and build the project.



回答2:


From David's answer, perhaps the link at the bottom - How to: Disable the Hosting Process might be what you're after if you actually want to get rid of it from your project's output.

Though it shouldn't do any harm to leave it on your machine; so just don't deploy it...




回答3:


Um, I know perfectly what this file is for, just don't understand why it was building in my Release folder while it's not normal behaviour (my VS never does that for my other projects).

Anyway, I managed to fix the problem using a good old trick - I just recreated the whole solution from scratch and vshost.exe file is only created in Debug folder, like it should. It seems that my previous solution was messed up somehow.

Issue closed.



来源:https://stackoverflow.com/questions/3047643/vshost-exe-file-in-release-folder

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