Hi, when I'm building caffe on windows, a strange error came out:
Error 1 error MSB3073: The command ""K:\caffe-windows\windows\scripts\ProtoCompile.cmd" "K:\caffe-windows\windows\" "K:\NugetPackages\protoc_x64.2.6.1\build\native\"
:VCEnd" exited with code 1.
Where does the extra '\' come from?
I doubt that the extra backslash is causing this error. But to answer your question if comes from the definition of $(ScriptsDir): https://github.com/BVLC/caffe/blob/windows/windows/CommonSettings.props.example#L25
AFAIK $(SolutionDir) always ends with a backslash.
@willyd Thank you! But here comes another strange extra backslash which I think is not the same case with the previous one:
error MSB4062: The "NuGetPackageOverlay" task could not be loaded from the assembly K:\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll. Could not load file or assembly 'file:///K:\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll' or one of its dependencies. The module was expected to contain an assembly manifest. Confirm that the
Hasn't anyone else met with similar situations before?
@hyf015 I don't see the new extra backslash here. Maybe I need more coffee. In any case, in my experience Windows and VS handle any extra backslashes gracefully. The file:/// url above looks weird since it should contain only forward slashes (/) and not a mix of backslashes and forward slashes.
As for the error I have never seen anything like this before. Is the coapp.NuGetNativeMSBuildTasks.dll dll in the nuget package? Can you check for missing dependencies with Dependency Walker. Are you behind some firewall? Can you try running VS in Admin mode?
@willyd Thanks for your time. Nothing is missing in the nuget package. I tried admin mode and the previous error becomes this:
Error 1 error MSB3073: The command ""K:\caffe-windows\windows\scripts\ProtoCompile.cmd" "K:\caffe-windows\windows\" "K:\NugetPackages\protoc_x64.2.6.1\build\native\"
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 122 5 libcaffe
@hyf015 If the OpenCV Nuget package is the only one causing trouble a workaround could be to remove it from the dependencies, build OpenCV yourself and add the missing include, libraries, etc. Can you try that?
Hi there, did you find any solution to this problem? I'm trying to install Caffe on Windows 10 with CUDA 8.0 and I'm facing the same problem (error MSB4062: The "NuGetPackageOverlay" task could not be loaded from the assembly...). I've already build Caffe without GPU support but with GPU support I get error messages. Could it be because of CUDA version?
@kjafari Actually I didn't. I'm now using caffe on ubuntu and there's no problem with GPU compilation there.
Since the Windows branch now uses CMake (meaning Nuget is not used anymore) you may want to update your clone and try it again.
@hyf015 hello,have you solved the problems.error MSB4062: The "NuGetPackageOverlay" task could not be loaded from the assembly K:\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll. Could not load file or assembly 'file:///K:\NugetPackages\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll' or one of its dependencie
No, actually I gave up and used Linux.
On Wed, Nov 9, 2016 at 2:37 AM, Simonhong111 [email protected]
wrote:
@hyf015 https://github.com/hyf015 hello,have you solved the
problems.error MSB4062: The "NuGetPackageOverlay" task could not be loaded
from the assembly K:\NugetPackages\OpenCV.2.4.
10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll. Could not load
file or assembly 'file:///K:\NugetPackages\OpenCV.2.4.10\build\native\
private\coapp.NuGetNativeMSBuildTasks.dll' or one of its dependencie—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/BVLC/caffe/issues/4788#issuecomment-259351003, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AJ5Ok7wtdw-5QgWHPJSPdzD_qiM1KddMks5q8XgtgaJpZM4KKzbA
.
I have just run into the same error message:
MSB4062: The "NuGetPackageOverlay" task could not be loaded from the assembly ...\OpenCV.2.4.10\build\native\private\coapp.NuGetNativeMSBuildTasks.dll. Could not load file or assembly
and managed to fix it thanks to @willyd 's message.
The problem was indeed due to Visual Studio not being started as Administrator.
You should install VS2013 or VS2015 before CUDA otherwise the error may happen. I reinstall the CUDA8.0 and error has been resolved.
you should update your nuget package with ‘’Update-Package opencv -reinstall‘’
I meet the same problem. MSB4062 on VS2015. I change the Tools -> Options -> Build and Run "maximum number of parallel project builds" into 1. And the problem solved. Hope this will help
I meat the same problem. MSB4062 on VS2015. I change the Tools -> Options -> Build and Run "maximum number of parallel project builds" into 1. And the problem solved. Hope this will help
On VS2013, Tools -> Options -> Build and Run "maximum number of parallel project builds" default value is 12, I test if the value changed to 1, 2, or 3, build will be success, other value will cause to a failure build. I don't know why this option change the project's build behavior, maybe it's the bug of VS.
I meat the same problem. MSB4062 on VS2015. I change the Tools -> Options -> Build and Run "maximum number of parallel project builds" into 1. And the problem solved. Hope this will help
On VS2013, Tools -> Options -> Build and Run "maximum number of parallel project builds" default value is 12, I test if the value changed to 1, 2, or 3, build will be success, other value will cause to a failure build. I don't know why this option change the project's build behavior, maybe it's the bug of VS.
Thank you very much. By the way , do you know how to deploy cudnn ? It seems that when I set 'UseCudnn' true ,I can compile libcaffe , but I can't compile caffe anyway , which suggests me 'lnk2001 unresolved external symbol' .
For solving this copy de cuDNN folder from caffe-master to the subfolder windows or you can run the command on Anaconda terminal using this: "D:\caffe-master\windows\scripts\BinplaceCudaDependencies.cmd" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin" "D:\caffe-master\" false true "D:\caffe-master\windows..\Build\x64\Release\"
Most helpful comment
I meet the same problem. MSB4062 on VS2015. I change the Tools -> Options -> Build and Run "maximum number of parallel project builds" into 1. And the problem solved. Hope this will help