Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
whenever i take a new get of my project from tfs 2012 and try to publish it,it gives me error like "Unable to copy from obj\debug.... to bin\debug....."
To remove this error ,i need to remove read only from obj and bin folders.I want to get rid of this errors once and for all.How can i by default remove read only from these two folders.
Help Me Please...
Posted
Comments
Jameel VM 1-Sep-14 6:26am    
Right click the folder and select properties and uncheck the readonly checkbox. After that try to build.
pwavell 1-Sep-14 6:29am    
i know this solution as i stated above, but i dont want to do this everytime.i need a permanant solution for this
[no name] 1-Sep-14 6:39am    
Sure. Remove those directories from TFS. They are not needed for source control and that is what is marking them readonly.
pwavell 1-Sep-14 6:44am    
But bin contains some dlls which i have referenced in my project.Removing these folders from tfs wouldnt give errors while building or publishing site?
[no name] 1-Sep-14 8:17am    
It wont unless you do not know how to setup your projects.

1 solution

Those Folders shouldn't be in source control. If you need (copied) references better create an "include" folder (and or use project references where possible).
Be happy you found this problem with your project structure, now it's time to change it.
Put everything you need for "production" (could also mean testing) into dedicated folders and check in those. Follow the rule that it should always be save to delete the complete bin and obj folders and after a rebuild everything should work again.
 
Share this answer
 
Comments
pwavell 1-Sep-14 8:36am    
you mean i should create a new folder and place all my dlls into that new folder instead of bin folder and then add references to these dlls into my project,and delete obj and bin folder..ok i will try it
johannesnestler 1-Sep-14 9:02am    
exactly - as a historical C++ programmer I'd name such folders "include".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900