我有一个包含2个项目的解决方案,我想发布这个应用程序。当我尝试安装时遇到问题。它说它找不到我正在使用的txt文件。在我的应用程序中,我也使用了其他2个txt文件,它没有显示有关这些2个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)调试,请使用.config文件 应用程序或计算机(machine.config)必须具有 在system.windows.forms部分中设置的jitDebugging值。 还必须使用调试编译应用程序 启用。
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用JIT调试时,任何未处理的异常 将被发送到计算机上注册的JIT调试器 而不是由此对话框处理。
答案 0 :(得分:0)
该文件不存在。
文件是在运行时创建的吗?
如果未将其包含在您的解决方案中并将其标记为“内容”,请选择复制选项“始终复制”,“复制新内容”,“不复制”。
答案 1 :(得分:0)
检查有效文件和不可用文件的属性。有可能你有问题文件集,所以它不复制,级联到不发布。