question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Binding redirects should be enabled by default when target .NET Framework

See original GitHub issue

We don’t support .NET Framework projects via SDK-style projets yet, but many of us are dog fooding this experience already. I had to add the following two lines to my project to get binding redirects in my unit testing project:

<PropertyGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>

We should make sure this ends up in the default props so that customers don’t have to know that – they expect binding redirects to just work.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
nguerreracommented, Apr 6, 2017

Perhaps we should have <TreatAsExecutable>true</TreatAsExecutable> in test SDK. And we would default TreatAsExecutable to OutputType==Exe in core SDK and replace all checks of OutputType==Exe with TreatAsExecutable==true.

1reaction
JoseFMPcommented, Jun 19, 2017

Any news on this issue? Was it shipped?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redirecting Assembly Versions - .NET Framework
Redirect compile-time binding references to different versions of .NET assemblies, third-party assemblies, or your own app's assemblies.
Read more >
Binding Redirects
The fix if you're using .NET Framework · Enable <AutoGenerateBindingRedirects> (this doesn't work for web projects - it doesn't handle web.config ).
Read more >
Adding a bindingRedirect to a .Net Standard library
Binding redirects are a .NET framework concept, there are no binding redirects on .NET Standard and .NET Core. However, an application (the ...
Read more >
Automatically generating assembly binding redirects
NET has a weird way of referencing dependencies. When one "assembly" (EXE or DLL) references another, there are four items stored:.
Read more >
Configuring .NET Framework Assembly-binding Redirects
The method described below works: when you get an exception because the runtime gets an unexpected version of an assembly—e.g. “The located ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found