Skip to content

Commit

Permalink
Upgrade to net6.0
Browse files Browse the repository at this point in the history
To solve Cloudflare not allowing connection on linux GarminConnectClient
had to be upgraded to net6.0.
Fix code coverage generation.
Remove Fit processorArchitecture info from csproj files.
  • Loading branch information
Abász committed Aug 25, 2022
1 parent 663105b commit 5c250cc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"${workspaceFolder}/tests/GarminWeightScaleUploader.Lib.Tests/GarminWeightScaleUploader.Lib.Tests.csproj",
"/p:CollectCoverage=true",
"/p:CoverletOutputFormat=lcov",
"/p:CoverletOutput=./../../src/GarminWeightScaleUploader.Lib/lcov"
"/p:CoverletOutput=${workspaceFolder}/src/GarminWeightScaleUploader.Lib/lcov"
],
"group": "test",
"problemMatcher": "$msCompile"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageOutputPath>..\..\nupack</PackageOutputPath>
<PackageId>GarminWeightScaleUploader.Library</PackageId>
<Authors>Abász</Authors>
Expand All @@ -19,18 +19,18 @@
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);1591</NoWarn>
<Version>0.1.1</Version>
<Version>0.2.0</Version>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\garmin-connect-client\GarminConnectClient.Lib\GarminConnectClient.Lib.csproj" PrivateAssets="All"/>
<Reference Include="Fit, Culture=neutral, processorArchitecture=MSIL" PrivateAssets="All">
<Reference Include="Fit, Culture=neutral" PrivateAssets="All">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libs\Fit.dll</HintPath>
</Reference>
<Content Include="..\..\Libs\Fit.dll">
<Pack>True</Pack>
<PackagePath>\lib\netstandard2.0</PackagePath>
<PackagePath>\lib\net6.0</PackagePath>
</Content>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private static GarminConnectClient.Lib.IConfiguration SetupConfiguration(string
private static string CreateWeightScaleFitFile(GarminWeightScaleData garminWeightScaleData, UserProfileSettings userProfileSettings)
{
var timeCreated = new Dynastream.Fit.DateTime(System.DateTime.UtcNow);
var outputFilePath = Path.Combine(_tmpDir, $"{timeCreated.GetTimeStamp()}.fit");
var outputFilePath = Path.Combine(_tmpDir, $"{timeCreated.GetTimeStamp()}_WEIGHT_SCALE.fit");

var stream = new FileStream(outputFilePath, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
var encoder = new Encode(ProtocolVersion.V20);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
<NoWarn>$(NoWarn);1591</NoWarn>
<RunSettingsFilePath>$(MSBuildProjectDirectory)\test.runsettings</RunSettingsFilePath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0"/>
<PackageReference Include="xunit" Version="2.4.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5"/>
<PackageReference Include="coverlet.collector" Version="3.1.2"/>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
<PackageReference Include="coverlet.msbuild" Version="3.1.2"/>
</ItemGroup>
<ItemGroup>
<Reference Include="Fit, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Fit, Culture=neutral">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Libs\Fit.dll</HintPath>
</Reference>
Expand Down

0 comments on commit 5c250cc

Please sign in to comment.