TFS 2012 is not recognizing a file as having been deleted - resharper-8.0

I am working with another developer on an applciation. Whenever one of us deletes a file that has been pulled down on the other workstation. TFS doesn't seem to pass down the files as deleted on the next get request.
Short story: I delete file -> Check in -> Team mate does get -> gets build errors due to the files still being on his local disk
Anyone know what we are doing wrong?
We are using local workspaces. We are checking in the delete. Everything we are doing is happening in Visual Studio. Not in a file explorer anywhere.
UPDATE: It has something to do with resharper 8 and TFS not playing well together. When I move a file or safe delete a file with resharper commands TFS doesn't recognize it (the green lock sign is not in solution explorer).

I suggest you to check in your csproj file, he contains all files included in your project, your another developper get latest old csproj, so you find your file

Related

How can I Get visual studio to use source server in preference to local files when debugging?

I have just started experimenting with the Microsoft tools to set up a symbol and source server.
I have successfully indexed my source files using p4index, updated the .pdb files and updated the symbol server.
I have set visual studio to use the my symbol server.
All works fine: when I step debug through my exe as a standalone exe the pdb's are loaded and the correct version of the source code is exported from perforce to temp location and displayed within visual studio.
Whats the problem then? If I try to debug on the machine on which I built my exe then visual studio finds the source code locally. The trouble is that this is a modified file and not the correct version of the source corresponding to when exe was built. VStudio even knows this and pops up a requester saying "the source file is different from when the module was built. Would you like the debugger to use it anyway?"
If I click no then I just get a file dialog to manually locate the source.
Is there a way to get vstudio to fall back to using source server or preferably to use the source server first before looking looking locally?
I'm using visual studio 2012 and perforce
After having encountered the same issue, I finally narrowed it down to the fact that Visual Studio won't run the P4 PRINT command if there is already a file at the place where the pdb/debugger expects to find it.
For example, if the indexed source file was in C:\Toto\Source.cpp, the sole presence of this file when Visual is looking for it will prevent the P4 PRINT.
If i rename it, Visual is correctly printing the file in another unrelated folder (the symbol cache pass).
It's not a fix, it's only a reason, but I'm still investigating.
This behavior is not present in windbg.
In case anyone else finds this thread and has the same problem, the solution in my case was to Enable "Require source files to exactly match the original version" in Options -> Debugging -> General.
It will still prefer the local copies, but only if they are identical, in which case it is the same version it would otherwise grab from the source control server. And if it isn't the right one, it will now display the proper one from the source control server.

Library/Static Method not Updating in Azure

I wrote a static method in an MVC (WebApi) website. The static method had a bug in it, so I changed the logic in the static method. The method now works on my local machine and returns the correct data.
However, Azure is STILL running the old method and returning the incorrect results. The only thing I could do was compile the library locally and FTP it up to Azure.
Why is the old static method being retained - even AFTER a build and deployment?
NOTE: I'm doing manual build/deployments from Visual Studio Online/TFS (I'm not deploying from Visual Studio). I do have Rebuild and Clean flags set on MSBUILD.
UPDATE: After looking at file sizes, apparently Azure is deploying an older version of the DLL as the DLL that's deployed is much larger than the one I'm compiling locally.
Is that new dll included in the file list you can see in preview just before you publish to your website? What are your publish options for the dll?
I assume you are using Azure Websites? Is that correct?
I'd just deploy to another Website instance, test as working using the default domain and if it all looks good redirect DNS and delete the old site.
Arggghhh!!!
After 2 days of troubleshooting, I finally figured it out.
Again, the local DLL was different than Azure's DLL in size. So I started thinking that they may be a problem w/ the file in Visual Studio Online.
So, I opened up another VM and connected to VSO to look at the source explorer. Sure enough, the file in VSO was the old version. Apparently, Visual Studio marked the file locally as being up-to-date so it wasn't being checked in with any new changes.
To fix:
Do an exclusive checkout of the file in Visual Studio
Then, attempt a check in
You should then, finally(!!!), get a merge error
Merge the local file with the file in the repository
Check the file back into VSO.
It's finally deploying correctly again.

Visual Studio 2012-Update 2 Won't Load Solution if SUO File is Present

I develop in VS 2012/.NET on several computers (all running Windows 8 Pro x64). Although VS is installed on all computers I keep the project folder on an external USB3 drive. Every once in a while I would find the project files had been corrupted on the USB drive (e.g. cross-linked). Fortunately I keep frequent backups but clearly this situation is intolerable, so I set out trying to find what the issue(s) might be.
I still don't have a clear answer but one piece of strange behavior is this: if I open the .SLN file for my project in VS 2012 when an .SUO file is NOT present it loads fine, builds are OK, etc. HOWEVER, if I then save the project, exit VS (so an SUO file is created) and then attempt to REOPEN the solution VS hangs at (....loading). I get the usual "Visual Studio is busy....." messages and there is no point in waiting, the solution just never loads. I have to kill VS in TM. I've tested this repeatedly, and I've even done it from the local hard disk (as opposed to the USB drive) to see if USB was the problem. It isn't. Remember, this is all on the same computer (so as to remove "moving" as the cause of the issue). The only way I can work with the project is to delete the SUO file before trying to open it.
I would assume, if this was a VS bug, it would be pretty much all over the web and my searches would have turned up something. So I'm asking if anyone has any idea what the problem might be or if there are links that might help me figure things out.
Thanks in advance.

Transferring wp8 project to different computer

My old computer broke down and I have my project folders zipped and backed up in the cloud. I have downloaded them to the new computer and placed them in the 'Projects' folder in VS 2012 for WP. I am able to open the solution file but building the app is throwing read errors and is showing me the path on the old broken computer. Please advice on the right method on transferring a windows phone project across computers.
Open up your .csproj files in Notepad and manually fix any paths you find. You may also need to do this in your .sln file.

Visual Studio 2012 Web Publish keeps overwriting existing files with same version

Just installed VS2012 and run across a strange behavior by the one click publish feature.
I'm publishing via FTP and everything works fine except it seems that VS insists on overwriting some files over and over even though nothing's changed.
In VS2010 clicking the "publish" button over and over just runs through the steps and finishes in a few seconds, in VS2012 it takes about two minutes as it keeps copying a 5mb dll and some other stuff too.
P.S the "delete all existing files prior to publish" is off
It's an absolute pain. I've resorted to keeping the solution open in VS2010 alongside the VS2012 and using VS2010 to publish, it's annoying, but it's faster...
Unfortunately there's no option for only changed files in VS 2012. Not sure why they took it out, other than maybe too many people complained that VS wasn't synching properly when their FTP servers were the problem. FTP servers are notorious for not giving back correct file info.
This is real too slow on large amount of files.
My best experience is to remove unused folders not containing assemblies (scripts, css, etc...) this way <ExcludeFoldersFromDeployment>Content;Scripts;Views</ExcludeFoldersFromDeployment>
.
Publish these files straight when you change them . Otherwise publish assemblies from profile .
https://msdn.microsoft.com/en-us/library/ee942158.aspx#can_i_exclude_specific_files_or_folders_from_deployment

Resources