Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to .NET 9 #386

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:
- name: Install Dotnet
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'

- name: Dotnet Installation Info
run: dotnet --info
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
- name: Install Dotnet
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'

- name: Dotnet Installation Info
run: dotnet --info
44 changes: 22 additions & 22 deletions CSharpRepl.Services/CSharpRepl.Services.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
<PackageReference Include="ICSharpCode.Decompiler" Version="8.2.0.7535" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.11.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.11.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.11.0" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.7.8" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
<PackageReference Include="Microsoft.SymbolStore" Version="1.0.528101" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="9.0.0" />
<PackageReference Include="Microsoft.SymbolStore" Version="1.0.555801" />
<PackageReference Include="PrettyPrompt" Version="4.1.1" />
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
<PackageReference Include="System.IO.Abstractions" Version="21.0.2" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="21.1.3" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
</ItemGroup>

<!--
@@ -32,19 +32,19 @@
https://github.com/OmniSharp/omnisharp-roslyn/commit/efeafeca33abe1d19659ed8c7ebab1d7c3481188
-->
<ItemGroup>
<PackageReference Include="NuGet.PackageManagement" Version="6.10.0" />
<PackageReference Include="NuGet.Common" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.Commands" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.Credentials" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.Configuration" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.DependencyResolver.Core" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.Frameworks" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.LibraryModel" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.PackageManagement" Version="6.12.1" />
<PackageReference Include="NuGet.Common" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Commands" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Credentials" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Configuration" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.DependencyResolver.Core" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Frameworks" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.LibraryModel" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Packaging.Core" Version="6.9.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Packaging" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.ProjectModel" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.Protocol" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.Versioning" Version="6.10.0" PrivateAssets="all" />
<PackageReference Include="NuGet.Packaging" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.ProjectModel" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Protocol" Version="6.12.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Versioning" Version="6.12.1" PrivateAssets="all" />
</ItemGroup>


2 changes: 1 addition & 1 deletion CSharpRepl.Services/Configuration.cs
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ public sealed class Configuration
public static readonly IReadOnlyCollection<string> SymbolServers =
[
"https://symbols.nuget.org/download/symbols/",
"http://msdl.microsoft.com/download/symbols/"
"https://msdl.microsoft.com/download/symbols/"
];

public HashSet<string> References { get; }
2 changes: 1 addition & 1 deletion CSharpRepl.Services/SymbolExploration/DebugSymbolLoader.cs
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ private CacheSymbolStore BuildSymbolStore()

foreach (var server in Configuration.SymbolServers)
{
store = new HttpSymbolStore(logger, store, new Uri(server), null);
store = new HttpSymbolStore(logger, store, new Uri(server), accessToken: null);
}

var cacheDirectory = Path.Combine(Configuration.ApplicationDirectory, "symbols");
5 changes: 5 additions & 0 deletions CSharpRepl.Services/SymbolExploration/SymbolExplorer.cs
Original file line number Diff line number Diff line change
@@ -84,6 +84,11 @@ public async Task<SymbolResult> LookupSymbolAtPosition(string text, int position

foreach (var key in debugSymbolLoader.GetSymbolFileNames()) // we'll choose the first pdb we can successfully load. This will skip over e.g. Windows pdb files.
{
if (key.FullPathName.Contains(".ni.pdb"))
{
continue;
}

using SymbolStoreFile symbolFile = await debugSymbolLoader.DownloadSymbolFile(key, CancellationToken.None);

var symbolReader = debugSymbolLoader.ReadPortablePdb(symbolFile);
12 changes: 6 additions & 6 deletions CSharpRepl.Tests/CSharpRepl.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

@@ -14,13 +14,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="PrettyPrompt" Version="4.1.1" />
<PackageReference Include="Spectre.Console.Testing" Version="0.49.1" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="21.0.2" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="21.1.3" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
4 changes: 2 additions & 2 deletions CSharpRepl/CSharpRepl.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<PropertyGroup>
<Version>0.6.7</Version>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RollForward>LatestMajor</RollForward>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
@@ -27,7 +27,7 @@
<ItemGroup>
<PackageReference Include="PrettyPrompt" Version="4.1.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="8.0.0" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ C# REPL provides the following features:

## Installation

C# REPL is a .NET 8 global tool, and runs on Windows, Mac OS, and Linux. It can be installed [from NuGet](https://www.nuget.org/packages/CSharpRepl) via:
C# REPL is a .NET 9 global tool, and runs on Windows, Mac OS, and Linux. It can be installed [from NuGet](https://www.nuget.org/packages/CSharpRepl) via:

```console
dotnet tool install -g csharprepl