-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[vs17.13] Don't mark synthesized projects dirty when SDKs define properties #11478
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ot be marked dirty
Co-authored-by: Rainer Sigwald <[email protected]>
Try disabling AV in the official build script to avoid build breaks that manifest as ``` D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\9.0.0-beta.24516.2\tools\Sign.proj(72,5): error MSB4018: The "Microsoft.DotNet.SignTool.SignToolTask" task failed unexpectedly. System.Runtime.Serialization.SerializationException: Type 'System.AssemblyLoadEventArgs' in assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. at Microsoft.Build.BackEnd.Components.RequestBuilder.AssemblyLoadsTracker.CurrentDomainOnAssemblyLoad(Object sender, AssemblyLoadEventArgs args) at System.AppDomain.OnAssemblyLoadEvent(RuntimeAssembly LoadedAssembly) at Microsoft.Build.Framework.ITask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [D:\a\_work\1\s\.packages\microsoft.dotnet.arcade.sdk\9.0.0-beta.24516.2\tools\Sign.proj] ``` --------- Co-authored-by: Jan Provaznik <[email protected]>
This is approved by tactics in #11454 |
rainersigwald
approved these changes
Feb 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Fixes #11394
This is a regression. The bug appeared after Expand MSBuildSdkResolver.
Customer impact
Without this fix the customers that opt-into
MsBuildUseSimpleProjectRootElementCacheConcurrency
will getSystem.NotImplementedException
. This includesslngen
andquickbuild
.Details
The
NotImplementedException
is thrown here:msbuild/src/Build/Evaluation/SimpleProjectRootElementCache.cs
Lines 133 to 136 in aff5455
Previously the
SdkResult
ofMSBuildSdkResolver
was empty andProjectRootElement
was never created for it. Now, it contains 2 properties, and whenProjectRootElement
is created, every change marks it as dirty. The fix is not to mark it dirty when it is fromSdkResult
Changes made
Implemented internal
CreateNotDirty
that createsProjectRootElement
that cannot be dirtied.Testing
Added unit test for
CreateNotDirty
. Also manually tested that the exception is not thrown anymore.Risks
Low - existing tests ensure that other scenarios are not broken, added new test, also tested manually this exact case.