If anyone have any clue at all, it would be welcome. I got the same problem last year, and we end up ghosting my computer. 9 month later, I got the problem again ...
Whenever I open a project, if I open a form in my designer, the resx files get automaticly checked-out and modified as I open it.
( we have an auto-check out policy at work that force you to check out a file WHEN YOU MODIFY IT, to avoid 2 programmer working on the same stuff. its not support to check out when I'm just "reading" a file. I just compared with other poeple, and it works correctly for everyone but me.)
The above image is what I saw when I debug the program, I didnt checked-in anything. I just did a getlatest, and debugged.
Whenever I open a form, The width property of the form gets overwritted down to 770 pixel instead of the regular 950. the image data used on our button gets resize smaller too by ±10 pixel width and height.
Another exemple : this is what I saw when I compared my last resx file checked in from last night. I didnt modified the design or moved anything in the designer at all, it just happened to be open while I was working.
remove the .suo file?
while the solution is closed remove the .suo file and then open the solution to recreate it. it may be restoring the screen sizes from when you last opened the file.
Old bug date from vs2003 ...
my screen DPI wasnt the same as the guy who 1st build the winform ... which cause the desginer to replace all the anchors et fonts et whatnot ...
check out this post for more details : DPI
Related
Any time I try to use an image from my local machine, I get an error from VS Code saying "An error occurred while loading the image. Open file using vs code's standard text/binary editor."
The original drag and drop of the image into the file functions as in I can see the image in the text editor but if I click onto another file/folder and back onto the image file, I get this error. This is happening in this instance while trying to use a .ico file but it has been happening for about a week now with any image I try to use (.png, .ico, .jpg, etc...). I am on a Windows 10 machine and memory is not an issue.
I have tried disabling all extensions, replacing the file with another, making sure VS Code is up to date and completely closing VS Code and re-opening it.
Alright, I got the same issue last week, and this was how I fixed it:
Go to where you saved the project on your laptop, then drag and drop the images there. This should reflect in your VS Code.
Once the images were added through this route, they would not bring the initial error.
Let me know if you got what I said or if a short video will help!
Is anyone else noticing this? When I edit a file in Xcode 5, it does not (like in Xcode 4) darken the icon for the file. This would be visible at the title bar and also in the file navigator.
Looked around in Preferences but didn't find anything.
Also, I thought maybe it meant that any time you edited a file it would auto-write the file, but it does not appear to do this either.
My experience with Xcode 5 is that it automatically saves all your files for you. I can't comment on how often the files are actually written to disk but using the Mavericks Beta since day 1 and having had some crashes I never lost a line of code (not even a letter).
So there doesn't need to be darkened file icon anymore since no file will ever have pending changes that need to be written to to disk.
If your project is set up to use version control, the Project Navigator will display an 'M' to the right of modified files and an 'A' for new files. Is that what you're looking for?
I created forms and functions in a draft project. When it was time to put it to the final project, I tried adding my files but a blue lock icon appeared just on the left of my file. Now I cannot edit my forms.
I need to get rid of the lock so I can edit. The worse part is, my VB6 is in Japanese so I do not know where to look for properties. Please help!
Anyway, I solved it already. I imported it first and maybe that's what prompted the VB6 to have the forms locked because they were created in a different project. I edited it using the draft project and copy-pasted the edited files to the Final Project's folder. This time, the blue lock disappeared.
I'm working on a project in Visual Studio 2012, that's hosted on TFS.Any way, I don't know if it's due to lack of sleep or sheer carelessness, when trying to move one large function body from one file to another, I copied the declaration to the new file, but forgot to copy the body and then erased the body from the old one, clicked save by reflex and closed the first .cpp file, so when I pasted it in the second one, to my surprised I pasted the declaration and not the definition.Undo pending changes would only undo the 'Add' alltogether.Is there ANY way to retrieve the lost source or should I start rewriting it ASAP?Because I spend quite a while writing it.
View the history of the file. Right click it >> Source Control >> View History, as below:
This obviously assumes you've checked it in at some point.
Under Visual Studio you have several levels of Copy / Paste, so you could have retrieved it by pressing CtrlAltIns (if I remember well).
If you still haven't closed Visual Studio, it might still be in your Copy / Paste ring, it might be worth giving it a try.
Otherwise, you can always rollback to a previous check-in state in your TFS server (if you checked in the code you want before you deleted it).
First, check-in your current state to the server. Then rollback to the previous version that had your code (right click your solution, then Source Control -> Get Specific Version). Now copy your code in a side editor. Re-go to the latest version (Get latest Version... on your solution). Now re-paste your code at the right place and you're done.
If CTRL+Z doesn't work inside VS, go to the empty folder of the deleted files and try CTRL+Z there. Has worked for me several times.
Is it possible to open a project in Visual Studio 2008 without opening all the files that were previously opened last time I had the project open. I have a habit of keeping many files open as I am working on them, so next time I open the project, it (very slowly) loads up a bunch of files into the editor that I may not even need open. I have searched through the settings and cannot find anything to stop this behavior.
Simply delete the .suo file.
It contains the list of open files.
A bit of research turns up the fact that you can do it with a macro:
Create a new macro (or use an existing one). You should see a module called EnvironmentEvents in Macro Explorer. (For details, see here.)
Open the EnvironmentEvents module.
Put in this code:
Public Sub CloseDocsOnExit() Handles SolutionEvents.BeforeClosing
DTE.ExecuteCommand("Window.CloseAllDocuments")
End Sub
Save and Build the macro.
Open a whole bunch of documents in your solution, then close Visual Studio.
Yay! No more open documents!
(Note: Despite that it says SolutionEvents, it also works if you're working on a project that doesn't have a solution.)
I never realized how much that annoyed me as well! I haven't been able to find a setting, but in Options > Environment > Keyboard you can bind a shortcut to Window.CloseAllDocuments. ALT+X was unbound for me so I just used that. I'm interested if there's some hidden setting to automatically do this on solution exit though (or load).
Edit: Totally read the question wrong at first - ignore my first (now gone) answer. :)
I changed the keyboard mapping for CTRL-SHIFT-C from bringing up the Class View to closing all document windows - something I use several orders of magnitude more often - and then I just clear my workspace before closing a solution.
Try the following:
Close the program after closing all files.
Make a copy of [whatever].suo
Open the solution again, open some files, and exit.
Copy (don't move) the old .suo file over the one that was just generated.
Make the .suo file read only.
If you have a repository you might want to check that file in.
I suggest this because I was having the reverse problem, where it wasn't opening my old files automatically, and the cause was a .suo file that had been checked into the repository and was (for some reason) not being overwritten by Studio. The file wasn't even write protected.
I was hoping for something a little more automatic. VS will create a new .suo file every time the project is saved. So I would have to delete that file every time I open the project. I also don't want to have to remember to close all the files before closing VS.
Other IDEs that I have used have similar functionality, but also make it rather simple to turn on/off.
Thanks for your help.
Or you can close all open document from the Window menu before closing VS.
In Visual Studio 6.0 (VC++), the procedure is slightly different.
Delete the .ncb file (located normally in the same place as your .dsp or .dsw files).
The only way works for me is : change the project location and again reopen the solutions form there. :)