-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Design-time race condition with MyProject.GeneratedMSBuildEditorConfig.editorconfig #51768
Comments
Related: OmniSharp/omnisharp-roslyn#2112 |
Here's a quick and dirty workaround: <Target Name="Roslyn51768Workaround" BeforeTargets="BeforeBuild">
<CreateProperty Value="$(IntermediateOutputPath)$(MSBuildProjectName).d$(DesignTimeBuild)-b$(BuildingProject).GeneratedMSBuildEditorConfig.editorconfig">
<Output
TaskParameter="Value"
PropertyName="GeneratedMSBuildEditorConfigFile" />
</CreateProperty>
</Target> |
@chsienki Do you think the issue here is that simply the task inputs are not reflected in target inputs? roslyn/src/Compilers/Core/MSBuildTask/Microsoft.Managed.Core.targets Lines 169 to 171 in b0b4061
roslyn/src/Compilers/Core/MSBuildTask/Microsoft.Managed.Core.targets Lines 192 to 193 in b0b4061
So basically once the file is written, the target is seen as up to date and is incorrectly skipped? |
Version Used: 16.9 or 16.10
Steps to Reproduce:
GeneratedMSBuildEditorConfig.editorconfig
file, which detects the presence of design time builds (BuildingProject
isfalse
)Expected Behavior:
Design-time builds don't interfere with the main build.
Actual Behavior:
The main build may fail because the
BuildingProject
is false where it should be try.Additional information
This kind of optimization is useful to determine whether to avoid generating extended and expensive source during design-time. It looks like the
GeneratedMSBuildEditorConfig.editorconfig
is shared for both build types and can get mixed depending on the build type.This issue is even more visible on vscode with omnisharp, where there may be even less synchronization between command line builds and design-time builds.
The text was updated successfully, but these errors were encountered: