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 not including Microsoft.SqlServer.Server in Published 'Single File' #1660

Closed
KayakFisher205 opened this issue Jun 27, 2022 · 3 comments

Comments

@KayakFisher205
Copy link

KayakFisher205 commented Jun 27, 2022

Describe the bug

When I use the 5.0.0-Preview3.22168.1 within visual studio and I have the Publishing set to 'Produce single File', Microsoft.SqlServer.Server can't be found by the program when it starts.

5.0.0-preview2.22096.2 didn't have this issue.

Exception message:
Stack trace:
[Warning][DotNetCore.CAP.Processor.MessageNeedToRetryProcessor] Get messages from storage failed. Retrying...System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'. The system cannot find the file specified.
File name: 'Microsoft.SqlServer.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'
   at Microsoft.Data.SqlClient.MetaType.GetMetaTypeFromValue(Type dataType, Object value, Boolean inferLen, Boolean streamAllowed)
   at Microsoft.Data.SqlClient.MetaType.GetMetaTypeFromType(Type dataType)
   at Microsoft.Data.SqlClient.SqlParameter.GetMetaTypeOnly()
   at Microsoft.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc)
   at Microsoft.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters, Boolean includeReturnValue)
   at Microsoft.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc)
   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 DotNetCore.CAP.SqlServer.DbConnectionExtensions.ExecuteReader[T](IDbConnection connection, String sql, Func`2 readerFunc, Object[] sqlParams)

### To reproduce
Update Nuget to 5.0.0-Preview3.22168.1
Publish within Visual Studio (Net core 6/7.0.100-preview.5.22307.18) with Produce Single File Checked.

### Expected behavior
When published, I get the 2 config files I use (appsettings.json and SharedSettings.json), the program (.exe) and Microsoft.Data.SqlClient.SNI.dll

With the 5.0.0, I get the same files and there is a date difference (3/24/2022) to (06/14/2022) and a slight size difference. the Product Version under Properties/Details both show 5.0.0.

### Further technical details
Microsoft.Data.SqlClient version: (f5.0.0-Preview3.22168.1)
.NET target: (e.g.Core 7)
SQL Server version: (e.g. SQL Server 2019)
Operating system: (e.g. Windows 2019)

**Additional context**
I'm not sure if Microsoft.SqlServer.Server should have copied over with the other files or 'included' within the Microsoft.Data.SqlClient.SNI.dll. I tried copying over the Microsoft.SqlServer.Server.dll to the folder, but the program still fails with the same message. I suspect its looking for it to be imbedded but its not or there is some other issue.

Maybe its something I'm doing or the program I use for Messaging, DotNetCore.CAP, doesn't support the new SQL Client. If that the case, I can check with them.


@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 27, 2022

Known issue with preview 3, use 2 or wait for RTM.

@KayakFisher205
Copy link
Author

Should I close this issue or leave it until RTM?

@DavoudEshtehari
Copy link
Contributor

It's already fixed on PR #1654. Closing the issue since it's duplicated of #1650.

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

No branches or pull requests

3 participants