winforms 带有实体框架的Windows窗体在上崩溃,theninclude()仅在已发布版本上,而不在调试中

kzipqqlq  于 2022-11-17  发布在  Windows
关注(0)|答案(1)|浏览(108)

问题:我认为标题概括了这一点,但更详细地说,我正在尝试在Windows窗体应用程序中使用Entity Framework。它对所有“选择”都有效,但当我尝试使用.ThenInclude()时却不行,更奇怪的是,它只在发布的版本上崩溃。当我调试时,它工作得很好。一旦我发布了它,它就在.ThenInclude()上崩溃
错误代码如下:
“Microsoft.Data.SqlClient.TdsParser”的类型初始值设定项引发了异常。系统。类型初始化异常:“Microsoft.Data.SqlClient.SNILoadHandle”的类型初始值设定项引发了异常。---〉系统。类型初始化异常:“Microsoft.Data.SqlClient.SNINativeMethodWrapper”的类型初始值设定项引发了异常。
System.ComponentModel.Win32Exception:无法加载应用程序
System.ComponentModel.Win32Exception:找不到指定的模块
---内部异常堆栈跟踪结束---
在Microsoft的数据库中。
---内部异常堆栈跟踪结束---
在Microsoft中的数据。SqlClient。SNI活动方法 Package 。SNI初始化
在Microsoft的数据库中。
在Microsoft的数据库服务器上。
---内部异常堆栈跟踪结束---
在Microsoft的数据库中。
下面是只在发布时崩溃的方法:

public Tprojects DeepLoadProject(int intProjectID)
{
    Tprojects objTiers = new Tprojects();

    try
    {
        RefreshAll();
        objTiers = context.Tprojects
                          .Include(x => x.TprojectItems)
                          .ThenInclude(x => x.IntItem)
                          .Include(x => x.TprojectCustomerCompanies)
                          .ThenInclude(x => x.IntCustomerCompany)
                          .Include(x => x.TprojectCustomerCompanies)
                          .ThenInclude(x => x.TprojectCustomerCompanyContacts)
                          .ThenInclude(x => x.IntContact)
                          .Include(x => x.TprojectItems)
                          .ThenInclude(x => x.TprojectItemCompanyPrices)
                          .ThenInclude(x => x.IntProjectCustomerCompany)
                          .Where(x => x.IntProjectId == intProjectID)
                          .FirstOrDefault();
    }
    catch (Exception ex)
    {
        Show("There was an issue trying to connect to the server, please try again. If this error keeps showing please call an admin for further assistance.");
        SaveErrorLog("DeepLoadProjects " + ex.Message + ex.InnerException, "Hollywood");
    }

    return objTiers;
}

以下是我的程序集信息和完整错误:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.TdsParser' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.SNILoadHandle' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.SNINativeMethodWrapper' threw an exception. ---> System.ComponentModel.Win32Exception: Failed to load C:\Users\Scott\AppData\Local\Apps\2.0\KD9YXEPJ.DKY\5QCR3OCQ.WRY\vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2\x86\SNI.dll ---> System.ComponentModel.Win32Exception: The specified module could not be found
   --- End of inner exception stack trace ---
   at Microsoft.Data.SqlClient.SNINativeMethodWrapper..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize()
   at Microsoft.Data.SqlClient.SNILoadHandle..ctor()
   at Microsoft.Data.SqlClient.SNILoadHandle..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Data.SqlClient.TdsParser..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Data.SqlClient.TdsParser..ctor(Boolean MARS, Boolean fAsynchronous)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, ServerCertificateValidationCallback serverCallback, ClientCertificateRetrievalCallback clientCallback, DbConnectionPool pool, String accessToken, SqlClientOriginalNetworkAddressInfo originalNetworkAddressInfo, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
   at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at Microsoft.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at Microsoft.Data.SqlClient.SqlConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnection(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.InitializeReader(DbContext _, Boolean result)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at lambda_method(Closure , QueryContext )
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   at Vents_US_Inventory.modDatabaseUtilities.DeepLoadProject(Int32 intProjectID)
   at Vents_US_Inventory.CRMS_Forms.Projects.ProjectInfo.LoadProjectInfo()
   at Vents_US_Inventory.CRMS_Forms.Projects.ProjectInfo.ProjectInfo_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Vents-US Inventory
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Vents-US%20Inventory.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4550.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4536.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.EntityFrameworkCore
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36309
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.EntityFrameworkCore.DLL
----------------------------------------
netstandard
    Assembly Version: 2.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/netstandard/v4.0_2.0.0.0__cc7b13ffcd2ddd51/netstandard.dll
----------------------------------------
Microsoft.Bcl.AsyncInterfaces
    Assembly Version: 1.0.0.0
    Win32 Version: 4.700.20.21406
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Bcl.AsyncInterfaces.DLL
----------------------------------------
System.Threading.Tasks.Extensions
    Assembly Version: 4.2.0.1
    Win32 Version: 4.6.28619.01
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/System.Threading.Tasks.Extensions.DLL
----------------------------------------
Microsoft.EntityFrameworkCore.SqlServer
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36309
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.EntityFrameworkCore.SqlServer.DLL
----------------------------------------
Microsoft.EntityFrameworkCore.Relational
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36309
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.EntityFrameworkCore.Relational.DLL
----------------------------------------
Microsoft.Extensions.DependencyInjection.Abstractions
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.DependencyInjection.Abstractions.DLL
----------------------------------------
Microsoft.EntityFrameworkCore.Abstractions
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36309
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.EntityFrameworkCore.Abstractions.DLL
----------------------------------------
Microsoft.Extensions.Logging.Abstractions
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.Logging.Abstractions.DLL
----------------------------------------
System.ValueTuple
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ValueTuple/v4.0_4.0.0.0__cc7b13ffcd2ddd51/System.ValueTuple.dll
----------------------------------------
Microsoft.Extensions.Caching.Abstractions
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.Caching.Abstractions.DLL
----------------------------------------
Microsoft.Extensions.DependencyInjection
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.DependencyInjection.DLL
----------------------------------------
System.Diagnostics.DiagnosticSource
    Assembly Version: 4.0.5.0
    Win32 Version: 4.700.20.21406
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/System.Diagnostics.DiagnosticSource.DLL
----------------------------------------
System.Transactions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
Microsoft.Extensions.Logging
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.Logging.DLL
----------------------------------------
Microsoft.Extensions.Options
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.Options.DLL
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Runtime.Caching
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll
----------------------------------------
System.Data.DataSetExtensions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
Microsoft.Extensions.Caching.Memory
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.Caching.Memory.DLL
----------------------------------------
Microsoft.Extensions.Primitives
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.Primitives.DLL
----------------------------------------
System.ComponentModel.Annotations
    Assembly Version: 4.2.1.0
    Win32 Version: 4.6.26515.06
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/System.ComponentModel.Annotations.DLL
----------------------------------------
System.ComponentModel.DataAnnotations
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
Microsoft.Bcl.HashCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.700.20.56604
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Bcl.HashCode.DLL
----------------------------------------
System.Collections.Immutable
    Assembly Version: 1.2.5.0
    Win32 Version: 4.700.20.21406
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/System.Collections.Immutable.DLL
----------------------------------------
Microsoft.Extensions.Configuration.Abstractions
    Assembly Version: 3.1.28.0
    Win32 Version: 3.100.2822.36305
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Extensions.Configuration.Abstractions.DLL
----------------------------------------
Microsoft.Data.SqlClient
    Assembly Version: 1.13.20136.2
    Win32 Version: 1.13.20136.2
    CodeBase: file:///C:/Users/Scott/AppData/Local/Apps/2.0/KD9YXEPJ.DKY/5QCR3OCQ.WRY/vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2/Microsoft.Data.SqlClient.DLL
----------------------------------------

任何帮助都是非常感谢的。我已经在这个问题上困了太久了。
谢谢你!

kokeuurv

kokeuurv1#

为便于将来参考,这里是什么似乎是问题https://github.com/dotnet/SqlClient/issues/936
我发现了一个不太好的变通办法,但它一直有效,所以我想这并不是所有的坏。
这是我的变通办法,直到他们想出一个解决办法或告诉我我做错了什么。
我可以让它工作的唯一方法是在安装后的每个设备上,手动复制并粘贴项目文件中调试的x64和x86文件夹(其中包含SNI)到每台计算机的应用程序文件夹“C:\Users\Scott\AppData\Local\Apps\2.0\KD9YXEPJ.DKY\5QCR3OCQ.WRY\vent..tion_098ef6a925fa6387_0001.0009_35951381a6b516d2”。
声明一下,我还在寻找更好的答案:)

相关问题