dotnet / dotnet/maintenance-packages

Expected BindingRedirect behaviour with System.ValueTuple on net47x

Open
#266 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
44
Forks
24
Avg merge
2d 14h
Merged PRs (30d)
1

Description

I had been having issues with System.ValueTuple but upgraded to the latest release 4.6.2.

I have read through other related issues eg https://github.com/dotnet/maintenance-packages/issues/243

Now I have binding redirect issues and just wanted to check: when a package is redirected to the "inbox" version, should auto generating the redirects be aware of this, as at the moment, auto generated redirects break dll resolution for System.ValueTuple.

Here is our situation:

- System.ValueTuple was a nuget Package that some other Packages still (transiently) reference today
- System.ValueTuple is part of the .NET Framework from net47x, so should load the "inbox" fx version
- Transient references still appear to require binding redirects (eg if we don't have a redirect we still get errors like "Error during LoadMefPartsFromDirectory while loading from dir: Could not load file or assembly 'System.ValueTuple, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."
- Having a redirect like the following does fix these loading issues:
```





```

- either: AutoGenerateBindingRedirects and GeneratedBindingRedirectsAction do not appear to understand that they should generate redirects to the framework version, and instead generate redirects to the nuget package version, which causes runtime errors, they generate redirects like this:

```




```
- or the framework does not appear to understand it should ignore the redirect version.

As far as I can see, the only option is to switch off AutoGenerateBindingRedirects, or implement some post generation hook to put it back to the inbox version.
Is this something the package has control of, or is it all framework?
Am I missing some other config to get this to work smoothly

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.