views:

182

answers:

4

I am building an application which is based on a sample application, written in C# on .NET 2, and is built on VS2008. This application is mostly a wrapper for a COM application. However I compile it in .NET 3.5.

The sample application came with the following files in it's bin\debug:

  • appName.vshost.exe
  • appName.vshost.exe.manifest

I noticed that I can delete the files and VS re-builds vshost.exe, and the vshost.manifest file appears with modification date the same as the deleted file as if VS has copied in from somewhere.

My question is, should I put this files in my SVN code repository?

+4  A: 

Everything in the debug (or release) folder is generated. Everything that's generated shouldn't be checked in.

When in doubt, just make a fresh checkout to some other folder (or even machine), and try to build from that. If something is missing, this will find it.

sbi
not true, and feels like you haven't read my question seriously.
Bruce Lee
I _have_ read your question seriously and I understood that you think the file is copied from somewhere. I still gave this answer. You don't have to like it, but I wrote what I think is the answer to your question. Feel free to down-vote my answer if you don't like it. (But please explain that down-vote better than with your "not true", of which I don't know which of my two statements it refers to.)
sbi
Sorry about that. Not everything in the debug folder is generated, it is possible there has to be some files such as dll's there, and maybe the vshost.exe guy for some reason. Yet I realise maybe the app didn't came with it. Still, it isn't removed when cleaning solution.
Bruce Lee
@Bruce: When I start a new project, when I hit "Build" for the first time, those folders are created. So what's in there had been put there by VS and it was done by starting a build. Why wouldn't it be able to do that again? Anyway, I'll add something to my answer.
sbi
+1  A: 

I do not think you should. They are for VS use only.

Daniel Dolz
A: 

Here are the files I ignore when creating C# projects. You really only want to store the source code in the repository and not the outputs. Similarly you probably do not want to store the user based information that goes along with VS solutions.

  • *.csproj.user
  • *.suo
  • bin (folder)
  • obj (folder)
Brian Gideon
+2  A: 

Those two files you list implement the Visual Studio "hosting process". It is a hosted version of the CLR, designed to improve the debugging experience. It takes care of some security issues, the most visible side-effect is that it redirects output written with Console.WriteLine() in a GUI app to the Output window.

These files are not part of your projecct and do not get deleted when you use Build + Clean. In fact, you cannot delete the .exe file, it is always running while you've got the project opened in Visual Studio. You can disable the hosting process feature with Project + Properties, Debug, scroll down, "Enable the Visual Studio Hosting process" tick. There's no compelling reason to do so.

There's no need to check these in, Visual Studio re-generates them when you check-in a project and load it in VS.

Hans Passant
This is the most detailed answer to such questions. Understanding how VS works can make you aware of the details and better decide how to adapt to that.
Lex Li