how to stop ".jfm file cannot be accessed" from locking up tfs - visual-studio

I'm working on a project with a large solution in TFS, which includes a sqlProject. There's a few things we use in that project but there's also a .jfm file generated for the project. The .jfm has been excluded from the project but TFS keeps trying to access it. It also shows up under "Excluded Changes" even though I have not made any changes to it.
I've added a .tfignore file with the line
*.jfm
and restarted visual studio and rebooted my computer. This popup persists:
and then I can't open anything in Source Control Explorer, it just keeps giving me the popup. I've googled, spoken to my coworkers, tried moving the .tfignore file around, none of it has worked and it's driving me bonkers.

To ignore the .jfm files you have to ensure that the .tfignore file was checked in to the remote server.
Please try following below steps to fix this issue.:
Delete the .jfm files from TFS via web portal (backup them if needed),
Restart VS, Right click the project node under the collection and
select Get Latest Version to remove the .jfm files from local
workspace.
Set the .tfignore file and check in to the remote server
Then try it again, if that not work, just try to add a new workspace and map the sources in VS,then check in the .tfignore file to the remote server.

Related

TFS Project Deleted, how to upload code to new project

Somehow on my team's TFS server, one of our projects got deleted. The code is on my local machine though so I'm trying to get it reuploaded, but I'm running into issues getting it back on the server. I've recreated the project and given it the same name and Visual Studio seems to recognize that the new project I've created is connected to the Project I'm trying to upload as a result. The problem is that when I try to check in the version I have to the new project it throws a pile of errors because the files "does not exist at the specified version or you do not have permission to access it". Is there some way to force the upload so that the files are all on the server again?
First remove .* folder from your current working project.
Then go to Visual Studio
Open Team Explorer
Click On Manage Connection
Add your account If not added
Enter your tfs url
Select your TFS folder where you want to checked in your code.
Try to checked in your code.
Even though you have deleted the project on server side, all changes in TFS are non-destructive.
You could check this, just navigate to the Source Control –> Visual Studio Team Foundation Server section.
In that section is a check box that says "Show deleted items in the Source Control Explorer"
If you have recreated the project and given it the same name and want check in local code to TFS. This may cause some trouble.
Suggest you to permanently destroy the project in TFS using Destroy Command (Team Foundation Version Control)
tf destroy [/keephistory] <itemspec1>[;<versionspec>][<itemspec2>...<itemspecN>]
[/stopat:<versionspec>] [/preview] [/startcleanup] [/noprompt] [/silent] [/login:username,[password]] [/collection:TeamProjectCollectionUrl]]
After destroy the old project, then create a new project with the same name, add your local code to this project, finally check in pending changes.

A project vanished from my local TFS workspace. It's added to source control but not checked in. Anywhere else to find it?

This is a bit strange.
I created a project, added it to source control, worked on it for a day or two, but never checked it in.
Somehow, the project went missing from my local workspaces folder. It's just gone.
In Source Control Explorer in VS.. it shows a green plus next to the project on both the TFS pane and the local pane.
If I right click the project in the local pane and choose Check In, it prepares my check-in, and when I finally proceed with the check-in process, I get this error:
C:\Users\<me>\Source\Workspaces\Workspace\AG\libCrypto\AGCrypto.sln: Could not find a part of the path 'C:\Users\<me>\Source\Workspaces\Workspace\AG\libCrypto\AGCrypto.sln'.
Because, as I said.. the project folder vanished. This is really concerning.. especially if it were to happen to a larger project. Under no circumstance would I ever manually remove something from my workspace folder.
Could there possibly be anywhere else where I might be able to find my project? Maybe in some cache/temp location?
I'm using VS 2015 Enterprise, TFS2015
TFS won't remove project from workspace. I'm afraid you there is wrong process or operation on your local machine causes the project deleted.
As your project hasn't been checked into TFS, TFS doesn't have record for this project, it's unable to get your project back on TFS side.
You need to focus on how to recover files on your local machine if you need the project back.

"Files already in version control are hidden" but I cannot find them them in TFS?

Steps I made leading up to this problem:
I created a project in Visual Studio Online (TFS) and checked in the entire contents (about 200mb) of a folder called classic.
I created another project and checked in the entire contents of a folder called dlls.
I decided that it would make more sense if these two folders were apart of the same project, so I deleted both of the ones I created in steps 1 and 2.
I created a new project and mapped it to a folder on my computer that contains both the classic and dlls folders.
In Visual Studio 2013, I go into "Source Control Explorer", right click and select "add existing item", and try to add both folders.
In this prompt, none of the files that I need to add are shown! The prompt gives me a message at the top that says "Files already in version control are hidden". If I click through each folder they are blank except for other folders. I verified that the files are still there on my local machine.
The problem is, I deleted those 2 projects in TFS that had the files. Do those projects still exists somewhere? How do I completely get rid of them? Where can I find those files at if they are "already in version control"?
This may be happening because even though you deleted the files from the server, you local workspace still thinks they are available on the server. The easiest way to recover is if you can delete your workspace and recreate it. Be careful not to delete your local files without creating a backup.

Files missing from TFS restore

I've just created the simplest little project with a Program.cs file, checked it in to Visual Studio Online, deleted the project locally, and then tried to get the latest version from the online repository. The program file didn't download, even though Source Control Explorer shows it on the server:
Any idea why this won't download?
At this point there are no changes in the files since you last did a Get-latest to your workspace. Follow the below steps to get the files for your workspace:
Right click on the file/folder
Choose Advanced instead of Get Latest Version
Choose Get Specific Version
Check the "Overwrite all files even if the local version matches the specified version" box
This will force a download of all the files and not just files that have changed since the last time they were retrieved to your workspace.

Visual Studios 2010 SP1 "Unable to copy file '...\.svn\all-wcprops' Access to the path 'bin\\.svn\all-wcprops' is denied"

I am using Visual Studio 2010 to develop an MVC 3 application for Azure. We are using AnkhSVN for subversion control, which has been slightly buggy in the past.
The error I'm getting when I try and Build/Debug my application is:
Unable to copy file "C:\Xxx_bin_deployableAssemblies.svn\all-wcprops" to "bin\.svn\all-wcprops". Access to the path 'bin\.svn\all-wcprops' is denied.
The story gets more convoluted, since this error is not thrown on another one of our developer machines, just on mine. The only real difference in our machines is that I have SP1 installed on mine.
Also when I updated AnkhSVN and re-checked out the app from the subversion server it work without throwing an error for the first build. After shutting my comp and then starting back up there error popped back up again.
Update:
I still haven't found a real solution. I just delete the .svn file in the folder and that takes care of the issue with Building the app. However, when I update or commit it throws an unversioned error.
I think the problem is that the app is trying to copy the .svn file over during the build, instead of just ignoring.
Do you know of any way to have the .svn file to be explicitly excluded from the build?
I need to resolve this issue asap, so any help is great!
Thanks
I received the same errors after I versioned my MVC 3 app for Azure on VS 2010 SP1. I was able to resolve this issue in three simple steps.
1.) From the VS 2010 Solution Explorer, click 'Show All Files'. This will show the hidden 'bin' and 'obj' folders in your Web/Worker role project. Right-click and delete both 'bin' and 'obj' folders.
2.) In Windows Explorer, browse to the folder that is versioned (should be your root solution folder). Right-click -> 'SVN Update'. This will download and put back the 'bin' and 'obj' folders that you deleted in VS. This is necessary because your project will exclude these folders from the solution, however SVN will still think they are part of it.
3.) The final step is to delete these files from your repository. In Windows Explorer, browse to the project that contains the 'bin' and 'obj' folder. Select the 'bin' and 'obj' folder -> right-click -> TortoiseSVN -> Delete. Go back to the root versioned folder and SVN commit to remove them from the repository.
The next time you build your Solution, the 'bin' and 'obj' folders will be recreated. Just make sure you don't add or commit them to your repository.
I fixed this problem by going into Windows Explorer and changing the properties of the folder to not index (look in advanced settings) and then manually copying the files giving me errors.
I had the same problem and fixed it.
You have your build output checked into SVN. This Azure target (that's complaining) should only be messing with \bin, \obj directories during a build. It will be cleaning and building. This clashes with .svn as source controlled files under .svn have hidden files and folders with read-only access. Therefore the build runs and subsequently breaks when the Azure targets try to delete/move the .svn files.
To fix just remove your build output from SVN (anything in \bin or \obj). You should not be placing these files into source control anyway as the rest of the files in SVN produce this output, so there is no reason to save it separately. Then you can delete the bin/obj etc folders and you should no longer experience the issue.
If you just delete the bin and obj files as other people have suggested then you're just leaving the problem for the next poor sucker that checks out a clean.
I had the same problem. It appear that the project bin folder was "accidentally" also committed into the svn. After removing the bin which of course shouldn't be in the svn the problem was solved.
Now it is still needed to understand why the build try to copy the sv folder to the bin.
Somehow another application keeps the file locked while Subversion (below AnkhSVN) tries to replace it with a different version.
Usually this is caused by a virus or index scanner. Retrying a bit later usually resolves this issue.
Sometimes a Subversion "Cleanup" (Solution explorer->(relevant node, E.g. Solution)->Subversion->Cleanup) is required to recover from similar errors.
I also had this problem. The cause for me was that I had created the bin directory myself instead of letting VS create the bin directory. Once I deleted the bin directory cleaned the build and did a rebuild, everything worked fine.

Resources