You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been reported by different users.
The previous assumption was using the latest VS 2022 created project will not have this issue.
However, we now can repro on the official template with latest VS 2022. the /ZH:SHA_256 can be seen in the raw command line but it does not get applied, or applied but the hash type flag is not set correctly.
So this "AssemblyAttributes.obj" is unreliable to check, we should exclude this together with "pch.obj" when checking binary.
The raw command line:
This is created using this template and can easily repro:
Also, if pass /ZH:SHA1, these two will still have hash type none, while we can report correctly other files are SHA1.
So the compiler did honor the flag expect a few files. We should skip checking those files.
The known ones are:
AssemblyAttributes.obj
AssemblyInfo.obj
pch.obj
The text was updated successfully, but these errors were encountered:
shaopeng-gh
changed the title
BA2004 - Should exclude "AssemblyAttributes.obj" in BA2004
BA2004 - Should exclude "AssemblyAttributes.obj"
Nov 21, 2023
This issue has been reported by different users.
The previous assumption was using the latest VS 2022 created project will not have this issue.
However, we now can repro on the official template with latest VS 2022. the /ZH:SHA_256 can be seen in the raw command line but it does not get applied, or applied but the hash type flag is not set correctly.
So this "AssemblyAttributes.obj" is unreliable to check, we should exclude this together with "pch.obj" when checking binary.
The raw command line:
This is created using this template and can easily repro:
Also, if pass
/ZH:SHA1
, these two will still have hash type none, while we can report correctly other files are SHA1.So the compiler did honor the flag expect a few files. We should skip checking those files.
The known ones are:
AssemblyAttributes.obj
AssemblyInfo.obj
pch.obj
The text was updated successfully, but these errors were encountered: