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

Add Support .NET8 #1662

Closed
ShortArrow opened this issue Oct 6, 2024 · 3 comments
Closed

Add Support .NET8 #1662

ShortArrow opened this issue Oct 6, 2024 · 3 comments

Comments

@ShortArrow
Copy link

Summury

I want support net8.

Background

Nuget page is said net5 is compatible target framework.
And net8 is Included target framework(s) (in package).
But actual, there is no support for net8.

Download page is now .NET8.

Expected

Can add Spectre.Console with dotnet add main package Spectre.Console command.
Target is like this main.cproj.

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

</Project>

Actual

❯ dotnet add package Spectre.Console --version 0.49.1
  Determining projects to restore...
  Writing C:\Users\who\AppData\Local\Temp\tmpfxg1n3.tmp
info : X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
info : X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
info : Adding PackageReference for package 'Spectre.Console' into project 'C:\Users\who\Documents\GitHub\Shmphin\main\main.csproj'.
info : Restoring packages for C:\Users\who\Documents\GitHub\Shmphin\main\main.csproj...
error: NU1100: Unable to resolve 'Spectre.Console (>= 0.49.1)' for 'net8.0'.
error: Package 'Spectre.Console' is incompatible with 'all' frameworks in project 'C:\Users\who\Documents\GitHub\Shmphin\main\main.csproj'.

Thanks

I'm currently learning C# and may not be able to contribute to this project.
But I want use Spectre.Console in my project LTS.
Spectre.Console is Awesome project, Thanks for all contributers.
If I can contribute, I'd be happy to help.

@RobertZFord
Copy link

You should recheck your package configuration, network connection, and methodology.

I was able to add the specified package in a .NET 8 console application without any issues at all.

⬢[rob@toolbox spectest]$ cat spectest.csproj 
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="spectre.console" Version="0.49.1" />
  </ItemGroup>

</Project>
⬢[rob@toolbox spectest]$ cat Program.cs 
using Spectre.Console;

namespace spectest;

class Program
{
    static void Main(string[] args)
    {
        AnsiConsole.Markup("[underline red]Hello[/] World!");
    }
}
⬢[rob@toolbox spectest]$ dotnet run
Hello World!
⬢[rob@toolbox spectest]$ 

@ShortArrow
Copy link
Author

@RobertZFord Thanks.

My dotnet nuget list source was No sources found.. My enviroment is fixed by these commands.

dotnet nuget list source
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
dotnet nuget enable source nuget.org

@ShortArrow
Copy link
Author

I've achieved my goal so I'll close it.Thank you for your trouble.

@github-project-automation github-project-automation bot moved this from Todo 🕑 to Done 🚀 in Spectre Console Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 🚀
Development

No branches or pull requests

2 participants