roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

`OpenProjectAsync` logger's parameter is unused (public API)

Open Youssef1313 opened this issue 2 years ago • 4 comments

MSBuildWorkspace.OpenProjectAsync has a public overload with a logger parameter, which gets passed to MSBuildProjectLoader that is then not using it.

https://github.com/dotnet/roslyn/blob/3472dcbca677f86bced5a1f180ae45e83c3e8f2d/src/Workspaces/Core/MSBuild/MSBuild/MSBuildProjectLoader.cs#L160-L162

Youssef1313 avatar Feb 21 '24 13:02 Youssef1313

Related to https://github.com/dotnet/roslyn/pull/70469

cc @jasonmalinowski

Youssef1313 avatar Feb 21 '24 16:02 Youssef1313

Trying 4.9.0-1.final which is before #70469, it also doesn't work. But instead of doing nothing, it crashes:

Unhandled exception. Microsoft.Build.Framework.LoggerException: Failed to write to log file "BINLOG_PATH". The process cannot access the file 'BINLOG_PATH'

Youssef1313 avatar Feb 21 '24 16:02 Youssef1313

@Youssef1313 That does't look like something that'd be our problem?

jasonmalinowski avatar Feb 21 '24 19:02 jasonmalinowski

@jasonmalinowski Things work properly on 4.8.0

And 4.9.0-1.final crashes, and 4.9.0-3.final does nothing as the parameter is unused.

The same exception was also reported in https://github.com/dotnet/roslyn/issues/70674.

But anyways, 4.9.0-1.final isn't important as it's from the past. What would be needed here is supporting the logger parameter back.

Youssef1313 avatar Feb 21 '24 19:02 Youssef1313