在Visual Studio 2008中发布解决方案时出现问题
本文关键字:解决方案 问题 Visual Studio 2008 | 更新日期: 2023-09-27 17:57:42
我有一个包含两个项目的解决方案,我想发布这个应用程序。当我尝试安装时,我遇到了一个问题。它说找不到我正在使用的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)必须具有jit在system.windows.forms部分中设置的调试值。应用程序还必须通过调试进行编译已启用。
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用JIT调试时,任何未处理的异常将发送到计算机上注册的JIT调试器而不是由该对话框处理。
该文件不存在。
文件是在运行时创建的吗?
如果未将它们包含在解决方案中,并将其标记为"内容",然后选择复制选项"始终复制"、"如果是新的则复制"answers"不复制"。
检查工作文件和不工作文件的属性。很可能你有问题文件集,所以它不会复制,这会导致不发布。