Our team has been automating the build process for a UE4 game. We are able to successfully compile all targets using Visual Studio 2019 (with the Build function), but we are having trouble finding the correct syntax for the build console command for a specific target.
We tried getting the command from the build output log, but we only found something like this:
1>------ Build started: Project: [ProjectName], Configuration: Development_Editor x64 ------
We want to know how to get the exact command that Visual Studio runs when compiling a specific target with the Build button.
Thank you
I have a Visual Studio Solution with one SSIS Project with a number of connection managers and packages. It builds fine in Visual Studio. It fails in our build automation system being built via the devenv command line:
"D:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com" ADSMetricsETL.sln /Build Release /Project "ADSMetricsETL"
Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.61030.0.
Copyright (C) Microsoft Corp. All rights reserved.
------ Build started: Project: ADSMetricsETL, Configuration: Debug ------
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped =========
command exit code: 1
I get no errors from the build, just the "1 failed". I don't see any options on devenv to increase the verbosity. This solution used to build find in the build automation system. I made a couple of minor changes to one package and now it doesn't build at all.
Also, never noticed this before but why when the command line says "/Build Release" is it building "Configuration: Debug"?
Any thoughts?
One of the Connection Managers was inadvertently updated in the process. It would have been helpful if the Build gave me some indication of the error. I had to go back through the Subversion logs and inspect everything listed as changed. When I saw the Connection Manager listed I said "Huh? I didn't make changes to that Connection Manager..." I reverted the Connection Manager, committed everything and now it builds.
I've created two projects in a solution, a static library called vm and a console application called vmx. I use the new approach of Framework and References to create the dependency of vm for vmx. I also added x64 platforms to both projects.
Now, when I select Rebuild Solution, I get this output:
1>------ Rebuild All started: Project: vm, Configuration: Debug Win32 ------
1> vm.c
1> vm.vcxproj -> D:\Shared\Dynos\Build\Visual Studio 2010\Solutions\..\..\..\Lib\Win32\Debug\vm.lib
2>------ Rebuild All started: Project: vmx, Configuration: Debug Win32 ------
2> main.c
2>LINK : fatal error LNK1104: cannot open file 'D:\Shared\Dynos\Lib\Win32\Debug\vm.lib'
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
It as if vm.lib is deleted after being built before vmx is compiled.
If I select Clean Solution, then Build Solution, I get this output:
1>------ Build started: Project: vm, Configuration: Debug Win32 ------
1> vm.c
1> vm.vcxproj -> D:\Shared\Dynos\Build\Visual Studio 2010\Solutions\..\..\..\Lib\Win32\Debug\vm.lib
2>------ Build started: Project: vmx, Configuration: Debug Win32 ------
2> main.c
2> vmx.vcxproj -> D:\Shared\Dynos\Build\Visual Studio 2010\Solutions\..\..\..\Lib\Win32\Debug\vmx.exe
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Everything is OK.
Could someone explain to me what is happening here?
Thanks
I ran into this problem recently as well, and after much head banging, I realized that the output directory was the same on several of the projects. So project A would get rebuilt fine, however when project B was "rebuilt" it would clean out the output directory including projectA's .lib and .dll files, and subsequent project rebuilds would fail.
Our fix for the moment for our auto build was to do a clean, then a build on the solution, instead of doing rebuild or clean/rebuild. Obviously the alternative would be to change the projects to each have their own output directory.
Hope that helps someone!
I found the solution to my problem. The solution is to not to use the Frameworks and References feature in project settings and JUST use the old Project Dependencies system. I removed my reference and clicked the checkbox in the Project Dependencies dialog box and it all works now. Weird!
I huess Frameworks and References is just for C# projects and should be avoided for C++ ones.
For me it was the intermediate directory that has been cleaned before the next project got built. This was really confusing, as I didn't knew what exactly will be separated into that directory and my solution and project files are all in the directory.
If you have the solution file *.sln and the referenced project files *.vcxproj all in one directory, then add $(TargetName)\ to the value of Project Properties > Configuration Properties > General > Intermediate Directory or replace it with $(Configuration)\Int\$(ProjectName)\.
This is needed for me, as I use the project in other solutions, too.
I have encountered similar problems. Certain versions of Visual Studio have this problem (see reference). I was using Visual Studio Community 2022 (64-bit) Version 17.2.6, and switched to different versions (Microsoft Visual Studio Community 2019 Version 16.11.18 and Microsoft Visual Studio Community 2022 RC (64-bit) Version 17.0.0 RC2), which fixed the problem.
1)Might be some dependency issue
OR
2)Some old intermediate files might be remaining during rebuild which
get deleted during clean & are replaced by new, correct ones during fresh build.
Running Visual Studio 2008 interactively, I can build the project successfully for both the x64 and Win32 targets. However, if I invoke devenv, regardless of my /projectconfig argument, it always performs the x64 build:
devenv /Rebuild Release MySolution.sln /projectconfig "Release|Win32"
Microsoft (R) Visual Studio Version 9.0.21022.8.
Copyright (C) Microsoft Corp. All rights reserved.
------ Rebuild All started: Project: my-project, Configuration: Release x64 ------
Note that the /projectconfig arg doesn't match the Configuration: output. Am I missing something simple? It works fine within the IDE but there are a bunch of targets and I'd prefer to script it.
Thanks in advance!
I'm not sure exactly why this is happening, but does it work with the following?
devenv /Rebuild "Release|Win32" MySolution.sln
Or alternatively, using msbuild:
msbuild MySolution.sln /p:Configuration=Release;Platform=Win32 /t:proj:Rebuild
Using Visual Studio 2019 to build .NET 5 solution with devenv.exe in command line:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.com SolutionName.sln /build "Release|x86" /project Project /projectconfig Release
Still did not affect on build configuration and used Any CPU instead of x86:
14:08:42 [exec] 80>------ Build started: Project: Project, Configuration: Release Any CPU ------
After dig into Project.csproj (note this is .NET 5 project file format) file I found this:
<Platforms>AnyCPU;x86;x64</Platforms>
Experimentally changed platforms order to:
<Platforms>x86;AnyCPU;x64</Platforms>
And it did the trick:
15:27:30 [exec] 80>------ Build started: Project: Project, Configuration: Release x86 ------
Hope this helps someone who uses devenv.com for assembling nowadays.
I am trying to implement a nightly build environment for our SharePoint solution that includes VS 2008 and VS 2008 extensions for Windows SharePoint Services 3.0 (version 1.2).
When I deploy via the VS 2008 GUI it works fine.
When I use the command line:
c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe SharePoint.sln /Deploy Release
I get the following error:
------ Deploy started: Project: SharePoint.Site, Configuration: Release Any CPU ------
------ Generate solution file and setup batch file ------
Creating solution ...
System.NotImplementedException
Error: The method or operation is not implemented.
Others seem to be having similar issues.
VSeWSS 1.2 doesn't support command line builds. I would either try the CTP for VSeWSS 1.3 or a community tool like STSDev or WSPBuilder.