Skip to content

Commit 5ed5016

Browse files
committed
fixes #13 - The type initializer for 'WakaTime.WakaTimeConfigFile' threw an exception
1 parent 04b2485 commit 5ed5016

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/WakaTime.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</PropertyGroup>
4343

4444
<ItemGroup>
45-
<PackageReference Include="Salaros.ConfigParser" Version="0.3.0" />
45+
<PackageReference Include="Salaros.ConfigParser" Version="0.3.1" />
4646
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" Condition="'$(TargetFramework)' != 'net45'" />
4747
<PackageReference Include="DotNetZip" Version="1.11.0" Condition="'$(TargetFramework)' == 'net40'" />
4848
<Reference Include="System.Web.Extensions" Condition="'$(TargetFramework)' == 'net45'" />
@@ -52,7 +52,7 @@
5252
<Compile Remove="IProgress.cs" />
5353
<None Include="IProgress.cs" />
5454
</ItemGroup>
55-
55+
5656
<Target Name="CleanNuGetFiles" AfterTargets="Clean">
5757
<ItemGroup>
5858
<NuGetFilesBin Include="$(OutputPath)\..\*.nupkg" />

src/WakaTimeConfigFile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public static class WakaTimeConfigFile
2020
static WakaTimeConfigFile()
2121
{
2222
ConfigFilepath = GetConfigFilePath();
23+
using(File.Create(ConfigFilepath)) {} // Create an empty config file
2324
ConfigParser = new ConfigParser(ConfigFilepath, new ConfigParserSettings
2425
{
2526
MultiLineValues = MultiLineValues.Simple | MultiLineValues.QuoteDelimitedValues,

0 commit comments

Comments
 (0)