13

I am using VS 2010 and recently I moved some files around and changed paths etc.

The solution still compiles correctly and all files are able to be loaded/compiled without error however just about every time I go to compile after a change it gives me the save as dialog and asks me to save one of the projects, if I try to give it a new name or something the dialog does not exist nothing I do can make it exit apart from pressing cancel.

If I do a build straight after cancelling it works fine and I'm not presented with the save as dialog. I have verified that the project file is not read only.

Any ideas as to whats going on here.

The solution is stored in TFS 2008

Daniel Powell
  • 8,143
  • 11
  • 61
  • 108

5 Answers5

12

You need to do 2 things
1- remove the read-only tick from the project folder
2- when a save-as window prompts at build, just overwrite the project
next time you build, the window won't pop up

Samer_Azar
  • 413
  • 2
  • 9
  • 32
  • 1
    I did this - and rebooted, that released the file lock and it saved as normal after that. – niico Nov 06 '17 at 13:52
  • where do you remove the read-only tick from the project folder? where is this located? i already removed the read-only tick in the filer explorer, properties of the project folder, and still cannot overwrite. It says "it's being used by another process" – winux Jun 25 '20 at 04:00
  • @winux you need to kill all the dependent processes – Samer_Azar Jun 28 '20 at 01:19
  • @Samer_Azar it doesn't say what process its dependent on. I resolved it by restarting the pc. Thanks anyways. – winux Jul 01 '20 at 19:07
4

You need to run VS as administrator. (right click on VS Icon- Run as administrator)

Mike
  • 41
  • 2
3

I solved the issue. When I try to save as this time it gives the error that file is being used by another process. Google Sync prevents to save so it opens save as dialog. You should put your project under a folder not sync while working.

  • This was exactly my problem. Thank you! I didn't get the "in use by another program" error though. Now I just pause the sync routine while I'm working on something in my Workspaces folder and then resume the sync when I go home for the day. – HDL_CinC_Dragon Mar 13 '20 at 20:32
  • This is also my problem just now. Before it was able to save properly. I don't remember any changes i made that makes the folder "it is being used by another process". I cannot just move the project to another because of the changes i made and i need to save them all first. – winux Jun 25 '20 at 04:04
  • You can pause if any sync is working at the moment. – Bayram Kaşıkçıoğlu Jun 26 '20 at 06:48
1

Are the bindings in TFS set up correctly with the new location? TFS will mark files as read only unless they get checked in. It might have been marked as such before you moved everything around, and now, isn't being checked out properly.

Paul McLean
  • 3,450
  • 6
  • 26
  • 36
  • In Visual Studio, File -> Source Control -> Either 'Change Source Control' or, if it's not bound to any TFS project, you might see something like 'Bind to Source Control' – Paul McLean Jun 29 '11 at 00:22
  • all looks to be correct, the status for all of them says valid and all the paths look right – Daniel Powell Jun 29 '11 at 00:26
  • Hmm, have you checked if the project file is read only? TFS bindings may not be the culprit, but I'd like to see if that is the root cause. – Paul McLean Jun 29 '11 at 00:46
  • I've tracked it down to happening when I do something that would modify the proj file and then compile. If I start with everything checked in the proj file is read only, if I add a new file to the proj it is made no read only and then when I build it asks to save as – Daniel Powell Jun 29 '11 at 01:04
0

Also, try closing sync. files tools like google backup and sync.

amr osama
  • 1,129
  • 2
  • 18
  • 34