Skip to content

[preview1] NAOT with msbuild integration doesn't work #35638

@maumar

Description

@maumar

When trying to publish NAOT using MSBuild integration package (Microsoft.EntityFrameworkCore.Tasks) I get an error during publish:

"dotnet" exited with code -2147450751.

Publishing "the hard way" (i.e. manually generate compile model and pre-generate queries) works fine

Repro:

create new console app targetting net10, add EFCore.SqlServer and EFCore.Tasks preview1 packages
add some options to csproj

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <PublishAot>true</PublishAot>
    <SelfContained>true</SelfContained>
    <InvariantGlobalization>false</InvariantGlobalization>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.EntityFrameworkCore.GeneratedInterceptors</InterceptorsPreviewNamespaces>
  </PropertyGroup>
  • add EF application code

  • Create publish profile (file)

  • publish

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions