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

5.0.0-preview3.22168.1 error #1650

Closed
shawenbin opened this issue Jun 18, 2022 · 12 comments · Fixed by #1654
Closed

5.0.0-preview3.22168.1 error #1650

shawenbin opened this issue Jun 18, 2022 · 12 comments · Fixed by #1654

Comments

@shawenbin
Copy link

in 5.0.0-preview3.22168.1 , encountered an error
Could not load file or assembly 'Microsoft.SqlServer.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'

return 5.0.0-preview2.22096.2 , business as usual

@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 18, 2022

Can you share a simple repro?

@JRahnama
Copy link
Contributor

@shawenbin have you seen this notes? The very first bullet point in the breaking changes?

@SIkebe
Copy link

SIkebe commented Jun 19, 2022

Maybe issue for EntityFramework Core ?
This is a simple repro.

docker-compose up -d
dotnet run
EnsureDeleted
EnsureCreated
Unhandled exception. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'. 指定されたファイルが見つかりません。
File name: 'Microsoft.SqlServer.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'
   at Microsoft.Data.SqlClient.TdsParser.TDSExecuteRPCAddParameter(TdsParserStateObject stateObj, SqlParameter param, MetaType mt, Byte options, SqlCommand command, Boolean isAnonymous)
   at Microsoft.Data.SqlClient.TdsParser.TdsExecuteRPC(SqlCommand cmd, _SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList`1 entries)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList`1 entriesToSave)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<>c.<SaveChanges>b__104_0(DbContext _, ValueTuple`2 t)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChanges()
   at Program.<Main>$(String[] args) in C:\poc\SqlClientError\Program.cs:line 12

@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 19, 2022

What happens if you add an explict reference ?

<PackageReference Include="Microsoft.SqlServer.Server" Version="1.0.0" />

@SIkebe
Copy link

SIkebe commented Jun 19, 2022

What happens if you add an explict reference ?

<PackageReference Include="Microsoft.SqlServer.Server" Version="1.0.0" />

I tried that, but same result.
image

@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 19, 2022

Why is it looking for version 5? It should look for 1.0 - maybe because it is not a package reference in the project file?

@Jacko1394
Copy link

I get the same error: Could not load file or assembly 'Microsoft.SqlServer.Server, Version=5.0.0.0.

Only difference is I'm reference 5.0.0-preview3 now instead of 5.0.0-preview2

@princeoffoods
Copy link

Exactly the same problem here.

@DavoudEshtehari
Copy link
Contributor

DavoudEshtehari commented Jun 21, 2022

Unsigned packages for test purposes. Please, post here your test result with this package.

@xeonsrs
Copy link

xeonsrs commented Jun 21, 2022

Unsigned package for test purposes. Please, post here your test result with this package.

Is that for internal use? Can't access the package via the link

@DavoudEshtehari
Copy link
Contributor

@xeonsrs I updated the link. It should work.

@xeonsrs
Copy link

xeonsrs commented Jun 21, 2022

@DavoudEshtehari thank you it works now.
Update: the issue with Microsoft.SqlServer.Server disappeared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants