Microsoft Visual Studio Installer Projects 2022 strings.platformnotsupported_datasqlclient - c#

Hello i have an issue when my application is running after installing using Microsoft Visual Studio Installer Projects 2022. When i try to connect to the database throw an Exception in runtime strings.platformnotsupported_datasqlclient
I am under windows 10, using net 6 to develope the application in WindowsForm using Entity Framework.
If i publish the application into a folder i do not have the exception, my program runs. But i need an installer.
Exception:
Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración
Just-In-Time (JIT) en lugar de a este cuadro de diálogo.
************** Texto de la excepción **************
System.PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform.
at Microsoft.Data.SqlClient.SqlConnectionStringBuilder..ctor(String connectionString)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.<>c.<get_IsMultipleActiveResultSetsEnabled>b__7_0(String cs)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.get_IsMultipleActiveResultSetsEnabled()
at Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerCompiledQueryCacheKeyGenerator.GenerateCacheKey(Expression query, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable`1 source, Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable`1 source, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.CountAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
at WinFormsAppDailyPayments.Services.UserServices.UserLogin(String alias, String password) in C:\Users\egomez\source\repos\WinFormsAppDailyPaymetns\WinFormsAppDailyPaymetns\Services\UserServices.cs:line 13
at WinFormsAppDailyPayments.Forms.LoginForm.buttonLogin_Click(Object sender, EventArgs e) in C:\Users\egomez\source\repos\WinFormsAppDailyPaymetns\WinFormsAppDailyPaymetns\Forms\LoginForm.cs:line 170
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
************** Ensamblados cargados **************
System.Private.CoreLib
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Private.CoreLib.dll
----------------------------------------
WinFormsAppDailyPayments
Versión del ensamblado: 1.0.0.0
Versión Win32: 1.0.0.0
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/WinFormsAppDailyPayments.dll
----------------------------------------
System.Runtime
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Runtime.dll
----------------------------------------
System.Threading
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Threading.dll
----------------------------------------
System.Windows.Forms
Versión del ensamblado: 6.0.2.0
Versión Win32: 6.0.1322.60101
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/System.Windows.Forms.dll
----------------------------------------
System.ComponentModel.Primitives
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.ComponentModel.Primitives.dll
----------------------------------------
System.Windows.Forms.Primitives
Versión del ensamblado: 6.0.2.0
Versión Win32: 6.0.1322.60101
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/System.Windows.Forms.Primitives.dll
----------------------------------------
System.Runtime.InteropServices
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Runtime.InteropServices.dll
----------------------------------------
System.Drawing.Primitives
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Drawing.Primitives.dll
----------------------------------------
System.Collections.Specialized
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Collections.Specialized.dll
----------------------------------------
System.Diagnostics.TraceSource
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Diagnostics.TraceSource.dll
----------------------------------------
System.Collections
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Collections.dll
----------------------------------------
System.Drawing.Common
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/System.Drawing.Common.dll
----------------------------------------
Microsoft.Win32.Primitives
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/Microsoft.Win32.Primitives.dll
----------------------------------------
System.ComponentModel.EventBasedAsync
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.ComponentModel.EventBasedAsync.dll
----------------------------------------
System.Threading.Thread
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Threading.Thread.dll
----------------------------------------
Accessibility
Versión del ensamblado: 4.0.0.0
Versión Win32: 6.0.1322.60101
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/Accessibility.dll
----------------------------------------
System.ComponentModel.TypeConverter
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.ComponentModel.TypeConverter.dll
----------------------------------------
System.Numerics.Vectors
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Numerics.Vectors.dll
----------------------------------------
System.ComponentModel
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.ComponentModel.dll
----------------------------------------
System.Resources.Extensions
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/System.Resources.Extensions.dll
----------------------------------------
System.Memory
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Memory.dll
----------------------------------------
System.Drawing
Versión del ensamblado: 6.0.2.0
Versión Win32: 6.0.1322.60101
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/System.Drawing.dll
----------------------------------------
System.ObjectModel
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.ObjectModel.dll
----------------------------------------
System.Linq
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Linq.dll
----------------------------------------
Microsoft.Win32.SystemEvents
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/Microsoft.Win32.SystemEvents.dll
----------------------------------------
System.Collections.NonGeneric
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Collections.NonGeneric.dll
----------------------------------------
System.Runtime.CompilerServices.Unsafe
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Runtime.CompilerServices.Unsafe.dll
----------------------------------------
System.Collections.Concurrent
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Collections.Concurrent.dll
----------------------------------------
System.Security.Cryptography.Algorithms
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Security.Cryptography.Algorithms.dll
----------------------------------------
System.Security.Cryptography.Primitives
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Security.Cryptography.Primitives.dll
----------------------------------------
System.Linq.Expressions
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Linq.Expressions.dll
----------------------------------------
Microsoft.EntityFrameworkCore
Versión del ensamblado: 7.0.2.0
Versión Win32: 7.0.222.58006
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.EntityFrameworkCore.dll
----------------------------------------
System.Linq.Queryable
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Linq.Queryable.dll
----------------------------------------
System.Collections.Immutable
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Collections.Immutable.dll
----------------------------------------
Microsoft.Extensions.DependencyInjection.Abstractions
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.DependencyInjection.Abstractions.dll
----------------------------------------
System.Diagnostics.Tracing
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Diagnostics.Tracing.dll
----------------------------------------
Microsoft.Extensions.DependencyInjection
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.DependencyInjection.dll
----------------------------------------
Microsoft.Extensions.Logging.Abstractions
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.Logging.Abstractions.dll
----------------------------------------
System.Diagnostics.DiagnosticSource
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Diagnostics.DiagnosticSource.dll
----------------------------------------
Microsoft.EntityFrameworkCore.Abstractions
Versión del ensamblado: 7.0.2.0
Versión Win32: 7.0.222.58006
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.EntityFrameworkCore.Abstractions.dll
----------------------------------------
Microsoft.Extensions.Caching.Abstractions
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.Caching.Abstractions.dll
----------------------------------------
System.Threading.ThreadPool
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Threading.ThreadPool.dll
----------------------------------------
System.Reflection.Emit.ILGeneration
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Reflection.Emit.ILGeneration.dll
----------------------------------------
System.Reflection.Emit.Lightweight
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Reflection.Emit.Lightweight.dll
----------------------------------------
System.Reflection.Primitives
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Reflection.Primitives.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Versión del ensamblado: 0.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Private.CoreLib.dll
----------------------------------------
System.Configuration.ConfigurationManager
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/System.Configuration.ConfigurationManager.dll
----------------------------------------
Microsoft.EntityFrameworkCore.SqlServer
Versión del ensamblado: 7.0.2.0
Versión Win32: 7.0.222.58006
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.EntityFrameworkCore.SqlServer.dll
----------------------------------------
System.Private.Uri
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Private.Uri.dll
----------------------------------------
System.Runtime.InteropServices.RuntimeInformation
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Runtime.InteropServices.RuntimeInformation.dll
----------------------------------------
System.Xml.ReaderWriter
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Xml.ReaderWriter.dll
----------------------------------------
System.Private.Xml
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Private.Xml.dll
----------------------------------------
System.Net.WebClient
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Net.WebClient.dll
----------------------------------------
System.Text.Encoding.Extensions
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Text.Encoding.Extensions.dll
----------------------------------------
Microsoft.EntityFrameworkCore.Relational
Versión del ensamblado: 7.0.2.0
Versión Win32: 7.0.222.58006
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.EntityFrameworkCore.Relational.dll
----------------------------------------
System.Data.Common
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Data.Common.dll
----------------------------------------
System.Transactions.Local
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Transactions.Local.dll
----------------------------------------
Microsoft.Extensions.Logging
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.Logging.dll
----------------------------------------
Microsoft.Extensions.Options
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.Options.dll
----------------------------------------
System.Text.Json
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Text.Json.dll
----------------------------------------
Microsoft.Extensions.Configuration.Abstractions
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.Configuration.Abstractions.dll
----------------------------------------
Microsoft.Extensions.Caching.Memory
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.Caching.Memory.dll
----------------------------------------
Microsoft.Extensions.Primitives
Versión del ensamblado: 7.0.0.0
Versión Win32: 7.0.22.51805
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Extensions.Primitives.dll
----------------------------------------
System.ComponentModel.Annotations
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.ComponentModel.Annotations.dll
----------------------------------------
System.Net.Primitives
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Net.Primitives.dll
----------------------------------------
System.Net.NetworkInformation
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Net.NetworkInformation.dll
----------------------------------------
Microsoft.Data.SqlClient
Versión del ensamblado: 5.0.0.0
Versión Win32: 5.0.0.0
Código base: file:///C:/Program%20Files%20(x86)/Grupo%20Total%2099/Pagos%20Diarios/Microsoft.Data.SqlClient.dll
----------------------------------------
System.Runtime.Loader
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Runtime.Loader.dll
----------------------------------------
System.Windows.Forms.resources
Versión del ensamblado: 6.0.2.0
Versión Win32: 6.0.1322.60101
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.13/es/System.Windows.Forms.resources.dll
----------------------------------------
System.Diagnostics.StackTrace
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Diagnostics.StackTrace.dll
----------------------------------------
System.Reflection.Metadata
Versión del ensamblado: 6.0.0.0
Versión Win32: 6.0.1322.58009
Código base: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.13/System.Reflection.Metadata.dll
----------------------------------------
************** Depuración JIT **************
My Connectio string is taking as:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
try
{
string connectionString = ConfigurationManager.ConnectionStrings["sql"].ConnectionString;
optionsBuilder.UseSqlServer(connectionString);
}
catch
{
optionsBuilder.UseSqlServer(string.Empty);
}
}

I had the same problem it seems to be a red herring of sorts.
My project setup:
Visual studio 2022
.NET 6
EF Core 6.0.11
Winforms
Microsoft Visual Studio Installer Projects 2022
When the application is installed from the MSI produced by the Setup project from Microsoft Visual Studio Installer Projects, I got the following error when trying to run the app in the event viewer:
Application: ApplicationName.exe
CoreCLR Version: 6.0.1322.58009
.NET Version: 6.0.13
Description: The process was terminated due to an unhandled exception.
Exception Info: System.PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform.
at Microsoft.Data.SqlClient.SqlConnectionStringBuilder..ctor(String connectionString)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.<>c.<get_IsMultipleActiveResultSetsEnabled>b__7_0(String cs) etc…..
I noticed that the installation folder was missing the file “ApplicationName.deps.json” copying this to installation folder removed the error and the app worked.
The deps.json file contains metadata about the location and compilation of referenced assemblies, which explains why it’s throwing up the error shown above.
To get the installer working correctly you can go in to the file system of your Setup Project in Visual Studio and explicitly add the deps.json file in to the Application Folder. When you rebuild the Setup Project and install the issue should be resolved.

Related

MsBuild vs dotnet build [duplicate]

This question already has an answer here:
What's the difference between using dotnet and MSBuild for building .NET applications?
(1 answer)
Closed 13 days ago.
When have I to use one or the other one?
I think that for net framework projects I’ve to use msbuild and for .net projects the dot net build but I don’t why
The article of dotnet build says:
dotnet build uses MSBuild to build the project
So you needn't worry about the choice, MSBuild is the end of everything. You can use dotnet build to build a .Net Framework project.
For the word MsBuild I suppose you mean MSBuild for .Net Framework, it can't build .Net/.Net Core projects.

Nuget Package not installing in framework 4.6.1 VS 2017 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Error Could not install package 'Microsoft.EntityFrameworkCore 5.0.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Installing in Visual Studio 2017
Microsoft.EntityFrameworkCore targets .NET Standard 2.1, which basically means it will only work on .NET Core 3.1 or above; .NET Framework (any version) does not support .NET Standard 2.1; some versions of .NET Framework support .NET Standard 2.0 (at least, sort-of), but that isn't enough.
Two options:
move away from .NET Framework (hugely preferred option) - ideally to .NET 5.0 or .NET Core 3.1 (at time of writing)
use an older version of Entity Framework; EF 6.4.4 works down to .NET 4.0, or (as noted by Hostel in comments) EF Core 3.1.10 may work on .NET Framework 4.6.1

Relationship between .NET version and C# version? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
How can I determine what version of C# I can use against a particular .NET Framework version?
I have read:
https://stackoverflow.com/a/247623/223742
https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
However I cannot tell with any degree of certainty what version of C# I can use say against .NET Framework 4.6.1 for instance.
C# version history could be found here.
C# version depends on the compiler version which is shipped with .NET SDK (generally known installed with Visual Studio Installer).
You could still target an .NET implementation (which means .NET Core, Mono, or the obsoleted .NET Framework) of lower version with a project that builds with SDKs of a later version, but some language features are not supported, which are implemented with some built-in types that are not provided by the target .NET implementation. For example, you cannot use the tuple syntax targeting .NET Framework 4.5, even if you build it with the latest .NET SDK, because .NET Framework 4.5 does not have ValueType definitions. But some could be fixed with nuget packages that supplement them such as System.ValueTuple.
C# 8.0 has already been released with .NET Core 3.0.

Xamarin.Android error "PresentationFramework, Version=4.0.0.0, Culture=neutral" [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I got this error when i changed my project folder in xamarin.android.
Severity Code Description Project File Line Suppression State Error
Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'PresentationFramework, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Perhaps it doesn't
exist in the Mono for Android profile? File name:
'PresentationFramework.dll' at
Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference
reference, ReaderParameters parameters) at
Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference
reference) at
Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver
resolver, ICollection`1 assemblies, AssemblyDefinition assembly,
Boolean topLevel) at
Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver
resolver) Project.Novo
Can you help-me? ;-;
i did it, i just add reference from "Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\'VERSION\'Nome da DLL'".

I'm trying to install this package but i can't! Xunit.Microsoft.VisualStudio.TestTools.UnitTesting [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Please i want Install Unit Test
'Xunit.Microsoft.VisualStudio.TestTools.UnitTesting 1.0.0-beta-1011'. You are attempting to install this package in a project that has '. NETFramework, Version = v4. 5 1' as a destination, but the package does not contain assembly references or content files that are compatible with that framework. For more information, please contact the author of the package. 0
The dll you are trying to add, Xunit.Microsoft.VisualStudio.TestTools.UnitTesting, doesn't match the target framework of your project.
Specifically, the DLL you are trying to add is a beta version needing .NET framework 4.6, and you project is currently .NET 4.5.1.
You could either change the target framework of your project, or look for a matching dll.
To see/change, target framework of your project:
Right click project's name
Click on "Properties"
There you will see "Target framework" dropdown (under Application tab, that should be open by default)
See: https://xunit.github.io/docs/getting-started-desktop.html#add-xunit-ref
As a side note, if you are experiencing the following error, after changing your target framework to 4.6:
Install-Package : 'NETStandard.Library' already has a dependency defined..., try updating your nuget installation.

Categories