microsoft / caffe

Caffe on both Linux and Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error : NuGet Error:未知命令:“overlay” \NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets 768 5 libcaffe

flyi opened this issue · comments

error : NuGet Error:未知命令:“overlay” \NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets 768 5 libcaffe

I had a similar error: if you compile the projects giving this error one at a time (right-click and build) they'll all compile correctly.

To ease lookup for others, the english error was:
error MSB4062: The "NuGetPackageOverlay" task could not be loaded from the assembly D:\GitHub\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll. Could not load file or assembly 'file:///D:\GitHub\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll' or one of its dependencies. The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020) Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

in file

D:\GitHub\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets

Line 772 column 5

The difference between line numbers is just related to the configuration: I was compiling in Release, and I suppose @flyi was compiling in Debug.

I have the same problem as you do. I have used a piece of advice given by @pansk to me.

I have rebuilt three projects separately:

  • convert_cifar_data
  • convert_imageset
  • convert_mnist_data

It works.

Hi,
May I post in this closed issue?
I've just stacked in the same problem.
I can find a file coapp.NuGetNativeMSBuildTasks.dll in the folder \NugetPackages\OpenCV.2.4.10\build\native\private.
And though I tried to build three projects separately, it doesn't work.

Best regards,
keides2

Can someone post the exact error in English?

It is an example of one of the project.

2016/07/26 14:01:14 began build on.
      1> node 2 on the project "C: \ Users \ kde \ Documents \ Visual Studio 2012 \ Projects \ MS-Caffe \ caffe \ windows \ libcaffe \ libcaffe.vcxproj" (Rebuild target).
      1> C: \ Users \ kde \ Documents \ Visual Studio 2012 \ Projects \ MS-Caffe \ NugetPackages \ OpenCV.2.4.10 \ build \ native \ OpenCV.targets (772,5): error: NuGet Error: Unknown command : 'overlay'
      1> Project: Build of "C \ Users \ kde \ Documents \ Visual Studio 2012 \ Projects \ MS-Caffe \ caffe \ windows \ libcaffe \ libcaffe.vcxproj" (Rebuild target) has ended - failed.

It failed to build.

Elapsed time 00: 00: 01.34

@zer0n here's the error in English:

error : NuGet Error: Unknown command: “overlay” \NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets 768 5 libcaffe

and the corresponding content in OpenCV.Targets is something like this:
<NuGetPackageOverlay Package="OpenCV.overlay-x64_v110_Release" Version="$(Needs-OpenCV-Version)" PackageDirectory="$(MSBuildThisFileDirectory)\..\.." SolutionDirectory="$(SolutionDir)" Condition="'$(Platform.ToLower())' == 'x64' And ( '$(PlatformToolset.ToLower())' == 'v110' Or '$(PlatformToolset.ToLower())' == 'windowskernelmodedriver8.0' Or '$(PlatformToolset.ToLower())' == 'windowsapplicationfordrivers8.0' Or '$(PlatformToolset.ToLower())' == 'windowsusermodedriver8.0' ) And ( $(Configuration.ToLower().IndexOf('debug')) == -1 )" />

Which version of nuget/compiler are you using?

how to do? @pansk
I am running into the same error ! I have read and understood your answer above. But I still do not know how to fix it.
Can you please talk more about it ?
For example, how to see which process is using that file and how to end the process.
I am new about this. Thanks very much.

Hi,

This problem has been resolved in Release mode.
Remove the nuget folder, and return the .vcxroj to the original.
Please refer to this page as a reference:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6eee7078-d3d1-4c95-b5d5-6753228888e5/opencvtargets-error-nuget-error-overlay?forum=vssetup

I still have erros below in Debug mode.

Error 1
error MSB4062: "NuGetPackageOverlay" the task assembly C: Can not read from the \ Users \ kde \ Documents \ Visual Studio 2013 \ Projects \ NugetPackages \ OpenCV.2.4.10 \ build \ native \ private \ coapp.NuGetNativeMSBuildTasks.dll did. File or assembly 'file: /// C: \ Users \ kde \ Documents \ Visual Studio 2013 \ Projects \ NugetPackages \ OpenCV.2.4.10 \ build \ native \ private \ coapp.NuGetNativeMSBuildTasks.dll', or of its dependencies one did not read. The specified file could not be found. that declaration is correct, that the assembly and its dependencies are available, and the public class that implements the Microsoft.Build.Framework.ITask Please make sure that you are included in the task. C: \ Users \ kde \ Documents \ Visual Studio 2013 \ Projects \ NugetPackages \ OpenCV.2.4.10 \ build \ native \ OpenCV.targets 768 5 convert_mnist_data

Error 2
error C1083: include not open the file. 'Numpy / arrayobject.h': No such file or directory C: \ Users \ kde \ Documents \ Visual Studio 2013 \ Projects \ caffe \ python \ caffe \ _caffe.cpp 10 1 pycaffe

Thank you,

keides2