Your pull request effectively make the code worse, as `{ L"Windows.Foundation.UniversalApiContract", 10, },` means `10` or lower. So `{ L"Windows.Foundation.UniversalApiContract", 7, },` was already included by `{ L"Windows.Foundation.UniversalApiContract", 10, },` But due to how `is_api_contract_present` work, it only take the first element with a name into consideration.
This is a simplified pseudo code with comments of `is_api_contract_present` to show the loop stop at first name match: ```java boolean is_api_contract_present(String name,int version) { for (present_contract : present_contracts) // List though all entries if (present_contract.name == name)) // Check is name is equal return version <= present_contract.max_major; // Check if version is lower than max_major, and return
return false; // No match found, return that we didn't found anything } ``` Note: the `return` keyword stop code execution, and return the value. (I'm assuming you didn't understood the code you sent there, as I'm pretty sure if you understood that code before sending it you wouldn't have opened this MR)
Further more, `Windows.Foundation.UniversalApiContract` is a dotnet 5 feature. (Source: https://github.com/madewokherd/wine-mono/issues/151#issuecomment-1232824011) Wine (and Wine-mono) currently only support up to dotnet 4 on a clean install.
If you want I can teach you code for free so you can actually read and understand the code before you are sending it to wine upstream.
In the meantime I'll see what I can do to try to get the issue fixed.