Closed weitzhandler closed 4 years ago
Thanks for filing, but I couldn't repro this... Please see my full csproj and Program.cs file below. The csproj is partial, so there may be something missing (e.g. I don't know what TFM you're targeting). Can you please help arrive at a repro minimal console program?
csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="5.0.0-rc2" />
<PackageReference Include="Npgsql.Json.NET" Version="5.0.0-preview1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-rc.2.20475.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0-rc.2.20475.5" />
</ItemGroup>
</Project>
Hey @roji and thanks for taking the time investigating this.
Could this be the problem? I'm on VS 16.7* and using global.json:
$ dotnet --info
.NET SDK (reflecting any global.json):
Version: 5.0.100-preview.7.20366.6
Commit: 0684df3a5b
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100-preview.7.20366.6\
Host (useful for support):
Version: 5.0.0-rc.2.20475.5
Commit: c5a3f49c88
Anyway, since this isn't a blocker to me and I don't mind using the lower version, and especially since you're unable to repro the problem, I'm gonna close this issue.
Visual Studio 16.8, Preview 4 is required to use .NET Core 5.0 rc2 (see https://dotnet.microsoft.com/download/dotnet/5.0), so that could indeed be the source of the trouble.
However, can I ask you to give this a few more minutes and see if the issue reproduces via dotnet CLI (outside VS), or in the latest VS preview? If there's an actual Npgsql issue here it would be good to know about it.
The thing is that I have side by side and 16.8 preview is installed too. I'll try to change the global.json and try to run in VS 16.8p4.
After setting the global.json to the rc2 sdk, it worked fine. Sorry for the hassle and thanks for your diligence @roji.
Thanks for looking into it and confirming @weitzhandler.
Hi,
It seems EF Core tools doesn't play well with the new version. In my project, as soon as I upgrade
Npgsql
to version5.0.0-preview1.1
(from5.0.0-alpha1
), I get the following exception:Here's are the packages installed in my project, either one of the following changes triggers the error: