错误:无法找到路径

时间:2013-02-17 12:38:31

标签: c#

我有一个小问题,现在让我生气了。我的代码中有一个小错误,然后我发现了错误,一切运行良好 - 几乎。我必须找到解决方案中存档的路径,现在我找到了它。但是,如果我打开表单的设计,它会给我错误

“无法找到路径的一部分'C:\ Windows \ system32 \ Source \ ChampsList.txt'”

在线上,它应该是问题所在,什么都没有。我可以忽略这个问题,一切运行良好。但是,我仍然讨厌这个:

this

由于

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(1083, 569);
        this.Controls.Add(this.guides1);
        this.Controls.Add(this.MainMenu); // this is line where "is" mistake
        this.Controls.Add(this.Panels);
        this.Controls.Add(this.Strip);
        this.MainMenuStrip = this.MainMenu;
        this.Name = "MainProgram";
        this.Text = "Porgram";
        this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
        this.Load += new System.EventHandler(this.AppLoad);
        this.MainMenu.ResumeLayout(false);
        this.MainMenu.PerformLayout();
        this.Strip.ResumeLayout(false);
        this.Strip.PerformLayout();
        this.Panels.ResumeLayout(false);
        this.ResumeLayout(false);
        this.PerformLayout();

调用堆栈:

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at System.IO.File.ReadAllText(String path)
at HelpApp.Guides.Guides_Load(Object sender, EventArgs e) in c:\Users\Lukáš\Documents\Visual Studio 2010\Projects\HelpApp\HelpApp\Guides.cs:line 28
at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(Control c) 

0 个答案:

没有答案