Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
When I open the existing project in C#, it shows me a character * next to Form1.cs and designer, so I get Form1.cs* and Form1.Designer.cs*, but I didn`t make any changes yet. This is showing me every time I open this project.

How to fix this?
Posted
Comments
marcel zol 2-Jan-13 8:16am    
Thanks for your replays. First I made a back up, then solved it by opening the project and undo, it shoved me a message: Am i shore to undo.... , selected Yes and save it again.
Nothing was changed not even a space between characters, words,...
But it looks like it worked - for now.
marcel zol 20-Jan-13 10:13am    
It worked for a while, but now it happened again. Why if i didn`t make any changes? I am saving it constantly and still showing me that something changed in project.
Sergey Alexandrovich Kryukov 1-Mar-13 13:54pm    
Please stop posting non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA

This can be a very annoying problem and the only time I have seen it happen is when controls are docked.

I assume that it occurs when there is a conflict between the size the control actually is and the size that docking would want it to be. A control that behaves properly when docked will stretch to fill one or more axes of it's container control. Visual Studio (VS) has a problem when a control cannot stretch, maybe because the control is not designed to stretch, or possibly due to constraints imposed by the control's property settings.

To see it happen, take a TextBox with the Multiline property set to false, place it on an empty form and try different Docking arrangements.

When docked at the top or bottom the TextBox can obey the request fully and stretches to fill the width of the form.

Now try docking to the left and notice that the TextBox cannot stretch vertically because it is constrained to a single line. When the form is closed and reopened it is always marked as changed by VS. Set TextBox.Multiline = true to allow the TextBox to stretch vertically and the close/reopen problem goes away.

With the single line, left docked TextBox there is one situation where the reopened form will not be marked as changed. It's not easy to do but occurs when the Form's size is adjusted so that the TextBox fits exactly in the vertical dimension. My assumption is that now there is no conflict and VS is quite happy because the TextBox height requested by docking is the same as it's actual height.

I use VS C# Express 2005 and believe that I just have to put up with the problem. I've no idea if it's been rectified in the more recent versions.

Alan.
 
Share this answer
 
You also get this if the files are stored in a source control system and arrive on your system (Windows?) with incorrect line termination. In other words, all Microsoft operating systems want to see "\r\n" as terminators and all unix/linux want "\n". You probably have your source code management system (incorrectly) leaving the files in linux form when the data lands on your PC. When you then open Visual Studio, it recognizes the line format it doesn't like and converts all "\n" to "\r\n", but does not save the files (presenting the "*"). I think you'll find that if you just save the files, exit Visual Studio, and start Visual Studio again that the files are not changed the second time.
 
Share this answer
 
It must disappear if you save the solution. This will fix your problem hopefully
 
Share this answer
 
This means that you have unsaved data.So please save it.
 
Share this answer
 

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