Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/ExceptionReporter.Shared/ReportGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

using System;
using System.Collections.Generic;
using System.Deployment.Application;
using System.Reflection;
using ExceptionReporting.Core;
using ExceptionReporting.Report;
Expand Down Expand Up @@ -46,8 +45,10 @@ public ReportGenerator(ExceptionReportInfo reportInfo)

private string GetAppVersion()
{
return ApplicationDeployment.IsNetworkDeployed ?
ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString() : _info.AppAssembly.GetName().Version.ToString();
return _info.AppAssembly.GetName().Version.ToString();
// lost during migration to net5.0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a bugger isn't it...
On my current team, this ClickOnce deployed version is quite important - we might have to use conditional code/preprocessing or something to keep this...

//return ApplicationDeployment.IsNetworkDeployed ?
// ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString() : _info.AppAssembly.GetName().Version.ToString();
}

/// <summary>
Expand Down
20 changes: 12 additions & 8 deletions src/ExceptionReporter.WinForms/ExceptionReporter.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<AssemblyName>ExceptionReporter.NET</AssemblyName>
<PackageId>ExceptionReporter</PackageId>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFrameworks>net40</TargetFrameworks>
<TargetFrameworks>net40;net5.0-windows</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<ReleaseVersion>5.0</ReleaseVersion>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/PandaWood/ExceptionReporter.NET</PackageProjectUrl>
Expand All @@ -13,10 +14,17 @@
<EmbeddedResource Remove="Properties\Resources.en.resx" />
<EmbeddedResource Remove="Properties\Resources.ru.resx" />
</ItemGroup>
<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
<PackageReference Include="Simple-MAPI.NET" Version="1.2.0" />
<PackageReference Include="DotNetZip" Version="1.15.0" />
<PackageReference Include="Handlebars.Net" Version="1.9.0" />
<PackageReference Include="Simple-MAPI.NET" Version="1.2.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0-windows' ">
<PackageReference Include="Simple-MAPI.NET" Version="1.2.1" />
<PackageReference Include="DotNetZip" Version="1.15.0" />
<PackageReference Include="Handlebars.Net" Version="2.0.9" />
<PackageReference Include="System.Management" Version="6.0.0" />
<PackageReference Include="System.Resources.Extensions" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.en.resx">
Expand All @@ -29,14 +37,10 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="System.Configuration" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<PropertyGroup>
<Version>5.0</Version>
<Version>5.0.1</Version>
<FileVersion>5.0.0.0</FileVersion>
<Authors>Peter van der Woude, Simon Cropp</Authors>
<Description>ExceptionReporter is a .NET UserControl/Dialog that gathers detailed information on an Exception and the application/system running it. It allows the user to copy, save or email a report to the developer</Description>
Expand Down