The assembly name is specified in the project, but the same version is not available
I have a project that links to A.dll
, and when I create that is A.dll
not copied locally, since the location of Copy is false. I also haven't used any method from A.dll
.
When I try to run FxCop on a project, it complains that it is A.dll
not available.
in any way you can avoid this check in FxCop.
source to share
If Visual Studio is installed on this machine, you can also use /p:RunCodeAnalysis=true
to have Fxcop run automatically as part of the build. You can also customize a set of rules for your projects from Visual Studio. MsBuild will know where it is A.dll
and will pass the correct links.
As far as necessary A.dll
, it depends a little on your code, there is clearly a binary reference there, so there is a use. It could be inheriting from the class or interface of that assembly, using Enumeration, or it could be an assembly that is used by another assembly that you call directly with methods.
The generated warning cannot be suppressed if the referenced assembly is not found. The reason for this is that a number of rules (mostly data flow rules) depend on these other assemblies to check if Dispose is called on elements, strings are passed to SQL queries not validated, etc.
These types of rules cannot find all problems without analyzing the complete executable code.
source to share