[visual studio 2008] [英] [visual studio 2008]

查看:81
本文介绍了[visual studio 2008]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在C#中打开现有项目时,它会向我显示Form1.cs和designer旁边的一个字符*,所以我得到Form1.cs *和Form1.Designer.cs *,但我还没有做任何更改。每次我打开这个项目时都会向我显示。



如何解决这个问题?

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?

推荐答案

这可能是一个非常恼人的问题而且我唯一一次已经看到它发生在控件停靠的时候。



我认为它发生在控件实际大小与对接所需的大小之间存在冲突时它是。停靠时行为正常的控件将拉伸以填充其容器控件的一个或多个轴。当控件无法拉伸时,Visual Studio(VS)会出现问题,可能是因为控件不是设计为拉伸,或者可能是由于控件的属性设置所施加的限制。


要查看它,请将Multiline属性设置为false的TextBox,将其放在空的表单上并尝试不同的Docking安排。



停靠在顶部或底部的TextBox可以完全遵循请求并伸展以填充表单的宽度。



现在尝试对接到左边,注意TextBox不能垂直拉伸,因为它被限制在一条线上。当表单关闭并重新打开时,它总是被VS标记为已更改。设置TextBox.Multiline = true以允许TextBox垂直拉伸并且关闭/重新打开问题消失。



使用单行,左对接TextBox有一种情况重新打开的表单不会被标记为已更改。这并不容易,但是在调整Form的大小以便TextBox完全适合垂直维度时会发生。我的假设是,现在没有冲突,VS非常高兴,因为对接请求的TextBox高度与它的实际高度相同。



我使用VS C#Express 2005并相信我只需要忍受这个问题。我不知道它是否已在最近的版本中得到纠正。



Alan。
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.


你也如果文件存储在源控制系统中并且到达您的系统(Windows?)并且线路终止不正确,请获取此信息。换句话说,所有Microsoft操作系统都希望将\\\\ n视为终结符,并且所有unix / linux都希望\ n。你可能有你的源代码管理系统(错误地)当数据落在你的PC上时,将文件保留为linux格式。然后当您打开Visual Studio时,它会识别它不喜欢的行格式并将所有\ n转换为\\\\ n,但不保存文件(显示*)。我想你会发现,如果你只是保存文件,退出Visual Studio,再次启动Visual Studio,第二次不更改文件。
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.


如果你,它必须消失保存解决方案。这有望解决您的问题
It must disappear if you save the solution. This will fix your problem hopefully


这篇关于[visual studio 2008]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆