G
Guest
Error occurs on
"System.Deployment.Application.ApplicationDeployment.CurrentDeployment"
** Here is my code
private void frmMain_Load(object sender, System.EventArgs e)
{
System.Deployment.Application.ApplicationDeployment ad =
System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
this.Text = "Dealer Sales " + ad.CurrentVersion;
}
** Here is the error message
System.Deployment.Application.InvalidDeploymentException was unhandled
Message="Application is not installed."
Source="System.Deployment"
StackTrace:
at System.Deployment.Application.ApplicationDeployment..ctor(String
fullAppId)
at
System.Deployment.Application.ApplicationDeployment.get_CurrentDeployment()
at LicenseDealerSales.frmMain.frmMain_Load(Object sender, EventArgs
e) in C:\Documents and Settings\mikel\My Documents\Visual Studio
Projects\LicenseDealerSales\frmMain.cs:line 131
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
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.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef
hWnd, Int32 msg, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at LicenseDealerSales.frmMain.Main() in C:\Documents and
Settings\mikel\My Documents\Visual Studio
Projects\LicenseDealerSales\frmMain.cs:line 106
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext, String[] activationCustomData)
at
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext)
at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
"System.Deployment.Application.ApplicationDeployment.CurrentDeployment"
** Here is my code
private void frmMain_Load(object sender, System.EventArgs e)
{
System.Deployment.Application.ApplicationDeployment ad =
System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
this.Text = "Dealer Sales " + ad.CurrentVersion;
}
** Here is the error message
System.Deployment.Application.InvalidDeploymentException was unhandled
Message="Application is not installed."
Source="System.Deployment"
StackTrace:
at System.Deployment.Application.ApplicationDeployment..ctor(String
fullAppId)
at
System.Deployment.Application.ApplicationDeployment.get_CurrentDeployment()
at LicenseDealerSales.frmMain.frmMain_Load(Object sender, EventArgs
e) in C:\Documents and Settings\mikel\My Documents\Visual Studio
Projects\LicenseDealerSales\frmMain.cs:line 131
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
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.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef
hWnd, Int32 msg, Int32 wParam, Int32 lParam)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at LicenseDealerSales.frmMain.Main() in C:\Documents and
Settings\mikel\My Documents\Visual Studio
Projects\LicenseDealerSales\frmMain.cs:line 106
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext, String[] activationCustomData)
at
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext)
at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()