Version CurrentVersion
{
	get
	{
		if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
		{
			System.Deployment.Application.ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
			return ad.CurrentVersion;
		}
		else
		{
        	//string fileName = System.Reflection.Assembly.GetExecutingAssembly().Location;
        	//Assembly.LoadFile(fileName).GetName().Version;
			return Assembly.GetExecutingAssembly().GetName().Version;
		}
	}
}

Version UpdateVersion
{
	get
	{
		if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
		{
			System.Deployment.Application.ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
			return ad.UpdatedVersion;
		}
		return null;
	}
}

+ Recent posts