Analyzer DLL Path Change in v24
Closed this issue · 6 comments
The v24 VSIX has Code Analyzer DLLs in a different directory than alc.exe
They are located in alc\extension\bin\Analyzers while alc.exe is in alc\extension\bin\win32
This breaks the Code Analyzers in Compile-AppWithArtifact as they are being searched in the wrong path
I will check. It is connected to #37 as it seems the structure of the vsix was changed. Thanks for reporting!
released in v2.7.0.
Thanks for reporting!
Issue remains in 2.7.0
Looking for missing MS dependencies
Copying Microsoft_Application_24.0.16336.0.app
.\alc.exe /project:"C:\agent_work\10\s" /packagecachepath:"C:\agent_work\10\s" /out:"C:\agent_work\10\s\redacted_24.0.51.1223.app" /analyzer:C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.CodeCop.dll /analyzer:C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.AppSourceCop.dll /analyzer:C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.UICop.dll /ruleset:C:\agent_work\10\s\cmh.ruleset.json /SourceRepositoryUrl:"[redacted /SourceCommit:"b0269be88daf5371aeb0b80874baab6d7f4d358b" /BuildBy:";NVRAppDevOps, v2.7.0" /BuildUrl:"https://dev.azure.com/https://dev.azure.com/dynamixware/Customer/_build/results?buildId=1223"
Microsoft (R) AL Compiler version 13.0.14.23919
Copyright (C) Microsoft Corporation. All rights reservedCompilation started for project 'redacted' containing '411' files at '14:38:33.766'.
##[error]Metadata file 'C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.CodeCop.dll' could not be found
##[debug]Processed: ##vso[task.logissue type=error;code=AL1006;]Metadata file 'C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.CodeCop.dll' could not be found
##[error]Metadata file 'C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.AppSourceCop.dll' could not be found
##[debug]Processed: ##vso[task.logissue type=error;code=AL1006;]Metadata file 'C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.AppSourceCop.dll' could not be found
##[error]Metadata file 'C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.UICop.dll' could not be found
##[debug]Processed: ##vso[task.logissue type=error;code=AL1006;]Metadata file 'C:\Users\BuildAgent\AppData\Local\Temp\alc\extension\bin\win32\Microsoft.Dynamics.Nav.UICop.dll' could not be foundCompilation ended at '14:38:35.474'.
App generation failed with exit code 1
It is still looking in the win32 folder rather than in the Analyzers folder that is in its parent.
In Compile-AppWithArtifact, if the ALC path is in then the following logic will result in incorrect paths:
if (Test-Path (Join-Path $binPath 'Analyzers\Microsoft.Dynamics.Nav.CodeCop.dll')) {
$AnalyzersbinPath = Join-Path $binPath 'Analyzers' #pre BCv24
}
else {
$AnalyzersbinPath = $binPath #BCv24 and later
}
Changing BCv24 line to this works:
$AnalyzersbinPath = Join-Path $binPath '..\Analyzers' #BCv24 and later
Thanks, I have overlooked that in the bin path is Microsoft.Dynamics.Nav.CodeAnalysis.dll and not Microsoft.Dynamics.Nav.CodeCop.dll.
Published in v2.7.1