From 185b25b40132448b910fbd8cbf35d56bfb0b181d Mon Sep 17 00:00:00 2001 From: Aptivi Date: Tue, 10 Sep 2024 12:59:05 +0300 Subject: [PATCH] fix - bkp - Fixed bogus attribute error when Hot... ...Reload'ing --- Visual Studio 2022, if you have a project that has Source Link and you attempt to make an edit to any of the kernel code as you debug it without rebuilding it, will go berserk with an error message that says to the effect of: .AssemlyInfo.cs (line xx): error ENC0003: Updating 'attribute' requires restarting the application. as per issue dotnet/sdk#36666. If we've attempted to manually set true in the Directory.Build.props that define global properties of all the projects in a solution, the issue is fixed. This issue is not fixed yet when omitting this property. Investigating this further in the https://github.com/dotnet/sourcelink/blob/main/src/SourceLink.Common/build/Microsoft.SourceLink.Common.props file, we've found something interesting. This property list file contains this line: true For some reason, this property is not being set, causing all sorts of 'attribute' update errors, despite being implicitly set to true in case this property doesn't exist. --- Type: fix Breaking: False Doc Required: False Backport Required: True Part: 1/1 --- Directory.Build.props | 1 + 1 file changed, 1 insertion(+) diff --git a/Directory.Build.props b/Directory.Build.props index 7a2749a..4e0e8de 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,6 +9,7 @@ True enable CS9057,CS8002,nullable + true $(MSBuildThisFileDirectory) $(RootPath)\aptivi_snk.snk