I would like to be able to put a Publish Version in an AboutBox in my VS
2008 WPF application. I am following this example in the VS2008 help files:
ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/fxref_system.deployment/html/a848f1ad-bea0-1762-ff71-542adc0cdcc9.htm
I am having difficulty adding the following to my source code:
Imports System.Deployment.Application
I get the following error:
Namespace or type specified in the Imports 'System.Deployment.Application'
doesn't contain any public member or cannot be found. Make sure the namespace
or the type is defined and contains at least one public member. Make sure the
imported element name doesn't use any aliases.
I'm not sure why I can't list this import. I'm following the example code
exactly. Any ideas?
--
Michael
Marc
public string version
{
get
{
System.Reflection.Assembly _assemblyInfo =
System.Reflection.Assembly.GetExecutingAssembly();
string ourVersion = string.Empty;
//if running the deployed application, you can get the version
// from the ApplicationDeployment information. If you try
// to access this when you are running in Visual Studio, it will
not work.
if
(System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
{
ourVersion =
ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
}
else
{
if (_assemblyInfo != null)
{
ourVersion = _assemblyInfo.GetName().Version.ToString();
}
}
return ourVersion;
}
}
RobinS.
GoldMail.com
===============
"michael" <mic...@discussions.microsoft.com> wrote in message
news:D099D854-4FC7-474D...@microsoft.com...