Visual studio ipch folder - visual-studio-2010

I need to send the solution which consists of 2 projects by email.
Can I delete ipch folder?

Yes, that's the folder used by the IntelliSense parser to store precompiled header files. It will be rebuilt on the receiver's machine. More in this answer. Use Build + Clean to avoid having to look at too many of them.

There is an answer in the MSDN support forums:
I'm not only a C# moderator but also a C++ user :} The ipch directory
and the many, many new files generated by the compiler can be safely
deleted. In fact they should be deleted (and probably are) for clean
builds. I teach a C++ college class myself and here is what I require
my students to do. In the solution folder delete all bin, obj, ipch,
debug and release directories.
Delete any .suo files
Delete any .user files
Delete any .ncb files
Delete any .sbr files
Delete any .*log files (for VS 2010)
Zip up the entire solution directory for submission. This ensures
that the solution and project structure remain intact.
The answer link:
Is it safe to delete "ipch" folder - Pre-compiled headers

As mentioned here: How to change ipch path in Visual Studio 2012
Change to "always use fallback location" in this way this directory does not get created inside your solution but the system temp directory is used. This worked for me.

You can delete these files with this simple windows command:
project_folder> del *.log *.ipch *.suo *.user *.ncb *.sbr *.vc.db *.obj /s /q

Related

Visual Studio 2010 build outputs extra files in 'bin' root

Recently, I changed a Visual Studio solution that contains about 140 projects to output all the library project's output files to the same bin folder in the solutions root directory.
After changing all the project's output directories and doing a re-build, I noticed some projects output both in the correct bin\\{platform}\\{configuration}\lib\ folder but also in the bin\ folder. The files appear to be the exact same. Only the DLL and PDB files go into the bin folder, the configuration file and XML documentation file do not. If I do a clean, the files in the bin folder do not get deleted. I can build the projects one at a time and some do this, some don't. If I build using MSBuild from the command line this does not happen.
Is this expected/normal? I built with the MSBuild output set to diagnostics but there is no mention of the bin\ folder alone, all mentions of the bin folder include the correct platform, configuration etc..

What is the packages directory in Visual Studio? Should I include it in SVN?

I'm working with ASP.NET MVC 4 in Visual Studio 2010 for the first time, and I control source code with SVN. I used to work with MVC 1 in Visual Studio 2008, where I had my own filter for svn:ignore
*.pdb
*.exe
*.dll
debug/*
release/*
*.user
*.suo
obj/*
bin/*
obj
bin
VSMacros80
Thumbs.db
_ReSharper.*
but it doesn't apply in the same way now because the project has some new folders, as the packages folder, and I don't know which of them must be versioned.
About the packages folder, should I include it the repository or this folder must be ignored? What other folders or files should I ignore?
It sounds like you are using NuGet and the packages folder is the NuGet packages folder. You can commit this to source control if you do not mind adding several large but infrequently changing binaries.
Alternatively, you can omit it from source control and configure NuGet to download packages on each build if developers and the build machine are to download it as required. This also runs the danger of someone downloading a newer version and causing conflicts.
As for other files to exclude form source control, see What .net files should be excluded from source control? and For a .Net project, what file extensions should I exclude from source control?.

Visual Studio 2010, VisualHg, keeps adding bin, obj folders

Everything was working fine for 3 months, now suddenly when I open Visual Studio, it adds all untracked files in the root solution folder to Hg, i.e. bin and obj folders included.
Steps:
Close VS2010
Use Tortoise Hg workbench to forget files added by VS2010 when it opened
Open VS2010, all the files start being added back into Hg, it appears to happen when the "Preparing solution" dialog appears
I edited the .hgignore file in the root folder to include "bin" and "obj", but that is being ignored by VS.
Any ideas why this is happening?
Try editting your ignore file to include the following instead :
[Bb]in/
[Dd]ebug*/
obj/
[Rr]elease*/
Sometimes the capitalization can change (I can't remember exactly what causes it..)

When adding a solution to a subversion repository with Tortoise, how to avoid adding unnecessary files

I'm using Visual Studio, but I guess this will be relevant for other platforms.
Currently, when I need to add an existing Solution or Project to Subversion with Tortoise, I add all files/folders initially, and then have to go through and weed out the ones that I don't want to be source controlled (e.g. output dlls, user settings like the suo file), and register them on the ignore lists for the relevant folders. It takes ages.
There must be a better way that I don't know about, right?
You can add specific filenames and extensions to the Global ignore pattern in the TortoiseSVN settings dialog.
My entry is as follows:
*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store httpd.parse.errors *.db *.config aspnet_client *.pyc *.suo obj bin *.user Thumbs.db
Which seems to weed out most of the Visual Studio stuff I don't want checked in when adding a project to SVN.
Edit: Git Ignore Examples — I know these are Git ignore files, but they're quite useful to see which files/folders to ignore for each language.
If you want to include only the relevant files, then you should consider using AnkhSvn, a VS2010 add-in for Subversion support. It lets you check in only the files that are included in your projects.

Do I need the .dat file when I place a visual studio database project under version-control

I have a visual studio 2008 database project that is under version control (git). I am getting conflicts in the project_name.dat when I try to merge my branches.
So my questions ares:
What is the project_name.dat file?
Do I need it? That is can I leave it out of my version control
No , you shouldn't have it under sourcecontrol as it's autogenerated.
Offtopic but maybe useful:
You should configure your VCS so that special files and folders will be ignored during your commit.
I use Subversion in a Windows environment and the only thing to do is to put a file called config in %APPDATA%/subversion.
Inside it look like this:
global-ignores = \bin \obj .suo _ReSharper *.resharper *.user *.ncb \Debug \Release

Resources