Comments (17)
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.
So .NET should work ?
from linqkit.
All I know is that the compiler won't build in a net8.0 project.
from linqkit.
@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 ==========
from linqkit.
I tried LinqKit
and LinqKit.Microsoft.EntityFrameworkCore
, however both failed to compile.
I'll try LinqKit.Core
and see if it works.
from linqkit.
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.
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.
Are you using Visual Studio 2022 ?
from linqkit.
I'm using vscode.
dotnet --version
= 8.0.100
from linqkit.
PS C:\projects\ConsoleAppLinqCore> dotnet --version
8.0.100
from linqkit.
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.
from linqkit.
from linqkit.
You are using Linux or Apple or Windows?
from linqkit.
Windows 11 Enterprise
from linqkit.
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.
@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.
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)
- Plugging Expressions into EntitySets / EntityCollections using compile doesnt work HOT 1
- Empty top-level Timestamp namespace appears in 1.2.2 causing CS0118 errors when a Timestamp type already exists in used namespace HOT 2
- Cannot use async operations with AsExpandable HOT 2
- PredicateBuilder cannot fill in parameter in SQLite when building expression. HOT 2
- Nullable properties `NullReferenceException` not thrown. HOT 3
- No support for `Expression.Default` HOT 2
- EF Core 7 Json column projections - LINQ expression could not be translated HOT 2
- WithExpressionExpanding not expanding LINQ queries properly HOT 1
- how to do apply LINQ using ExpressionBuilder on NotMapped property HOT 1
- Why so many different versions targeting different versions of .NET? HOT 1
- AggregateBalanced overload for `Expression<Func<Type, bool>>[]`? HOT 1
- Error expanding a lambda which calls `Invoke()` on an inner expression which references outer parameter HOT 1
- JSON projection should support nested paths
- linqkit.microsoft.entityframeworkcore is missing NuGet package README file
- How to use LinqKit in non static method?
- EF Core 8: `AsExapndable()` does not work with ` ToQueryString()` HOT 1
- System.data.sqlclient 4.7.0 has high vulnerability CVE-2024-0056. HOT 1
- How to use Common Table Expressions ?
- `Index` reference clash after installing LINQKit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linqkit.