assembly-binding-redirect

Nuget Update-Package incorrectly updating assembly binding redirects

女生的网名这么多〃 提交于 2019-11-29 03:49:39
I have an internal NuGet package that contains a single dll, no external NuGet package dependencies, and no web.config transforms. Yet when i run Update-Package on my projects (class lib and website) for this specific NuGet, it automatically is updating my website web.config assembly binding redirects to older versions of System.Web.Mvc and Newtonsoft.Json. The website web.config currently has them bound to the latest version being used. Using the GUI, utilizing Manage NuGet packages for Solution... I choose to UPDATE this NuGet for applicable projects that have a reference to the old version.

Assembly Binding Redirect to a lower version

人走茶凉 提交于 2019-11-29 03:24:58
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> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name=

Error: Inheritance security rules violated by type: 'System.Web.WebPages.Razor.WebPageRazorHost'

ⅰ亾dé卋堺 提交于 2019-11-28 22:32:10
Out of nowhere my ASP.NET MVC 4 solution gives me this error: Inheritance security rules violated by type: 'System.Web.WebPages.Razor.WebPageRazorHost'. Derived types must either match the security accessibility of the base type or be less accessible. I Googled the problem and everybody says it has happened when anyone updates the solution from one version to another. But I didn't update my solution, just change the IDE from VS12 to VS13. Is this what creates the problem? The full stack trace is as follows: [TypeLoadException: Inheritance security rules violated by type: System.Web.WebPages

F# PowerPack Target Runtime

[亡魂溺海] 提交于 2019-11-28 05:46:55
问题 The pre-built binaries for the F# PowerPack are compiled against the .NET 2.0 runtime. If I have a .NET 4.0 project, is there any advantage to compiling the PowerPack source for the .NET 4 runtime? 回答1: I used .NET 2.0 version of F# PowerPack in F# snippets web site, which is a .NET 4.0 ASP.NET project. The only disadvantage of not using 4.0 version was that I had to add configuration to load 4.0 version of FSharp.Core.dll when looking for 2.0 version (which is referenced by the 2.0 version

Nuget Update-Package incorrectly updating assembly binding redirects

ぃ、小莉子 提交于 2019-11-27 16:07:32
问题 I have an internal NuGet package that contains a single dll, no external NuGet package dependencies, and no web.config transforms. Yet when i run Update-Package on my projects (class lib and website) for this specific NuGet, it automatically is updating my website web.config assembly binding redirects to older versions of System.Web.Mvc and Newtonsoft.Json. The website web.config currently has them bound to the latest version being used. Using the GUI, utilizing Manage NuGet packages for

Error: Inheritance security rules violated by type: 'System.Web.WebPages.Razor.WebPageRazorHost'

泄露秘密 提交于 2019-11-27 14:22:11
问题 Out of nowhere my ASP.NET MVC 4 solution gives me this error: Inheritance security rules violated by type: 'System.Web.WebPages.Razor.WebPageRazorHost'. Derived types must either match the security accessibility of the base type or be less accessible. I Googled the problem and everybody says it has happened when anyone updates the solution from one version to another. But I didn't update my solution, just change the IDE from VS12 to VS13. Is this what creates the problem? The full stack trace

Azure Functions binding redirect

≯℡__Kan透↙ 提交于 2019-11-27 07:50:46
Is it possible to include a web.config or app.config file in the azure functions folder structure to allow assembly binding redirects? Assuming you are using the latest (June'17) Visual Studio 2017 Function Tooling, I derived a somewhat-reasonable config-based solution for this following a snippet of code posted by npiasecki over on Issue #992 . It would be ideal if this were managed through the framework, but at least being configuration-driven you have a bit more change isolation. I suppose you could also use some pre-build steps or T4 templating that reconciles the versions of the nugets in

Assembly Binding redirect: How and Why?

偶尔善良 提交于 2019-11-27 06:35:15
This is not a problem question but a general understanding question on assembly binding redirect's working. Queries Why binding redirect shows only major version and not minor, build and revision numbers? Does old and new version change only when there is change in major version? <dependentAssembly> <assemblyIdentity name="FooBar" publicKeyToken="32ab4ba45e0a69a1" culture="en-us" /> <bindingRedirect oldVersion="7.0.0.0" newVersion="8.0.0.0" /> </dependentAssembly> Evk Why are binding redirects needed at all? Suppose you have application A that references library B, and also library C of

ASP.NET MVC security patch to version 3.0.0.1 breaks build [duplicate]

大城市里の小女人 提交于 2019-11-26 18:30:47
This question already has an answer here: Windows update caused MVC3 and MVC4 stop working 9 answers After installing the ASP.NET MVC 3 security update KB2990942 it appears the MVC version increased from 3.0.0.0 to 3.0.0.1 . This causes Visual Studio to no longer find the reference. <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> Resharper does not show any problems but the build fails with lots of unresolved MVC types and a warning: Warning : Could not resolve this reference. Could not locate the assembly

Assembly Binding redirect: How and Why?

你。 提交于 2019-11-26 10:18:43
问题 This is not a problem question but a general understanding question on assembly binding redirect\'s working. Queries Why binding redirect shows only major version and not minor, build and revision numbers? Does old and new version change only when there is change in major version? <dependentAssembly> <assemblyIdentity name=\"FooBar\" publicKeyToken=\"32ab4ba45e0a69a1\" culture=\"en-us\" /> <bindingRedirect oldVersion=\"7.0.0.0\" newVersion=\"8.0.0.0\" /> </dependentAssembly> 回答1: Why are