msbuild continue buil solution on some project error in command line - visual-studio-2010

Is any way to continue build solution from command line when error occured? Such as -i flag in make (g++) on linux.
Details: I try to build opencv 3.1.0 from VS 2010 command prompt, and have some error. In VS 2013 build and install is successful, in Linux I use -i flag for make and it allow me to continue build and install opencv without some examples. How I can do this in VS 2010 command prompt?
My command is for buils is:
msbuild /p:ContinueOnError=ErrorAndContinue /p:Configuration=Debug OpenCV.sln
PS. for create solution I use cmake.
PSS. I known that /p:ContinueOnError=ErrorAndContinue not working in this case.

Related

How to build and run Xamarin.UWP application from command line?

How do I build and run a Xamarin.UWP application from the command line? I want it to be so that the app builds and runs the same way as the green run button in the Visual Studio 2019 GUI.
Additional notes:
I've tried opening the Visual Studio Developer Command Prompt and trying the following implementations.
msbuild -t:build "PATH_TO_PROJECT\SimTools.UWP.csproj"
Although when I run the executable that gets generated, it gives me this error:
as well as
Additionally, I've tried doing
msbuild -t:build "PATH_TO_PROJECT\SimTools.UWP.csproj" && msbuild -t:install "PATH_TO_PROJECT\SimTools.UWP.csproj"
And although it builds successfully, it says that there is no target for "install" and I do not know how to add that to the .csproj file as I've asked over at How do I add an "install" target to a Xamarin.UWP .csproj file?.

couldn't determine visual studio generator

I am trying to compile rust's azul gui framework sample code on windows 10 and it's running into the following error:
error: failed to run custom build command for `harfbuzz-sys v0.3.0 (https://github.com/maps4print/azul-dependencies?rev=bf2933b9aac43a7003278862772250398e4fa457#bf2933b9)`
Caused by:
process didn't exit successfully: `F:\Code\rust\azul_demo\target\debug\build\harfbuzz-sys-4d7deefbb1bf663c\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=HARFBUZZ_SYS_NO_PKG_CONFIG
--- stderr
thread 'main' panicked at '
couldn't determine visual studio generator
if VisualStudio is installed, however, consider running the appropriate vcvars script before building this crate
', C:\Users\Andrew\.cargo\git\checkouts\azul-dependencies-70bb1f94316762f9\bf2933b\cmake-0.1.35\src\lib.rs:687:25
stack backtrace:
0: backtrace::backtrace::trace_unsynchronized
at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.29\src\backtrace\mod.rs:66
...
I installed cmake and visual studio 2019. Also note that I am using clion ide. Cmake version is 3.15.2.
It says I should run the appropriate vcvars script before building this crate, what does it mean exactly?
EDIT ----
Found vcvars.bat in the visual studio installation folder and ran it. It's still getting the same error.
EDIT2 ----
It looks like an incompatibility between the latest version of visualstudio(19) and cmake. Reverting to 2015 is suppose to resolve the issue.
https://github.com/maps4print/azul/issues/203
When you install Visual Studio, the command-line tools are not available from a generic command prompt. Visual Studio should have installed an entry in your start menu to start a properly configured console.
Or if you haven't started your console from this special entry, Visual Studio should also have installed a script called vcvars.bat somewhere in its install folder. You need to run that script before you can access the command-line tools.

CMake Copying Multiple DLLs Failing

So I have seen the other posts regarding moving external dll files to the current project's .exe output location for use at runtime but I seem to be running into an odd issue that I can't find information on.
I am using the following custom command to copy my libfreenect2 dlls into my output directory for my project:
add_custom_command(TARGET kinect_feeds POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"libfreenect2_output_path/bin/*.dll"
$<TARGET_FILE_DIR:kinect_feeds>)
CMake sets up my project just fine, but when I go to run the command in Visual Studio it errors out when trying to copy the files. I think the issue is with the wildcard character. I used the error output in the Visual Studio to copy the complete command into by git bash window and it works as expected. Also Visual Studio has no problem moving multiple files if they are explicitly defined like so:
add_custom_command(TARGET kinect_feeds POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"libfreenect2_output_path/bin/freenect2.dll"
"libfreenect2_output_path/bin/glfw3.dll"
$<TARGET_FILE_DIR:kinect_feeds>)
My question is, do wildcard characters not work in CMake commands when being executed by Visual Studio or is there something that I am missing? For now I will just type out all of the DLL files explicitly, but I was hoping to avoid this.
I am using the latest version of CMake and Visual Studio 2015 Community Edition.
I'm running into the same issue with CMake 3.6.1 and Visual Studio 2012. I don't think Visual Studio has any impact though, because I get the errors from the command line as well
From a CMD prompt:
> cmake -E copy .\data\*.bin \temp
Error copying file ".\data\*.bin" to "\temp".
This question references a CMake bug report regarding wildcards, that was supposed to be fixed in CMake 3.5, but doesn't appear to work on Windows with CMake 3.6.1.
I think your solution to list each file individually is the current solution.

how to let qt msvc2013 make command runnable

I don't know how to do this with msvc.
I succeeded when I used mingw.
I have to use make and make install in the command line because I want to use QtXlsxWriter which is a module.
I installed visual studio 2013 and Qt 5.5.1 VS 2013 only
Visual Studio has nmake instead of make. You also need Perl. Strawberry Perl may be used here:
Start Visual Studio command prompt
Set the PATH variable to point to Perl and Qt binary folders, for example: PATH=c:\Strawberry\perl\bin;c:\Qt5.5.1\5.5\msvc2013_64\bin;%PATH%
go to QtXlsxWriter folder
qmake
nmake
nmake install
Assuming you have a .pro Qt project file.
You can generate a makefile with qmake and compile it with nmake:
qmake
nmake
You can open it in QtCreator IDE and build from there directly.
You can generate Visual Studio IDE project file (.vcxproj):
qmake -tp vc
and
either open it in Visual Studio and build from there
or
build it from command line with msbuild:
msbuild projectname.vcxproj
qmake: Creates Makefile from qtxlsx.pro
make: Builds Makefile
Bullsit, sorry. There is no make in the Windows build system.

Platform toolset (v110) is not installed or invalid

I have a weird problem when I want to compile a Visual Studio 2012 solution via msbuild on the command line. Whatever I do, it exits with Specified platform toolset (v110) is not installed or invalid. I have tried launching it via the regular command prompt, the Windows 7 SDK prompt, and all three command prompts included in VS2012. However, compiling in Visual Studio itself works.
where msbuild outputs:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
c:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe
You have probably solved the problem yourself but perhaps it may help others with a similar problem. Try to set the VisualStudioVersion environment variable before running MSBuild, e.g
SET VisualStudioVersion=11.0
There is a possibility that it helps.
You could also try passing the command line parameter /p:VisualStudioVersion=11.0 to MSBuild, when trying to build your project. It seems to have the same effect as setting the environment variable, in the above answer.

Resources