Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a runtime check for Microsoft.IO.Redist #7335

Closed
JoeRobich opened this issue Jan 25, 2022 · 4 comments · Fixed by #7460
Closed

Add a runtime check for Microsoft.IO.Redist #7335

JoeRobich opened this issue Jan 25, 2022 · 4 comments · Fixed by #7460
Assignees
Labels
Mono Mono-specific issues. Also see https://github.com/mono/msbuild Partner request triaged xplat
Milestone

Comments

@JoeRobich
Copy link
Member

Since #6771 merged, the net472 build uses Microsoft.IO.Redist (M.IO.R) instead of System.IO. This is a problem when running the net472 build on Linux or MacOS, since M.IO.R pinvokes into Kernel32 which is a Windows library.

1093 System.EntryPointNotFoundException: GetFullPathNameW assembly:<unknown assembly> type:<unknown type> member:(null) 
1094 at (wrapper managed-to-native) Interop+Kernel32.GetFullPathNameW(char&,uint,char&,intptr) 
1095 at System.IO.PathHelper.GetFullPathName (System.ReadOnlySpan`1[T] path, System.Text.ValueStringBuilder& builder) [0x0001c] in <d528d43e4d354c288aa6a5ce49a5eba7>:0 
1096 at System.IO.PathHelper.Normalize (System.String path) [0x00021] in <d528d43e4d354c288aa6a5ce49a5eba7>:0 
1097 at Microsoft.IO.Path.GetFullPathInternal (System.String path) [0x0000f] in <d528d43e4d354c288aa6a5ce49a5eba7>:0 
1098 at Microsoft.IO.Path.GetFullPath (System.String path) [0x00044] in <d528d43e4d354c288aa6a5ce49a5eba7>:0 

It would be good to have a runtime check and fallback to System.IO on non-windows platforms.

@JoeRobich JoeRobich added the needs-triage Have yet to determine what bucket this goes in. label Jan 25, 2022
@rainersigwald rainersigwald added this to the VS 17.2 milestone Jan 25, 2022
@rainersigwald rainersigwald added Mono Mono-specific issues. Also see https://github.com/mono/msbuild Partner request xplat and removed needs-triage Have yet to determine what bucket this goes in. labels Jan 25, 2022
@rainersigwald
Copy link
Member

@AR-May, does this sound like something that you could do?

@teo-tsirpanis
Copy link
Contributor

Microsoft.IO.Redist has been discontinued (dotnet/runtime#58359). With Visual Studio's imminent move to .NET Core-based MSBuild in #7258, perhaps it's time to discontinue it from MSBuild too. If it's so decided I will try it out.

@rainersigwald
Copy link
Member

@teo-tsirpanis We have many releases of MSBuild in our future that will run on .NET Framework in Visual Studio, which has only recently adopted Microsoft.IO.Redist for performance reasons. I see some "was this vetted with dependent teams?" questions in issues linked from your PR but I'm very surprised by this change. @adamsitnik did I miss some deprecation communication there?

#7258 does not represent a commitment to move off .NET Framework; it's more work along the lines of #7257 to create a more capable and unified MSBuild deployment scenario. We clarified that by editing the issue.

@adamsitnik
Copy link
Member

did I miss some deprecation communication there

You have not, as we haven't made it yet.

We have tried to find users of it (dotnet/runtime#54919 (comment)), but we did not find any. Since it was increasing the complexity (#if defs for .NET and .NET Framework) and maintenance (the logic had to be tested for both runtimes) we decided to stop shipping it. It means that we won't be adding new APIs to it, but if you hit a bug in the version that we have shipped with .NET 6, we are (most likely) going to fix it.

cc @jeffhandley

@Forgind Forgind self-assigned this Mar 14, 2022
rainersigwald pushed a commit that referenced this issue Mar 24, 2022
Microsoft.IO.Redist requires using a windows library, so it doesn't work on linux/mac. Users using framework on either of those platforms get exceptions.

Fixes #7335.
@AR-May AR-May added the triaged label Feb 21, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mono Mono-specific issues. Also see https://github.com/mono/msbuild Partner request triaged xplat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants