visual studio keeps asking to save project file as - visual-studio-2010

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

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

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

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.

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.

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

Related

Visual Studio builds are reverting code to pre-correction states

So, new to .NET Core and going slow. Followed a standard tutorial for ASP.NET Core MVC app using Entity Framework to connect to MSSQLLocalDB - this went well.
Converted the application to connect to MySql, and went equally well,
Changed the name of a table on MySql to Interests from Interest, and after a bit of fiddling around this to was put to bed, that is it was working as expected.
Went to run the application today and I get:
There were Build Errors Would you like to continue and run the last successfull build.
Code has reverted to Interest, from Interests in several places in Obj files,
for instance "Create.cshtml.g.cs"
Corrected the code and went to run, the same build error pops up, and all corrections are undone.
I make the changes again, save the files, exit VS, reload, the changes are as they should be, run and it reverts all changes, failing again.
I thought this might be some sort of cache issue so deleted the obj folder, again corrected the entries, but again run the build and the corrections reverted!
I solved this issue on my machine by changing the cshtml file properties. Right click the chstml file in the Solution Explorer window, click on Properties in the context menu.Then in the Properties window, change the "Copy to Output Directory" to "Copy if newer". Then make sure "Build Action" is set to "Content".

SSIS script task "The binary code for the script is not found"

This problem is very similiar to those:
"The binary code for the script is not found" and
The binary code for the script is not found” ssis
I have an SSIS project with multiple script files. SSIS claims that one of them has no binary even though there should be. There are no code errors, and I can build it properly. I suspect it's a VS bug because this problem appears and disappears randomly. What I mean by that is that this script is working fine, I open it to see the contents, close and suddenly this error happens! So I open it like 20 times, and it (without me doing anything) repairs itself! Any ideas on how to make it work better? It seems (though I can't confirm with 100% certainty) that this problem happens when you save the SSIS script (as in use ctrl+s) instead of simply exiting from the VS.
Things that I have tried that sometimes work:
Restarting Visual studio, opening the script without doing anything, closing it
Adding a small change to the code, exiting
Removing and adding breakpoints
Going on my knees in the direction of Redmond, Washington, and chanting the names of M$ presidents while opening and closing windows in the building to the rhythm of the windows starting sound
Randomly closing and opening the project, as well as going through items in the script component menu
Things that don't seem to work: rebuilding project, cleaning project, you know the standard stuff
I've found a solution that OFTEN works. Notice the usage of often.
1) Try restarting your computer.
2) If it doesn't work go to your system temp files directory, and find the location of SSIS temp projects (you can also open the script, right click on C# project, explore in windows explorer). Delete the project. (Make copies before deleting just in case). Start Visual studio, and once again edit script, close, hope it works. DON'T SAVE THE SCRIPT PROJECT BEFORE CLOSING! JUST CLOSE!
Note that for the second step, you can also try using a cleaning tool, like CCleaner of similar.
In my case, I did some idiotic changes to main package solution config manager and tried changing the "Target SERVER Version". That wiped out all the scripts project from each packages. Then I came to know that it is auto-generation everytime we open. That means each package is storing script project within it. But now I don't know why its not generating while pressing on "Edit Script button" (really pissed!)
Thank for suggestion. In my case, I did some idiotic changes to main package solution config manager and tried changing the "Target SERVER Version". That wiped out all the scripts project from each packages. Then I came to know that it is auto-generation everytime we open. That means each package is storing script project within it. But now I don't know why its not generating while pressing on "Edit Script button" (really pissed!)
"Lucky I am" . got an fix! Each package file was internally not linked with their Script.cs. So I opened each package file in Notepad++ and found Script.cs content within. I recreated scripts.cs in each package (steps) and pasted the content from notepad++. And it worked!!!

How to clear Visual Studio workspace

I have a workspace in VS2015 (same problem in 2013) that I'm trying to completely remove and start fresh with a copy from the server. To clarify, I want none of the files or changes that currently exist and I want to start completely fresh with the server copy of all files. I don't know how to correctly do this, however. I've deleted the workspace, the actual files that the workspace pointed to, and I've cleared the cache locations below, but VS still shows that the workspace exists and won't fix itself. In fact, it still shows the mapping even though I've triple-checked that it's deleted.
I'd like to avoid using devenv /reset since I'm pretty customized and I don't want to fix all of it, but I'll do it if it's unavoidable. How can I accomplish this?
Locations cleared/deleted:
%LocalAppData%\Temp\<all VS files/folders>
%LocalAppData%\Microsoft\Team Foundation
%LocalAppData%\Microsoft\VisualStudio\<version>\ComponentModelCache
On the window where you can get a specific change set from TFS, get the changeset with id "1". This is the situation just before the project was created - empty!
Right mouse om project node in solution explorer
Source Control > Get specific version
Version type "change set"
Input change number "1" (without quotes)
Click "Get"

Error message and empty list of build definitions in VS2012 after adding favorites

We have a bunch of build definitions available through TFS, and these were visible under Team Explorer - Builds in VS until a few minutes ago, when I tried to add a couple of them to "Favourites".
All I did was right click a build definition, and select "Add to favorites", then repeat the process for another build definition:
The result however, is a now empty list of build definitions - I can't seem to find any of them again. Furthermore, I get the following error message:
An item with the same key has already been added.
Any ideas how to fix this? Anyone know where the list of "favorites" is stored? (My reasoning is that if I can find and empty that list, then perhaps this issue would disapear?)
I ran into the same issue today. I was able to resolve it with the following steps.
Close Visual Studio
Open C:\Users[username]\AppData\Local\Microsoft\Team Foundation\4.0\FavoritesStore
Move the xml file from that folder to some other location
Start Visual Studio, open team explorer and navigate to Builds
At this point, the Builds pane opened without the error and "My Favorite Build Definitions" was empty
Moved the xml file back to its original location
Refresh the builds pane.
After refreshing, my favorite build definitions were back!
You may try (this helped to me with the same issue) to delete all the files in the following folder and restart VS2012 (Source):
C:\Users[USERNAME]\AppData\Local\Microsoft\Team Foundation\4.0\Cache
This issue occurred for me today when I had a mystery dialog open and it was blocking user input. I could not locate it or bring focus to it. I had to force a shutdown of VS, and after restarting my favorites were corrupt.
I found you can delete the cache for the favorites directly and restart the IDE. As soon as it launches you will see that VS will recreate the folder, and as soon as you add your first favorite a new favorites file will be created at that location.
C:\Users\\AppData\Local\Microsoft\Team Foundation\4.0\FavoritesStore
Writing an application or clearing the adjacent Cache folder are not necessary.
Favourites are stored in metadata on the user or group. You'll need to write an app to clear them.
http://geekswithblogs.net/TarunArora/archive/2012/10/18/tfs-api-add-favorites-programmatically.aspx

Why does vwd.webinfo always get automatically checked out from source control?

We have a 2008 solution that has a file system website as part of the solution. This solution is under source control with Team Foundation Server. Every time the solution is closed it either checks out a file called vwd.webinfo or attempts to and complains that someone else already has it checked out.
Removing the file from source control does not fix the issue because it gets re-added automatically for some reason.
Why does this happen and is there something we can do about it to remove this nag?
Thanks a lot!
open "source control explorer"
find vwd.webinfo in the correct path
click "delete"
chek-in the operation to solve this problem
The file will still be in your file system and solution, but not under source-control. You won't see "plus" or "v" or "lock" button
Go to Property Pages, select Build on the left, and uncheck "Build Web site as part of solution" Then you can delete the file and it won't get created automatically.
You should be able to delete this file manually and have it not reappear. This file holds some information that used to be located elsewhere in the project in earlier versions but apparently is not necessary. Close your solution before deleting the file from source control and on the disk.

Resources