Magick.NET icon indicating copy to clipboard operation
Magick.NET copied to clipboard

GenerateAnyCPU.cmd failed with error CA1060.

Open t246246 opened this issue 8 years ago • 1 comments

When I try to compile Magick.NET 7.6.0.0, I got error at GenerateAnyCPU.cmd.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.7.5
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

[snip]

"C:\Magick.NET-7.6.0.0\Magick.NET.sln" (Rebuild target) (1) -> "C:\Magick.NET-7.6.0.0\Source\Magick.NET\Magick.NET.csproj.metaproj" (Rebuild target) (2) -> "C:\Magick.NET-7.6.0.0\Source\Magick.NET\Magick.NET.csproj" (Rebuild target) (4) -> "C:\Magick.NET-7.6.0.0\Source\Magick.NET\Magick.NET.csproj" (Build target) (4:7) ->(RunCodeAnalysis target) ->
MSBUILD : error CA1060: Microsoft.Design : Move P/Invokes to NativeMethods class Because it is a P/Invoke method, 'MagickNET.NativeWindowsMethods.SetDllDirectory(string)' should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods.
[C:\Magick.NET-7.6.0.0\Source\Magick.NET\Magick.NET.csproj]
gick.NET\Magick.NET.csproj]

t246246 avatar Jul 30 '18 03:07 t246246

Thanks for reporting this. Just pushed a fix for this and fixed my CI build script to make sure this build error gets reported.

dlemstra avatar Jul 30 '18 05:07 dlemstra