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..)
Related
My cpps and headers files were messy on visual studio, then I organized it manually on the directories.
The problem is visual studio still trying to compile over the old files names and directories that I have already changed, I'm getting a lot of
C1083: No such file or directory and
MSB8027: Two or more files with the name of ...
But I deleted them and I want to visual studio recognizes it.
What should I do?
Thanks
I have the project gmock and am trying to put it into my solution which is in a tfs source control. The project file is in a subdirectory, but when I put it in as a shelveset, and then try and unshelve it, it fails to generate the subdirectory and thus doesn't have a project.
Any idea why this is happening and how to get around this?
Test pass with my enviroment (TFS2015 VS2015). Which step you got different result with me
Step1: Add new project 'Consolepzz' in the test subfolder
Step2: Put the project in a shelveset aaa (you'd better to check the "Preserve Pending changes locally")
Step3: Unshelve the changes (Don't select undo all in the actions)
Step4: Finally found your project in the pending changes and check in it. Double check it in the solution Explorer. The project should added under the solution in source control.
To add all of the gmock test framework to the project's tf source control, I went to the command line for Visual Studio. Link from the start page are:
VS2013 x64 Native Tools Command Prompt
VS2013 x86 Native Tools Command Prompt
VS2013 x64 Cross Tools Command Prompt
VS2013 ARM Cross Tools Command Prompt
or run a cmd prompt and run "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" with one of the following parameters: amd64|x86|x86_amd64|x86_arm
This will call the appropriate vcvars*.bat file which will setup the correct path which will include the tf.exe file.
Then I went to the directory that I wanted to add and typed:
tf add . /recursive
I initially thought that this would add it to the repository, but it just marks it to be added like in git.
And that's it. Now I can shelve my solution and have it recover elsewhere intact.
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..
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
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