-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Make compiler detection more resilient #78402
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
Conversation
This changes the way our build task finds the csc to launch to longer depend on the `CompilerType` task argument. At the core for every deployment kind of the task there is only one possible compiler that can be loaded. Hence change our logic to better assert which deployment we are in and locate the compiler based on that.
@@ -12,6 +12,8 @@ | |||
using Roslyn.Test.Utilities; | |||
using Microsoft.CodeAnalysis.BuildTasks.UnitTests.TestUtilities; | |||
using Xunit.Abstractions; | |||
using Microsoft.CodeAnalysis.Test.Utilities; | |||
using System.Reflection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider sorting the usings.
@dotnet/roslyn-compiler PTAL |
@333fred, @chsienki, @RikkiGibson PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (iteration 8). Only some minor nits/typos
Co-authored-by: Fred Silberberg <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 12)
is this backported to preview4 ? |
@rmarinho no, it's not, it will be in preview5. Are you hitting some issues that need this and don't have a workaround? |
Yeah we are hitting this in .NET MAUI and VisualStudio . @jaredpar suggest a workaround Full but seems it doesn t work in all cases. |
Can you link an issue that we can investigate? |
This changes the way our build task finds the csc to launch to longer depend on the
CompilerType
task argument. At the core for every deployment kind of the task there is only one possible compiler that can be loaded. Hence change our logic to better assert which deployment we are in and locate the compiler based on that.This removes the need to add extra parameters to every
<Csc>
invocation which was causing issues in .NET 10 SDK