473,692 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display Publish Version Error


Error occurs on
"System.Deploym ent.Application .ApplicationDep loyment.Current Deployment"
** Here is my code

private void frmMain_Load(ob ject sender, System.EventArg s e)
{
System.Deployme nt.Application. ApplicationDepl oyment ad =
System.Deployme nt.Application. ApplicationDepl oyment.CurrentD eployment;
this.Text = "Dealer Sales " + ad.CurrentVersi on;

}
** Here is the error message

System.Deployme nt.Application. InvalidDeployme ntException was unhandled
Message="Applic ation is not installed."
Source="System. Deployment"
StackTrace:
at System.Deployme nt.Application. ApplicationDepl oyment..ctor(St ring
fullAppId)
at
System.Deployme nt.Application. ApplicationDepl oyment.get_Curr entDeployment()
at LicenseDealerSa les.frmMain.frm Main_Load(Objec t sender, EventArgs
e) in C:\Documents and Settings\mikel\ My Documents\Visua l Studio
Projects\Licens eDealerSales\fr mMain.cs:line 131
at System.Windows. Forms.Form.OnLo ad(EventArgs e)
at System.Windows. Forms.Form.OnCr eateControl()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef
hWnd, Int32 msg, Int32 wParam, Int32 lParam)
at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
at System.Windows. Forms.Control.s et_Visible(Bool ean value)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
reason, ApplicationCont ext context)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at LicenseDealerSa les.frmMain.Mai n() in C:\Documents and
Settings\mikel\ My Documents\Visua l Studio
Projects\Licens eDealerSales\fr mMain.cs:line 106
at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[] args)
at System.Runtime. Hosting.Manifes tRunner.Run(Boo lean checkAptModel)
at System.Runtime. Hosting.Manifes tRunner.Execute AsAssembly()
at
System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex t
activationConte xt, String[] activationCusto mData)
at
System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex t
activationConte xt)
at
Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem blyDebugInZone( )
at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state)
at System.Threadin g.ExecutionCont ext.Run(Executi onContext
executionContex t, ContextCallback callback, Object state)
at System.Threadin g.ThreadHelper. ThreadStart()

Feb 23 '06 #1
4 6369
You need to check ApplicationDepl oyment.IsNetwor kDeployed; if this returns
false there is no publication to get an application version from - so the
best you can use is the assembly version via something like
System.Reflecti on.Assembly.Get EntryAssembly() .GetName().Vers ion

Marc
Feb 23 '06 #2
Hi Cadel,
Thanks for Marc's reply!

I just wanted to check how things are going and whether Marc's suggestion
is useful for you. If there is any question, please feel free to join the
community and we are here to support you at your convenience. Thanks for
your understanding!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
Thread-Topic: Display Publish Version Error
thread-index: AcY4ktXA/ASPLjhKQMuzDVzX cMDU0w==
X-WBNR-Posting-Host: 204.87.106.66
From: =?Utf-8?B?TWlrZSBM?= <Ca***@nospam.n ospam>
Subject: Display Publish Version Error
Date: Thu, 23 Feb 2006 08:04:32 -0800
Lines: 74
Message-ID: <85************ *************** *******@microso ft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.langua ges.csharp:3879 90
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
Error occurs on
"System.Deploy ment.Applicatio n.ApplicationDe ployment.Curren tDeployment"
** Here is my code

private void frmMain_Load(ob ject sender, System.EventArg s e) {
System.Deployme nt.Application. ApplicationDepl oyment ad =
System.Deploym ent.Application .ApplicationDep loyment.Current Deployment;
this.Text = "Dealer Sales " + ad.CurrentVersi on;

}
** Here is the error message

System.Deploym ent.Application .InvalidDeploym entException was unhandled
Message="Applic ation is not installed."
Source="System. Deployment"
StackTrace:
at System.Deployme nt.Application. ApplicationDepl oyment..ctor(St ring
fullAppId)
at
System.Deploym ent.Application .ApplicationDep loyment.get_Cur rentDeployment( )
at LicenseDealerSa les.frmMain.frm Main_Load(Objec t sender, EventArgs
e) in C:\Documents and Settings\mikel\ My Documents\Visua l Studio
Projects\Licen seDealerSales\f rmMain.cs:line 131
at System.Windows. Forms.Form.OnLo ad(EventArgs e)
at System.Windows. Forms.Form.OnCr eateControl()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible) at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at
System.Windows .Forms.Control. ControlNativeWi ndow.OnMessage( Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m) at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd,Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef
hWnd, Int32 msg, Int32 wParam, Int32 lParam)
at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
at System.Windows. Forms.Control.s et_Visible(Bool ean value)
at
System.Windows .Forms.Applicat ion.ThreadConte xt.RunMessageLo opInner(Int32
reason, ApplicationCont ext context)
at
System.Windows .Forms.Applicat ion.ThreadConte xt.RunMessageLo op(Int32 reason,ApplicationCon text context)
at System.Windows. Forms.Applicati on.Run(Form mainForm)
at LicenseDealerSa les.frmMain.Mai n() in C:\Documents and
Settings\mikel \My Documents\Visua l Studio
Projects\Licen seDealerSales\f rmMain.cs:line 106
at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[] args) at System.Runtime. Hosting.Manifes tRunner.Run(Boo lean checkAptModel)
at System.Runtime. Hosting.Manifes tRunner.Execute AsAssembly()
at
System.Runtime .Hosting.Applic ationActivator. CreateInstance( ActivationConte x tactivationCont ext, String[] activationCusto mData)
at
System.Runtime .Hosting.Applic ationActivator. CreateInstance( ActivationConte x tactivationCont ext)
at
Microsoft.Visu alStudio.Hostin gProcess.HostPr oc.RunUsersAsse mblyDebugInZone ( ) at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state)
at System.Threadin g.ExecutionCont ext.Run(Executi onContext
executionConte xt, ContextCallback callback, Object state)
at System.Threadin g.ThreadHelper. ThreadStart()


Feb 27 '06 #3
The code brought a number back, but I don't know what it is.
I have the publish version set to 1.0.8.0 but the code brings back
1.0.2249.26117
My new code.

this.Text = "Dealer Sales " +
System.Reflecti on.Assembly.Get EntryAssembly() .GetName().Vers ion.ToString();
"Marc Gravell" wrote:
You need to check ApplicationDepl oyment.IsNetwor kDeployed; if this returns
false there is no publication to get an application version from - so the
best you can use is the assembly version via something like
System.Reflecti on.Assembly.Get EntryAssembly() .GetName().Vers ion

Marc

Feb 27 '06 #4
Hi Cadel,
Thanks for your response!

The version is composed by four parts. They are Major Version, Minor
Version, Build Number and Revision Number. Based on my knowledge, we can
ignore Build Number and Revision Number. In another word, if Major Version
and Minor Version are equal, these two versions are match. In your current
situation, Major Version and Minor Version of "1.0.8.0" is 1 and 0; Major
Version and Minor Version of "1.0. 2249.26117" is also 1 and 0. So you can
think these two versions are same.

I hope the above information is helpful for you. Thanks for your
understanding!

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security

--------------------
Thread-Topic: Display Publish Version Error
thread-index: AcY73Vf3er5uhAV dRhqWSiFc3DuhRQ ==
X-WBNR-Posting-Host: 204.87.106.66
From: =?Utf-8?B?TWlrZSBM?= <Ca***@nospam.n ospam>
References: <85************ *************** *******@microso ft.com> <Oj************ **@TK2MSFTNGP09 .phx.gbl>Subject: Re: Display Publish Version Error
Date: Mon, 27 Feb 2006 12:35:27 -0800
Lines: 22
Message-ID: <8F************ *************** *******@microso ft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.langua ges.csharp:3887 37
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp

The code brought a number back, but I don't know what it is.
I have the publish version set to 1.0.8.0 but the code brings back
1.0.2249.261 17
My new code.

this.Text = "Dealer Sales " +
System.Reflect ion.Assembly.Ge tEntryAssembly( ).GetName().Ver sion.ToString() ;
"Marc Gravell" wrote:
You need to check ApplicationDepl oyment.IsNetwor kDeployed; if this returns false there is no publication to get an application version from - so the best you can use is the assembly version via something like
System.Reflecti on.Assembly.Get EntryAssembly() .GetName().Vers ion

Marc


Feb 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3740
by: Sushil Prasad | last post by:
I am having problem in displaying the compiled help file. In asp.net app I have link button labeled help. On the users click of this button i do the respose.redirect to the url of the .chm file. The error message on the web page i get is Action Cancelled. I do see the left panel of help file that has the contents. The right panel is the one that is not appearing. Also this help file does display and work well when i browse it from the...
5
2579
by: NoNickname | last post by:
Basically, how do I know that the release versions of all components are being published? The Build | Configuration Manager is confusing me a little in VS2005. I have three projects in my solution: 1) web service website. 2) SOAP Extension Class Lib that compiles to a dll 3) WinForm application with a proxy to test the web service.
1
1270
by: Bill Long | last post by:
I have a .NET 1.1 application (C#) that I converted to .NET 2.0... Conversion was pretty painless, code runs from the development environment no problem... but when I try and publish... It says everything was successful. So what's the problem??? It never creates any files in the output directory... It will delete any existing ones but never creates anything. Nothing ever gets published Any ideas would be appreciated --
7
45933
by: Mike L | last post by:
I want frmMain.text to show the current publish version. What is the code to get the current publish version? For example. frmMain.text = "My Application Version: " & project.publish.version But I don't know how to call the project.publish.version numbers.
2
2094
by: Todd | last post by:
My web site compiles fine. Tihs was a VS 2003 working application that was converted to VS 2005. When I try to publish to a directory I get a "Data at the root level is invalid." error in the published version of web.config line 1. The contents does not reflect the real web.config. I am able to publish other web sites. Published version with error looks like: vti_encoding:SR|utf8-nl vti_timelastmodified:TR|08 Aug 2004 19:02:17...
10
2520
by: WT | last post by:
Hello, I have been publishing my web site many times to the remote where resides my final web site. Everything was ok, but to-day, without any configuration change, vs doesn't copy final files to the remote site. It finish with a message of publish sucess but no files nor folders on the remote disk ? I have checked rights on this folder, everyone have modify.
2
3698
by: Vayse | last post by:
On my Help/About screen, I'd like to display 1) The version number, as it appears in the Publish screen. 2) The version number of the Report Viewer control. How would I do this? Thanks Vayse
4
2195
by: Pieter | last post by:
Hi, We're using ClickOnce alreaddy more than a year for a given applicaiton, doing more than 50 publishes without any problem. Yesterday we made a minor change to one of our components (let's say with the name MyAssembly), and incremented it's version (AssemblyVersion: from 0.1.7.0 to 0.1.7.1). We did the Publish with ClickOnce, but when the users know want to run the application they get this error: "Unable to install or run the...
3
2244
by: =?Utf-8?B?Sm9obiBT?= | last post by:
Hi, I'm trying to publish a new web service that I've written. It's fine when I publish it on the local PC but I get Publish failed in the development environment when I try to publish it to another server.
0
8611
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9090
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8969
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8812
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8810
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5822
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2242
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1962
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.