I have encountered some weird behaviour in VS2010. When I perform a Find in Files for some text, and select Entire Solution in the Look In field, I get back file that are not part of my solution in the Results window. I have checked to see if these files have been accidentally added to my solution and cannot see them in the Solution Explorer, so can anybody tell me why this is happening, and how I can prevent these files showing up in my search, as I could accidentally enter one to make changes without realising they are the wrong solution.
Thanks,
Michael
Performed a Clean Solution and that seems to have stopped the files appearing. Would love to know how it happened though.
Related
I have (for me) interesting problem, in Cocoa Project I created file "Credits.rtf" for testing custom text for this window... but I tried to change type from Credits.rtf to Credits.html and after this (even when I delete file and reference to this file too) the "About" window always showing below mentioned text and I dont know how is the way to change it, even when I replace reference and file by completely new Credits.rtf file (and XCode shows that this reference is exists and asked me if I want to replace it)
I think that solving this must be absolutely easy, I tried to find any idea but without success
Could you help with this? Thanks in advance
Maybe you are thinking that I'm absolute moron, maybe it is bug or I dont know, but I wish to solve this and knowing how to solve same issue in future :)
Thanks once again
Assuming you've definitely, absolutely, certainly replaced it with a real RTF file that opens in TextEdit without fail, then you may just need to clean and rebuild your project. With the project open, press Cmd-Shift-K. When Xcode is finished, build and run and see if it changes.
If not, you'll need to post a lot more detail. Perhaps an example project somewhere shared online.
I shutdown a VS2010 project yesterday and everything was working well. I opened it up today and one of the .cpp files has green formatting on the parenthesis, semi-colons, and colons (see attached photo). Auto-complete is also not working.
I've deleted the .sdf file for the project, as that usually fixes the auto-complete issue. This did not work. Additionally, the broken .cpp file is still identified by VS2010 as a C/C++ file. Google doesn't seem to turn up any folks with similar problems.
Has anyone encountered this issue? How can I fix it?
I have experienced a similar thing before, though in VS2012. What I ended up doing was building the solution in release mode, then switching back to debug mode and re-built it again.
Well, after trying a few things, I finally figured it out. I right clicked on the .cpp file that was acting weird, selected "Exclude from Project". Then re-add the file back to the project and it seems to have fixed the problem. Don't know why it happened in the first place, VS2010 must think it wasn't a .cpp file or something.
I'm using Visual Studio 2010 with VisualHG and TortoiseHg. I've noticed that if I move or rename a file using the Solution Explorer, a little [R] appears next to the file, which I assume indicates "renamed". However, if I go to commit my changes in TortoiseHg, it doesn't perform a rename--it deletes the old file and adds the new one. This causes all the history for the file to be lost (and bloats the repo unnecessarily).
Is there any way to get this to work properly? There's really very little benefit to using VisualHG if it's not going to coordinate file renames properly with TortoiseHg.
Also, I should mention that TortoiseHg has a "Detect Copies/Renames in Solution" dialog, but I can't seem to get it working. First, I can't seem to find any button or menu item in the TortoiseHg Workbench to launch it. Second, if I launch if using the terminal by entering thg guess, no path appears in the Unrevisioned Files box (and there's no apparent way to add one). I made sure I was navigated to the correct directory (my solution directory, which contains my .hg repo) when I tried this. I also tried thg guess solution_directory_path, but that made no difference. If this dialog is a possible solution to my problem, how do you actually use it?
Edit
I finally figured out that you can access the "Detect Copies/Renames in Solution" dialog by right clicking the solution folder in Windows Explorer, and selecting TortoiseHg > Guess Renames. When I do this, however, again, no path appear in the Unrevisioned Files box, so I still can't get started with this dialog. (I.e., I can't even perform step 1 in these instructions.)
Edit 2
I found a bug report on the VisualHG CodePlex issues page that I think explains the problem I'm having: https://visualhg.codeplex.com/workitem/99. I'm kind of surprised it hasn't gotten more votes, though.
After further investigation, I realize that, even though the files were shown as removed/added in TortoiseHg Workbench, they in fact were renamed correctly.
If you click a file with a "+" next to it in the Workbench, if that file was in fact a rename, the header for the code window will show something like this:
Project/Folder/RenamedFile.cs (renamed from Project/Folder/OriginalFile.cs)
After reading a bit more about what Mercurial is really doing, it sounds like it actually is deleting and adding, it's just that the added file maintains a reference to the original, so you can still view the history across renames.
I'm not sure if this explains the problems I was having with "Detect Copies/Renames in Solution", but I'm now satisfied that renames are being handled properly.
Apologies. I am sure I should know where to look to deal with this but I do not:
The error below has appeared in my solution. I am not aware of why.
The item
"obj\Release\ScruffyDuck.AirportDesignEditor.MainForm.resources" was
specified more than once in the "Resources" parameter. Duplicate
items are not supported by the "Resources" parameter. Airport Design
Editor
Perhaps someone would be kind enough to put me out of my misery and tell me where to look.
Thanks
OK I found it. I have no idea how it happened. However it might be useful for the future. MainForm has a number of files containing different parts of the class. The main part has all the designer code and so on. Somehow a .resx file got created on one of the partial class files along with an InitializeComponent() method. Removing the extra .resx file got as far as reporting the duplicate method and removing that allowed the solution to compile again. It seems that though the file names are different (the error was in MainForm.EventHandlers) the two resx files are treated as the same even though they have different names.
I am now getting some exceptions but at least I can get the code running in the debugger again.
I think you'll have to open your .csproj file, and look for that file name. It sounds like ScruffyDuck.AirportDesignEditor.MainForm.resources is appearing more than once. Just remove the duplicate node (.csproj files are just xml).
Just remove obj directory from HD manually.
Clear solution from Visual Studio (Right click on project in SolutionExplorer and select "Clear")
Rebuild solution.
Cause could be a fault of generated resource file, due some conflicts happened in your project.
Should work.
Regards.
Just recently, when I open a solution in VS2010, I get modal dialog boxes in the form
"Project c:\XXXX\YYY\ZZZZ.csproj, which
you are getting from the source
control store, already exists. Would
you like to overwrite it with the
store version, or leave your local
copy?"
With the options Overwrite, Overwrite All, Leave and Help. I get one of these dialog boxes per project in the solution, unless I click Overwrite All. Either of the Overwrite options appears to do a get for every file in the project(s), which as you can imagine is time consuming for a large solution. And clicking Leave for every project in a large solution is also time consuming.
The obvious cause is the option Source Control -> Environment -> Get everything when a solution or project is opened, however this is not turned on. I tried turning the option on and then off again, in case something was wrong with the option setting, but this did not solve the issue.
I've tried a few searches for this issue, but couldn't find anyone else suffering it.
Any help solving this would be appreciated.
I've also asked this question on Super User
Clear your Visual Studio Cache Settings and then try again.