C# 在Visual Studio 2008中发布解决方案时出现问题

C# 在Visual Studio 2008中发布解决方案时出现问题,c#,visual-studio,visual-studio-2008,C#,Visual Studio,Visual Studio 2008,我有一个包含2个项目的解决方案,我想发布此应用程序。当我尝试安装时,我遇到了一个问题。它说它找不到我正在使用的txt文件。在我的应用程序中,我还使用了另外两个txt文件,这两个txt文件没有问题。错误如下所示。有人知道问题出在哪里吗?提前谢谢你 有关调用的详细信息,请参阅此消息的结尾 即时(JIT)调试,而不是此对话框 ************** Exception Text ************** System.IO.FileNotFoundException: Could not f

我有一个包含2个项目的解决方案,我想发布此应用程序。当我尝试安装时,我遇到了一个问题。它说它找不到我正在使用的txt文件。在我的应用程序中,我还使用了另外两个txt文件,这两个txt文件没有问题。错误如下所示。有人知道问题出在哪里吗?提前谢谢你

有关调用的详细信息,请参阅此消息的结尾 即时(JIT)调试,而不是此对话框

************** Exception Text **************
System.IO.FileNotFoundException: Could not find file 'C:\Users\Δημήτρης\AppData\Local\Apps\2.0\16302ORR.AW8\MB0AX4OD.0OL\auth..tion_4deb94c49aed6906_0001.0000_30081526368df596\checkStatus.txt'.
File name: 'C:\Users\Δημήτρης\AppData\Local\Apps\2.0\16302ORR.AW8\MB0AX4OD.0OL\auth..tion_4deb94c49aed6906_0001.0000_30081526368df596\checkStatus.txt'
   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)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path, Boolean detectEncodingFromByteOrderMarks)
   at AuthenticationApplication.Form1.Form1_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
AuthenticationApplication
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Δημήτρης/AppData/Local/Apps/2.0/16302ORR.AW8/MB0AX4OD.0OL/auth..tion_4deb94c49aed6906_0001.0000_30081526368df596/AuthenticationApplication.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
******JIT调试********* 要启用即时(JIT)调试,请为 应用程序或计算机(machine.config)必须具有 在system.windows.forms节中设置的值。 应用程序还必须通过调试进行编译 启用


启用JIT调试时,任何未处理的异常 将发送到计算机上注册的JIT调试器 而不是由此对话框处理。

该文件不存在

************** Exception Text **************
System.IO.FileNotFoundException: Could not find file 'C:\Users\Δημήτρης\AppData\Local\Apps\2.0\16302ORR.AW8\MB0AX4OD.0OL\auth..tion_4deb94c49aed6906_0001.0000_30081526368df596\checkStatus.txt'.
File name: 'C:\Users\Δημήτρης\AppData\Local\Apps\2.0\16302ORR.AW8\MB0AX4OD.0OL\auth..tion_4deb94c49aed6906_0001.0000_30081526368df596\checkStatus.txt'
   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)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path, Boolean detectEncodingFromByteOrderMarks)
   at AuthenticationApplication.Form1.Form1_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
AuthenticationApplication
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Δημήτρης/AppData/Local/Apps/2.0/16302ORR.AW8/MB0AX4OD.0OL/auth..tion_4deb94c49aed6906_0001.0000_30081526368df596/AuthenticationApplication.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
这些文件是在运行时创建的吗


如果未将它们包括在解决方案中,并将其标记为“内容”,然后选择复制选项“始终复制”、“新建时复制”、“不复制”。

检查可用文件和不可用文件的属性。您可能设置了问题文件,因此它不会复制,这会导致不发布。

我包括了所有三个文本文件,并将它们标记为内容,并始终进行复制。问题依然存在……我想补充一点,发布阶段是成功的。在这之后,当我尝试安装应用程序时,我遇到了这个错误…我包括了所有三个文本文件,并将它们标记为内容,以便始终复制。问题仍然存在…文件不是在运行时创建的,而是我自己创建的。我想补充一点,发布阶段是成功的。在此之后,当我尝试安装应用程序时,会出现此错误…您是通过单击一次发布进行部署的吗。检查文件是否包含项目属性/发布属性/应用程序文件。另外,在发布选项上,在部署时取消选中“use.deploy文件扩展名”。