Git Product home page Git Product logo

Comments (17)

Fosol avatar Fosol commented on August 15, 2024 1

Thanks for taking the time to look into it. I'll attempt it on another computer and see what happens. Perhaps I need to reinstall the SDK.

from linqkit.

StefH avatar StefH commented on August 15, 2024

It supports .NET Standard 2.1
image

So .NET should work ?

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

All I know is that the compiler won't build in a net8.0 project.

from linqkit.

StefH avatar StefH commented on August 15, 2024

@Fosol
When creating a default .NET 8 console app:

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

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

  <ItemGroup>
    <PackageReference Include="LinqKit.Core" Version="1.2.5" />
  </ItemGroup>

</Project>

With this code:

using LinqKit;

namespace ConsoleAppLinqCore
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var predicate = PredicateBuilder.New<Program>(true);
        }
    }
}

The application compiles fine:

Rebuild started at 5:15 PM...
1>------ Rebuild All started: Project: ConsoleAppLinqCore, Configuration: Debug Any CPU ------
Restored C:\projects\ConsoleAppLinqCore\ConsoleAppLinqCore.csproj (in 14 ms).
1>ConsoleAppLinqCore -> C:\projects\ConsoleAppLinqCore\bin\Debug\net8.0\ConsoleAppLinqCore.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 5:15 PM and took 00.398 seconds ==========

And runs fine:
image

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

I tried LinqKit and LinqKit.Microsoft.EntityFrameworkCore, however both failed to compile.

I'll try LinqKit.Core and see if it works.

from linqkit.

StefH avatar StefH commented on August 15, 2024

Both LinqKit and LinqKit.Microsoft.EntityFrameworkCore can be used in a .NET 8 console app (I did some tests), however the LinqKit NuGet is not what you would want to use, because for backwards compatibility reasons, this package has a dependency on the old EntityFramwork version 6.x

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

I don't know how you're getting it to work. When I build it fails with any of the libraries.

With LinqKit.Core
<PackageReference Include="LinqKit.Core" Version="1.2.5" />
Package LinqKit.Core 1.2.5 is not compatible with net8.0 (.NETCoreApp,Version=v8.0)

With LinqKit
<PackageReference Include="LinqKit" Version="1.2.5" />
Package LinqKit 1.2.5 is not compatible with net8.0 (.NETCoreApp,Version=v8.0)

With LinqKit.Microsoft.EntityFrameworkCore
<PackageReference Include="LinqKit.Microsoft.EntityFrameworkCore" Version="8.1.5" />
Package LinqKit.Core 1.2.5 is not compatible with net8.0 (.NETCoreApp,Version=v8.0)

All are in projects with the following.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
...

from linqkit.

StefH avatar StefH commented on August 15, 2024

Are you using Visual Studio 2022 ?

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

I'm using vscode.

dotnet --version = 8.0.100

from linqkit.

StefH avatar StefH commented on August 15, 2024
PS C:\projects\ConsoleAppLinqCore> dotnet --version
8.0.100

VSCode:
image

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

I have a new project

dotnet new console

Here is my test.csproj file.

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

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

  <ItemGroup>
    <PackageReference Include="LinqKit" Version="1.2.5" />
  </ItemGroup>

</Project>

Here is the error on dotnet restore or dotnet build.

error NU1202: Package LinqKit 1.2.5 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package LinqKit 1.2.5 does not support any target frameworks.
error NU1202: Package LinqKit.Core 1.2.5 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package LinqKit.Core 1.2.5 does not support any target frameworks.

I don't know why this doesn't work. I don't know what's different with my computer.

But that error is coming from somewhere.

image

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

image

from linqkit.

StefH avatar StefH commented on August 15, 2024

You are using Linux or Apple or Windows?

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

Windows 11 Enterprise

from linqkit.

StefH avatar StefH commented on August 15, 2024

Sorry, I cannot help you.

Adding a the package to an empty project gives this output for me:

PS C:\projects\ConsoleAppLinqCore> dotnet add package LinqKit.Core
  Determining projects to restore...
  Writing C:\Users\***\AppData\Local\Temp\tmpp20ar4.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 'LinqKit.Core' into project 'C:\projects\ConsoleAppLinqCore\ConsoleAppLinqCore.csproj'.
info :   GET https://api.nuget.org/v3/registration5-gz-semver2/linqkit.core/index.json
info :   OK https://api.nuget.org/v3/registration5-gz-semver2/linqkit.core/index.json 252ms
info : Restoring packages for C:\projects\ConsoleAppLinqCore\ConsoleAppLinqCore.csproj...
info :   GET https://api.nuget.org/v3/vulnerabilities/index.json
info :   OK https://api.nuget.org/v3/vulnerabilities/index.json 235ms
info :   GET https://api.nuget.org/v3/vulnerabilities/vulnerability.base.json
info :   GET https://api.nuget.org/v3/vulnerabilities/vulnerability.update.json
info :   OK https://api.nuget.org/v3/vulnerabilities/vulnerability.base.json 157ms
info :   OK https://api.nuget.org/v3/vulnerabilities/vulnerability.update.json 249ms
info : Package 'LinqKit.Core' is compatible with all the specified frameworks in project 'C:\projects\ConsoleAppLinqCore\ConsoleAppLinqCore.csproj'.
info : PackageReference for package 'LinqKit.Core' version '1.2.5' added to file 'C:\projects\ConsoleAppLinqCore\ConsoleAppLinqCore.csproj'.
info : Generating MSBuild file C:\projects\ConsoleAppLinqCore\obj\ConsoleAppLinqCore.csproj.nuget.g.props.
info : Generating MSBuild file C:\projects\ConsoleAppLinqCore\obj\ConsoleAppLinqCore.csproj.nuget.g.targets.
info : Writing assets file to disk. Path: C:\projects\ConsoleAppLinqCore\obj\project.assets.json
log  : Restored C:\projects\ConsoleAppLinqCore\ConsoleAppLinqCore.csproj (in 722 ms).

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

@StefH can we reopen this ticket?

The following project file fails. with errors stating LinqKit 1.2.5 and LinqKit.Core 1.2.5 is not compatible with net8.0.

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <RootNamespace>HSB.Test</RootNamespace>
    <Version>1.0.0.0</Version>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="DotNetEnv" Version="3.0.0" />
    <PackageReference Include="LinqKit" Version="1.2.5" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.6" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.6" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="Migrations\**\*.sql">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

</Project>

from linqkit.

Fosol avatar Fosol commented on August 15, 2024

The error disappears if I change to LinqKit 1.2.4, but I need to test the application to see if it works.

from linqkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.