Skip to content

Commit 277b00e

Browse files
committed
updated sample project files to dotnet 8.0
1 parent ad5286f commit 277b00e

File tree

7 files changed

+22
-21
lines changed

7 files changed

+22
-21
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ jobs:
7171
dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -n github
7272
dotnet nuget push ./builds/artifacts/**/*.nupkg -s github -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
7373
74-
- name: Publish package to nuget
74+
- name: Publish package to nuget.org
7575
run: |
7676
dotnet nuget push ./builds/artifacts/**/*.nupkg -s nuget.org -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate

samples/HttpClient Minimum/HttpClient.Minimum.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<Version>0.9.1</Version>
77
<Authors>Bytewizer Inc.</Authors>
88
<Product>Backblaze B2 Client Sample</Product>
@@ -14,7 +14,8 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Backblaze.Client" Version="0.9.3" />
17+
<PackageReference Include="Backblaze.Agent" Version="1.1.0" />
18+
<PackageReference Include="Backblaze.Client" Version="1.1.0" />
1819
</ItemGroup>
1920

2021
</Project>

samples/HttpClient Minimum/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.IO;
33
using System.Linq;
44
using Bytewizer.Backblaze.Client;
@@ -22,14 +22,13 @@ static void Main(string[] args)
2222
foreach (var bucket in buckets)
2323
Console.WriteLine($"Bucket Name: {bucket.BucketName} - Type: {bucket.BucketType}");
2424

25-
foreach (var filepath in Directory.GetFiles(@"c:\my\directory"))
25+
foreach (var filepath in Directory.GetFiles(@"c:\backblaze"))
2626
{
2727
using (var stream = File.OpenRead(filepath)) {
2828
var results = Client.UploadAsync(buckets.ToList().First().BucketId, new FileInfo(filepath).Name, stream).GetAwaiter().GetResult();
2929
Console.WriteLine(results.Response.FileName);
3030
}
3131
}
32-
3332
}
3433
catch (Exception ex)
3534
{

samples/HttpClient/HttpClient.Sample.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<Version>0.9.1</Version>
77
<Authors>Bytewizer Inc.</Authors>
88
<Product>Backblaze B2 Client Sample</Product>
@@ -14,9 +14,10 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Backblaze.Client" Version="0.9.3" />
18-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
19-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
17+
<PackageReference Include="Backblaze.Agent" Version="1.1.0" />
18+
<PackageReference Include="Backblaze.Client" Version="1.1.0" />
19+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
20+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
2021
</ItemGroup>
2122

2223
</Project>

samples/Sample/Backblaze.Sample.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<Version>0.9.1</Version>
77
<Authors>Bytewizer Inc.</Authors>
88
<Product>Backblaze B2 Client Sample</Product>
@@ -13,10 +13,10 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Backblaze.Agent" Version="0.9.3" />
16+
<PackageReference Include="Backblaze.Agent" Version="1.1.0" />
1717
<PackageReference Include="Bytewizer.Extensions.Console" Version="0.9.1" />
18-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
19-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
18+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
19+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
2020
</ItemGroup>
2121

2222
<ItemGroup>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Worker">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<UserSecretsId>dotnet-WorkerService1-F4880FE0-7104-4F08-A11E-E3506EBD9483</UserSecretsId>
66
<Version>0.9.1</Version>
77
<Authors>Bytewizer Inc.</Authors>
@@ -12,8 +12,8 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Backblaze.Agent" Version="0.9.3" />
16-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
17-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
15+
<PackageReference Include="Backblaze.Agent" Version="1.1.0" />
16+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
17+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
1818
</ItemGroup>
1919
</Project>

samples/Service/Worker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
2626
{
2727
while (!stoppingToken.IsCancellationRequested)
2828
{
29-
foreach (var filePath in Directory.GetFiles(@"c:\my\directory"))
29+
foreach (var filePath in Directory.GetFiles(@"c:\backblaze"))
3030
{
3131
using var stream = File.OpenRead(filePath);
3232
var results = await _client.UploadAsync("ce6194ce5c3f2f746ce20d1b", new FileInfo(filePath).Name, stream);

0 commit comments

Comments
 (0)