Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

build error MSB3030 #18

Closed
by321 opened this issue Feb 13, 2016 · 5 comments
Closed

build error MSB3030 #18

by321 opened this issue Feb 13, 2016 · 5 comments

Comments

@by321
Copy link

by321 commented Feb 13, 2016

Run into four MSB3030 errors during build. This is the first one:

1>C:\github\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets(57,5): error MSB3030: Could not copy the file "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcr120.dll" because it was not found.

The corresponding lines in C:\github\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets:

<Target Name="OpenCV_AfterBuild" AfterTargets="AfterBuild"> <Copy SkipUnchangedFiles="true" SourceFiles="@(CopyToOutput)" UseHardlinksIfPossible="true" DestinationFolder="$(TargetDir)"> <Output TaskParameter="DestinationFiles" PropertyName="DestinationFiles" /> <Output TaskParameter="DestinationFiles" ItemName="DestinationFiles" /> <Output TaskParameter="CopiedFiles" PropertyName="CopiedFiles" /> <Output TaskParameter="CopiedFiles" ItemName="CopiedFiles" /> </Copy> </Target>

I don't have VC installed in "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC", but I couldn't find where this path is set in the project files either.

@jiemojiemo
Copy link

I also met the problem,do you have any idea to solve it?

@Wuranker
Copy link

Wuranker commented Mar 4, 2016

I copy "msvcp120.dll" and "msvcr120.dll" from my installation path to "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT", then copy "msvcp120d.dll" and "msvcr120d.dll" to "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\Debug_NonRedist\x64\Microsoft.VC120.DebugCRT". I solve the problem.

@AleksandarTomicMS
Copy link

This is caused by the HDF5 and LMDB Nuget dependencies. They expect that Visual Studio 2013 is installed at default location ("C:\Program Files (x86)\Microsoft Visual Studio 12.0"), as they target Visual Studio with "$(MSBuildProgramFiles32)\Microsoft Visual Studio 12.0". I think that a clean way to fix this would be to create a symbolic link at this location to your custom visual studio installation path. Other than that you can contact the owners of these Nuget dependencies to fix this, as the problem is in their packages.

@Codersadis
Copy link

Very THX for @Wuranker 's suggestion.

met this problem too, and
I got my problem fixed with your solution. :-)

@sasagalic-MSFT
Copy link

Closing since several workarounds which seem to fix the issue are proposed. Additionally, 2808199 should have fixed the root cause.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants