Skip to content

Commit

Permalink
fix version number ermittlung
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaenggli committed Aug 18, 2020
1 parent 011c579 commit 6705d0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ExcelAddIn_TableOfContents.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PublishUrl>\\asyn\web\PlugIn\Excel\</PublishUrl>
<InstallUrl />
<TargetCulture>de</TargetCulture>
<ApplicationVersion>1.0.0.4</ApplicationVersion>
<ApplicationVersion>1.1.0.1</ApplicationVersion>
<AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
<UpdateEnabled>true</UpdateEnabled>
<UpdateInterval>0</UpdateInterval>
Expand Down Expand Up @@ -126,6 +126,7 @@
<Reference Include="Microsoft.Office.Tools.Excel.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Windows.Forms" />
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

6 changes: 4 additions & 2 deletions ThisAddIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Reflection;
using System.Deployment.Application;

namespace ExcelAddIn_TableOfContents
{
Expand Down Expand Up @@ -141,8 +142,9 @@ private void Update()
Properties.Settings.Default.Save();
}

Version a = Assembly.GetExecutingAssembly().GetName().Version;
Version a = (ApplicationDeployment.IsNetworkDeployed)? ApplicationDeployment.CurrentDeployment.CurrentVersion : Assembly.GetExecutingAssembly().GetName().Version;
Version b = a;


// once a day should be enougth....
if (Settings.Default.LastUpdateCheck.AddHours(1) <= DateTime.Now)
Expand All @@ -162,7 +164,7 @@ private void Update()
b = new Version(m.Value.Replace("\"", "").Replace("tag_name:v", "").Replace(",", ""));
}
}

if (b > a)
{

Expand Down

0 comments on commit 6705d0e

Please sign in to comment.