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

Investigate Quartz library issue with Microsoft.Data.SqlClient v2.0.0 #691

Closed
cheenamalhotra opened this issue Aug 13, 2020 · 5 comments
Closed
Labels
Area\Native SNI Issues that are targeted to the Native SNI codebase.

Comments

@cheenamalhotra
Copy link
Member

cheenamalhotra commented Aug 13, 2020

Originally posted by @alfeg in #652 (comment)

Hi, we have similar issue with 3rd party library that started use of Microsoft.Data.SqlClient v2.0.0
Here is a issue in corresponding Quartz library with steps to reproduce quartz-scheduler/quartz#617

cc @JRahnama @karinazhou

@karinazhou
Copy link
Member

karinazhou commented Aug 14, 2020

Hi @alfeg ,

I tested your repo steps in quartz-scheduler/quartz#617 . If I use the following commands to create the web app and publish the executable, I can see the Assembly error as described.

dotnet new web
dotnet add package Quartz
dotnet publish -c Release -r win-x64 /p:PublishSingleFile=True -o dist
.\dist\GH691.exe
Error:
  An assembly specified in the application dependencies manifest (GH691.deps.json) was not found:
    package: 'Microsoft.Data.SqlClient.SNI.runtime', version: '2.0.0'
    path: 'runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.pdb'

I checked the csproj file and there is no <PublishSingleFile> tag added inside the PropertyGroup. After I added the PublishSingleFile, I didn't see the assembly error any more:

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

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <PublishSingleFile>True</PublishSingleFile>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Quartz" Version="3.1.0" />
  </ItemGroup>

</Project>

Instead, I get the following message:

Failure processing application bundle.
Bundle header version compatibility check failed
A fatal error was encountered. Could not extract contents of the bundle

If I set <PublishSingleFile>False</PublishSingleFile> , I get the web app running without issue.

FYI We are going to remove pdb files from the native runtime SNI nuget package in the future so it should be able to solve any issues caused by the pdb.

@cheenamalhotra cheenamalhotra added the Area\Native SNI Issues that are targeted to the Native SNI codebase. label Aug 21, 2020
@mwmccallum
Copy link

Hi @alfeg ,

I tested your repo steps in quartz-scheduler/quartz#617 . If I use the following commands to create the web app and publish the executable, I can see the Assembly error as described.

dotnet new web
dotnet add package Quartz
dotnet publish -c Release -r win-x64 /p:PublishSingleFile=True -o dist
.\dist\GH691.exe
Error:
  An assembly specified in the application dependencies manifest (GH691.deps.json) was not found:
    package: 'Microsoft.Data.SqlClient.SNI.runtime', version: '2.0.0'
    path: 'runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.pdb'

I checked the csproj file and there is no <PublishSingleFile> tag added inside the PropertyGroup. After I added the PublishSingleFile, I didn't see the assembly error any more:

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

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <PublishSingleFile>True</PublishSingleFile>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Quartz" Version="3.1.0" />
  </ItemGroup>

</Project>

Instead, I get the following message:

Failure processing application bundle.
Bundle header version compatibility check failed
A fatal error was encountered. Could not extract contents of the bundle

If I set <PublishSingleFile>False</PublishSingleFile> , I get the web app running without issue.

FYI We are going to remove pdb files from the native runtime SNI nuget package in the future so it should be able to solve any issues caused by the pdb.

When is this change (removing pdb dependency) going to be implemented/deployed? This prevents MSIX projects from working properly because the pdb is not deployed in MSIX. So client throws dependency error when executed.

Thanks, Mike

@cheenamalhotra
Copy link
Member Author

Hi @mwmccallum

We're planning to address this change with next preview release of Microsoft.Data.SqlClient v2.1.0-preview2.

@cheenamalhotra
Copy link
Member Author

Closing this issue as pdbs have been removed from Microsoft.Data.SqlClient.SNI.runtime v2.1.1 to be picked by Microsoft.Data.SqlClient v2.1.0-preview2 onwards.

@jjxtra
Copy link

jjxtra commented Nov 11, 2020

Rolling back to 3.1.8 version of entity framework nugets fixed the error for me in .NET 5 rtm release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area\Native SNI Issues that are targeted to the Native SNI codebase.
Projects
None yet
Development

No branches or pull requests

4 participants