vsprops

Building both DLL and static libs from the same project

I have a number of native C++ libraries (Win32, without MFC) compiling under Visual Studio 2005, and used in a number of solutions. I'd like to be able to choose to compile and link them as either static libraries or DLLs, depending on the needs of the particular solution in which I'm using them. What's the best way to do this? I've...

VS2008: Add custom build rule to a Property Sheet (vsprops)?

I'm using the CUDA .rules file which comes with the CUDA SDK for custom build steps in my project. To save on property duplication I'd like to define the properties of the CUDA rule in a .vsprops file. For some reason, the CUDA rule branch of the properties tree does not show under any of my property sheets, only under the main configura...

Optional environment variables with vcproj/vsprops

Is there any way to make an environment variable substituion in a project file (with or without vsprops) that, if the variable is not found, is substituted instead with a default value? I haven't found any way to do this, because everything seems to override environment variables. EDIT: I need this to work for a property, not for an env...

Can I have platform specific sections in my vsprops (Property Sheet) file?

I'm creating a vsprops file to contain include and lib paths that are common to all projects in my solution. However, I have platform specific paths for the lib paths which can be Win32/x64. Is it possible to put these settings in one vsprops file? Or do I have to create a different vsprops file for each platform and then spend time wit...

How can the order of inherited includes be controlled in vsprops Property Sheets?

Hi, I'm using some vsprops sheets that inherit from each other. My base property sheet defines some include paths. In a second vsprops file that inherits from it, I want to add some more include paths. However, I want to be able to choose whether the additional include paths come before or after the base include paths. I'm sure I've se...

CharacterType/ConfigurationType in vsprops

Hi, I've been using Visual Studio's property sheets for building my code and I have a useful hierarchy of sheets controlling the build settings, rather than having them in the vcproj files. This is great except for one thing. I can't seem to set properties in the Project Defaults section such as CharacterType and ConfigurationType. I...

How to force link a static library to another using .vsprops, if possible?

Environment: VS 2008 in Windows. Problem: A static library, say first.lib is not linked to, say second.lib, if first.lib is specified in .vsprops file and none of its functions is referenced in the second.lib. If, however, first.lib is removed from the .vsprops file and placed instead in the appropriate project options dialog(1), it is...

Accessing .vsprops (Property Sheets) via VS Automation and Extension

I am trying to access user macros that are defined in a .vsprops (Property Sheet) that is used by a Visual Studio 2008 project. I cannot find any documentation on accessing any information in a .vsprops file using VS automation and extension functionality (i.e., EnvDTE et al). Does anyone know if this is possible? ...

Multiple projects with multiple (different) build configuration in one solution

What is the correct and easy step by step way to have multiple build configurations in the same VS project, where the Solution also contain multiple projects? The projects would have different build configurations. Basically, I'm looking for something like project A with Dll Debug, Dll Release, Static (library) Debug, and Static (library...

Force VSProps settings to override project settings

I have a vsprops file that defines the optimizations all of our projects should be built with for Visual Studio 2008. If I set the properties for the project to "inherit from parent of project defaults" it works, and fills them in the vcproj file. However, this doesn't protect me from a developer checking in a project file that changes t...

MSVC linker won't apply RandomizedBaseAddress via vsprops file

I am trying to add ASLR to a project using a vsprops file. I have verified the file is being used by the project as there are other settings in the file that are being applied, and intentionally corrupting the file produces an error when opening the project under MSVC. When I set ASLR to yes I can see RandomizedBaseAddress="2" under <Too...