Clearcase does not checkout project files when files are moved by resharper - visual-studio

My current project is under source control by clearcase. I am also using Resharper 8.1 with Visual Studio 2012. I am also using a VS integration for ClearCase.
When adding files manually to a project (by right clicking on the Project -> Add-> Class), ClearCase checks out the project file, so that saving all files works like a charm.
"Unfortunatelly", I tend to use a lot of the ReSharper functionallity. When using ReSharpers Move To command, it seems that ClearCase prevents ReSharper (or Visual Studio) to check out the project files. They are modified, but cannot be saved - I always get that Save As dialogue when saving all documents. To get this working, i need to manually check out the *.proj file and then save the modified files. Is there a way to automatically check out those files?
Another problem is when using ReSharpers Rename: I just tried to use Rename on an interface that is used in approx. 60 other files. Everythink worked, except that the files were not checked out by clearcase! In order to save, I needed to Save all, click cancel for the first file (ClearCase then recognizes that the file has been modified and checks it out) and then save again. This is really annoying and prevents from a produtive workflow..

Related

How to regenerate designer code for all SpecFlow features

I've got ~30 SpecFlow feature files, and I recently removed the Foo.feature.cs files from source control because I got sick of resolving merge conflicts in Designer Generated code.
I did not exclude or remove these files from my Visual Studio project, so Visual Studio still thinks they should be there, they are just missing on the hard disk.
Ideally I'd like to just click on a root folder and regenerate all the code behind files, but no such option exists for VS 2010 and SpecFlow 1.9. I'd even be OK with programmatically regenerating them from the command line, creating another custom tool or adding a pre-compile build event.
Is there a way to regenerate all of the the Designer generated code behind files for SpecFlow features (*.feature.cs files) without right-clicking on each .feature file and clicking "Run Custom Tool"?
You can right click on the project and choose 'regenerate feature files' to do them all at once.
It runs much quicker from the command prompt. Go to your Specflow package tools folder and run the following command line. It also ensures the correct Specflow version is added to the files.
specflow.exe generateall <My_Testing.csproj>

Visual Studio properties->debugging won't stick

I had a solution/project that was going just fine until I made changes to locate the source in a different folder.
Everything compiles just fine but when I debug the Command Arguments and Working Directory are not correct. So I used Configuration Properties->Debugging and set them but when I click OK they always go back to the defaults. Even if I use Apply I can see the entries I made change to the defaults.
My only clue is that I restored my folder that contains the .sln and .vcproj files from a backup but I can't come up with an explanation for this behavior.
I'm using Visual Studio Express 2013.
Does anyone have any suggestions?

Tell visual studio to close the documents that have been deleted outside of the IDE

I'm working with Visual Studio 2010 Professional and use git with Git Extensions as a version control system. When I checkout a branch that involves different versions of the files which I'm working on, VS2010 prompt me with a message that says: "this file has been modified outside of the source editor. Do you want to reload it?" I click yes to all, and get the right version of the files. Until here everything goes as expected.
The problem comes when I checkout a branch that involves files to be deleted. Files that in that branch do not exist yet/anymore. If one of these is opened in the editor, it continues there and you can keep writing on it and then save it.
I know the files can't disappear from the project tree, because we're not keeping track of the project files (at least they get in Project File explorer an exclamation mark telling you that the file doesn't exist anymore). What I want is Visual Studio to close each file that no longer exist. Is there a way to do that? Or does someone have an idea to achive this workflow?
Closing and opening Visual Studio again does the trick, actually does exactly what I want.. But it would be good to avoid it.
Thank you
I think you have forgotten to include the project file vbproj or csproj in git

Get files from TFS Source Control added by another developer without checking in my code first?

I'm working with Wally, another developer on the Acorn project. (both names ficticious)
The Acorn project is an ASP.net Web Project; the source code is in TFS (Team Foundation Server). Wally tells me that he checked in new code yesterday, as I expected. I sit down and run the merge tool and take notes of the places where we've worked on the same file. I used the Visual Studio Merge Tool to merge and then proceeded to test the code.
It didn't work. The problem is that a number of files that Wally checked into TFS are missing from my machine. I can see in the "Source control Explorer" that Wally checked in at least one new file. When I right mouse click on the Acord project and click "Get Latest", I still don't get Wally's new file. This is a problem because I've added some new files of my own, so I can't just take Wally's version of the project file.
What can I do to make the project file include the file additions from both Wally's code (that is checked in) and my code (which is only saved in a Shelfset)?
I am using Visual Studio 2010.
Get the lastest version of the project file, and you will get the opportunity to merge the files (automatically or manually) as you have both made changes to it.
The project file is XML, so you should fairly easilty see what most of it means, and you really only need to understand the part that is the files in the project, so there isn't really any problem if you need to merge them manually.

Create a physical copy of a source file in Visual Studio

In Visual Studio, if I try to copy a file from one project to another (by using Copy and Paste or by dragging the file to the new project while holding the Ctrl key) it creates a reference to the source file in the original location. Is there a way to create a physical copy of the source file and place that in the target project source direction without having to resort to using Windows Explorer to copy the file manually?
It's not pretty, but when I want to do what you're suggesting, I double-click on the file in Visual Studio, which opens it. Then I do a File->Save As, choose the right directory and save it. All from within Visual Studio. This is usually followed by adding the new file to the other project.
Was just doing this and realized I should mention a side-effect. Depending on your source control (in my case, TFS 2010), doing this from within Visual Studio may modify the location of the file in the project. For me, this means making sure that neither the file nor its project have any pending changes, doing the save as, then doing an undo of the change this causes in TFS 2010 (project change, file add and delete).
From http://msdn.microsoft.com/en-us/library/0fb6xxhb.aspx:
If you are working with solution items, Visual C++ projects, or other similar projects, you are always working with links in Solution Explorer. If you are working with Visual Basic projects, Visual C# projects, and other projects, you might be working with links or files.
Essentially, the answer to my question is 'No'. In most cases, I must use Windows Explorer.

Resources