as part of our build process i would like to write a batch file that run the Sandcastle in one of our dll, i know how to do it by the gui, and i'm wondering if there is nay way todo it by commad line
thanks
Tova
You might consider invoking sandcastle help file builder via MsBuild as a post build event, as discussed in this question: Build Sandcastle Documentation When Building Visual Studio Project. Sandcastle help file builder project files (.shfb) are actually valid msbuild files. You can generate shfb files with the Visual Studio integration or Sandcastle Help File Builder GUI as msorens mentions, and you can make a call like: msbuild My_SHFB_Project.shfbproj at the command line. You can find more at http://shfb.codeplex.com/
Related
I am trying to build and run Google Test but encountered some issues.
Any help greatly appreciated.
I used CMake 2.8 (with UI) to create .sln and .vcproj files in the D:/MyBuild
directory (as mentioned in the README file of google test).
However, when I try to run the .sln file in the MyBuild directory,
here is what I get (image):
Also, here is a screenshot of the CMake which I used to
create .sln files and .vcproj files in the D:/MyBuild directory.
ps. One thing I noticed is that README was giving instructions how
to use non graphical version of CMake (e.g., 2.6) to install
google test, however I used one with user interface - maybe
I did something wrong there?
You appear to have successfully built gtest's libs in Debug mode. However, by default the .sln doesn't contain any executables, so you can't actually run anything.
If you select the checkboxes in the CMake GUI for gtest_build_samples and/or gtest_build_tests and hit "Generate", then the Visual Studio solution should contain some executables.
From memory, these don't build cleanly, but I don't have MSVC 2010 to hand, so I can't be sure.
Hello I am trying to build a dll from Libjingle API, I want to be able to use Audio and Video in an XMPP Client on Windows.
I am able to build the libjingle source code using:
hammer.bat --jobs=6 --verbose --mode=all all_programs
I wanted to do this first to make sure it was working. I am also able to generate the Visual Studio Projects. But I am unsure what to do from there, I know how to set my project files to build as a dll but it seems there is no source code loaded in to each of the projects, (they are just empty projects).
I built the Visual Studio projects by following the instructions in main.scons file
s = vs_env.ComponentVSSolution(
'libjingle', # Please uncomment this line if you build VS proj files.
['all_libraries', 'all_programs', 'all_test_programs'],
projects = [p],
)
then executing this command.
hammer --mode=all --vsproj
As I understand it I need to add the source files to each of the projects. But I am unsure how to do this or what should go where.
I appreciate any help you have to offer
*cheers
Edit I found this link with a Visual Studio Project premade http://code.google.com/p/libjingle/issues/detail?id=242
For anyone looking to do this :-)
MSBuild generates a configuration file for me. I would then like to replace certain strings
in the file. Is this possible?
Also, I use Visual Studio as well to build my project. Can I do the same thing from Visual Studio?
Thanks!
Yes it can. Here is an opensource library from MSBuildTasks that has a RegEx replace task in it that can be executed when a project is built. I use it to handle the versioning of assemblies.
I have a source code for a project with their make files. I want to create a Visual Studio (2005) solution from it. Is there any direct way to do this? can anyone help me please. I spent hours for searching, but couldn't find a way to do this.
Thanks.
Unfortunately, Microsoft removed this capability after VC++ 6.
If all you're looking to do is to build a Visual Studio project from a command line or script, you can use the devenv command to build using the settings in a project.
Something like:
devenv /build debug /project myproj myapp.sln
Ans starting with VS2010, C++ projects will use the MSBuild system, so you can drive builds using that technology.
If you really want a makefile, you'll need to write it up by hand (or maybe there's some 3rd party tool out there that I'm unaware of).
I'm not sure whether this solution can help you. Which I tried and it worked well in my previous projects. It need manually add the files.
Create a blank VS solution/project. Add the source files into that project.
Mark all source files as "Excluded from building". You can right click the files in project explorer and find the setting. So now nothing will happen when you build your project.
In project setting, find something like "Custom build step". Add the commands that invoke your original build command. (You may write different build command for debug/release ). You can also set the post-build actions such to copy your result to some folder....
Now you can edit and build source files.
For my experience, I can even debug it after setting the executable.
Hope this can help you.
If this is a one-off then it is easier to just create the VS project manually in visual studio.
If you are going to need to do this often look at ceating the project in something like cmake or Qt's .pro whcihc an generate makefiles and VS build files from the same defintion.
Do you want to use the makefile to build? You can create a project from existing source in VS 2005 and setup the project to use make to build (and the wizard will take you through all of this).
I am using VS2010.In order to build you can create a project from existing code. In VS2010 you can create project from existing code File->New->Project from Existing code. You can specify the other parameters and then ready with the solution. I did not go with make file but followed this approach which is working great.
I heard a lot about makefiles and how they simplify the compilation process. I'm using VS2008. Can somebody please suggest some online references or books where I can find out more about how to deal with them?
The Microsoft Program Maintenance Utility (NMAKE.EXE) is a tool that builds projects based on commands contained in a description file.
NMAKE Reference
A UNIX guy probably told you that. :)
You can use makefiles in VS, but when you do it bypasses all the built-in functionality in MSVC's IDE. Makefiles are basically the reinterpret_cast of the builder. IMO the simplest thing is just to use Solutions.
To answer the specific questions...
I'm using VS2008. Can somebody please suggest some online references
or books where I can find out more about how to deal with them?
This link will give you a good introduction into Makefiles by mapping it with Visual Studio.
Introduction to Makefiles for Visual Studio developers
I heard a lot about makefiles and how they simplify the compilation
process.
Makefiles are powerful and flexible but may not be the best solution to simplify the process. Consider CMake which abstracts the build process well which is explained in this link.
CMake for Visual Studio Developers
I actually use a makefile to build any dependencies needed before invoking devenv to build a particular project as in the following:
debug: coratools_debug
devenv coralib.vcproj /build debug
coratools_debug: nothing
cd ../coratools
nmake debug
cd $(MAKEDIR)
You can also use the msbuild tool to do the same thing:
debug: coratools_debug
msbuild coralib.vcxproj /p:Configuration=debug
coratools_debug: nothing
cd ../coratools
nmake debug
cd $(MAKEDIR)
In my opinion, this is much easier than trying to figure out the overly complicated visual studio project management scheme.
The VS equivalent of a makefile is a "Solution" (over-simplified, I know).
To summarize with a complete solution...
There are 2 options:
Use NMAKE from the Developer Command Prompt for Visual Studio
The shortcut exists in your Start Menu. Look inside the makefile to see if there are any 'setup' actions. Actions appear as the first word before a colon. Typically, all good makefiles have an "all" action so you can type: NMAKE all
Create a Solution and Project Files for each binary.
Most well designed open source solutions provide a makefile with a setup action to generate Visual Studio Project Files for you so look for those first in your Makefile.
Otherwise you need to drag and drop each file or group of files and folders into each New Project you create within Visual Studio.
Hope this helps.
Makefiles and build files are about automating your build. If you use a script like MSBuild or NAnt, you can build your project or solution directly from command line. This in turn makes it possible to automate the build, have it run by a build server.
Besides building your solution it is typical that a build script includes task to run unit tests, report code coverage and complexity and more.
If you are asking about actual command line makefiles then you can export a makefile, or you can call MSBuild on a solution file from the command line. What exactly do you want to do with the makefile?
You can do a search on SO for MSBuild for more details.