assembly-binding-redirect

migrate.exe ignoring binding redirects

浪尽此生 提交于 2020-01-22 20:06:09
问题 I am trying to run the migrate.exe application from EntityFramework on a specific DLL. This DLL references the Microsoft.Azure.KeyVault.WebKey nuget package. When I try to run the command ./migrate MyProject.Data /startUpDirectory=C:\myDir /startUpConfigurationFile=C:\myDir\Redirect.config I get the following error ERROR: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6ae ed' or one of its dependencies. The located assembly's

Configuration of .NET assembly binding of any newer assembly version in app.config <assemblyBinding>/<codeBase>

这一生的挚爱 提交于 2020-01-14 19:14:36
问题 In a C# project, I use an external assembly and add it in the References of the project. Let's say the assembly is called " ABC " , located at compile-time c:\complie-time\abc.dll of version 1.0.0.0 . The "Copy Local" is set to false. Because it is not copied local, the assembly location has to be specified in app.config. <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="ABC" culture="neutral" publicKeyToken="xyz"/> <codeBase

Assembly Binding Redirect to a lower version

纵然是瞬间 提交于 2020-01-10 01:05:16
问题 I am trying to downgrade a NServiceBus dependency so instead of using 4.0.0.0 to use 2.5.0.0 I am trying with the following ways, none of which seem to work. <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="NServiceBus" publicKeyToken="9fc386479f8a226c" culture="neutral"/> <bindingRedirect oldVersion="4.0.0.0" newVersion="2.5.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> I also tried with codebase : <runtime>

Why do I get a missing method exception runtime when creating a SqlClient type?

谁说胖子不能爱 提交于 2020-01-03 17:04:34
问题 I have the following code: open FSharp.Data [<Literal>] let connectionString = @"Data Source=(local)\SQLExpress;Integrated Security=SSPI;Database=SfagStage" type InsertEnhet = SqlCommandProvider<"Sql\InsertEnhet.sql", connectionString> let insertEnhet (enhet:Enhet) = let cmd = new InsertEnhet() // <<--- This generates an error runtime cmd.Execute(enhet.Navn, enhet.Enhetsnummer, enhet.LEIKode, enhet.Kommune, DateTime.Now) The row where I create the command is what causing the missing method I

How to write a NuGet package that updates the binding redirects when the package reference is upgraded?

为君一笑 提交于 2019-12-25 17:20:45
问题 We use VS 2017 and consume NuGet packages the old way. We do not use PackageReference as of yet. When a NuGet package reference is updated through the NuGet Manager in VS, the respective assembly binding redirect is not updated automatically - we have to do it manually. So, I suppose it is up to the package to take care of it through the tools\install.ps1 script. Now, I think I know how to implement it, but I do not want to invent the wheel. Surely the code already exists somewhere, but where

How to write a NuGet package that updates the binding redirects when the package reference is upgraded?

隐身守侯 提交于 2019-12-25 17:20:10
问题 We use VS 2017 and consume NuGet packages the old way. We do not use PackageReference as of yet. When a NuGet package reference is updated through the NuGet Manager in VS, the respective assembly binding redirect is not updated automatically - we have to do it manually. So, I suppose it is up to the package to take care of it through the tools\install.ps1 script. Now, I think I know how to implement it, but I do not want to invent the wheel. Surely the code already exists somewhere, but where

Could not load file or assembly 'System.ComponentModel.Annotations' in published .Net 4.6.1 project referencing .Net Standard library

回眸只為那壹抹淺笑 提交于 2019-12-22 06:27:12
问题 PLEASE NOTE : This is not a duplicate of Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0. Unlike the issue linked, this issue occurs only after publishing the application. As you will see below, I have tried every solution proposed in that post with no success. This issue occurs in a WPF .Net Framework 4.6.1 project which references a .Net Standard 2.0 library which itself references the System.ComponentModel.Annotations NuGet package. The issue is

Could not load file or assembly 'System.ComponentModel.Annotations' in published .Net 4.6.1 project referencing .Net Standard library

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 06:26:26
问题 PLEASE NOTE : This is not a duplicate of Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0. Unlike the issue linked, this issue occurs only after publishing the application. As you will see below, I have tried every solution proposed in that post with no success. This issue occurs in a WPF .Net Framework 4.6.1 project which references a .Net Standard 2.0 library which itself references the System.ComponentModel.Annotations NuGet package. The issue is

Asp core wrong assembly redirect on publish

喜欢而已 提交于 2019-12-22 04:10:27
问题 When publishing my asp core project using visual studio a .config file is created alongside my executable. The .config includes a couple of bindingRedirect like this: <?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="6.0.0.0" newVersion="8.0.0.0" /> <bindingRedirect oldVersion=

Adding a bindingRedirect to a .Net Standard library

╄→尐↘猪︶ㄣ 提交于 2019-12-18 02:09:28
问题 I have a .Net Standard library, and I'm getting an error when trying to use one of the dependant libraries, which I believe is down to a version conflict. In an old style .Net Class library, I might add something like this: <?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0