Hi,
I have an issue, if you could find time then can you please suggest some opinion
Issue: I have a dotnet solution and under that a no. of projects are existing. I want to control project settings(like buid type, Enable/Disable Framepointer etc..) for each project from one common place (may be xml file or anything else). When ask to build solution it should read settings from that file and apply to each project and then it should build.
One way is that writing perl script and change each and every project's settings before building after check-in and check-outs that is very time taking.
I want to know is there any facility in vs.net by using that one it can be achieved, as far as I know .config files works for only one project( if I'm not wrong).
Hope you will address my point.
Environment: VS.net 2005 and VC8, C# and Windows XP
Thanks in advance.
Regards,
Madhur
+919444217398

Common Settings for all the projects in a Solution
Brannon Jones
About the correct procedure about changing the Microsoft.Common.Targets file:
Like I was saying in the previous message I would create another file, lets call it MyOrginization.targets. This file would contain all the properties and whatever else you want to be shared. In your other project files I would make sure to import this file. But if you want this to happen automagically, you could import that file inside of Microsoft.Common.Targets file. Once this has taken place every Visual Studios project that is building on your machine will have those properties/tasks/targets available to them. I would limit the modification of that target to a minimum, ie placing a few Import statements in it, instead of actually chainging a bunch of stuff there; unless you are skilled in MSBuild. Modifying the Microsoft.Common.Targets file will make it easier for you to build your applications, but it will also make it more difficult to share your project across your orginization, because you have to make sure that everyones Microsoft.Common.Targets file imports the same files. I would not suggest taking this approach. I would simply have a file that gets included into the project after the import of Microsoft.Common.Targets. This is what I was saying previously.
Hope this helps,
Sayed Ibrahim Hashimi
Jeff W
In the upcoming release (VS 2005 and .NET 2.0), MSBuild does not natively support VC++ projects (either unmanaged or managed VC++). So you will not find a Microsoft.VC.targets file ... no such thing exists yet. This means that if you want to have a common place to store your project settings for all of your 50 projects, you will have to do it in at least two places -- one for your C# and VB projects, and separately for your VC++ projects.
For your C# and VB projects, the first thing you'll need to do is create a settings file that contains all your common settings. So for example, suppose you wanted to force WarningLevel=3 and Optimize=true for all of your C#/VB projects. Then you would create a file that looked like this:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WarningLevel>3</WarningLevel>
<Optimize>true</Optimize>
</PropertyGroup>
</Project>
Just as an example, let's call this file MyCommonProperties.settingsproj (you can call it whatever you want). Now you have a few options for how to use this file such that it affects all of your C#/VB projects, both when building inside VisualStudio and using msbuild.exe from the command-line.
Option 1. You could manually hand-edit all of your .CSPROJ and .VBPROJ project files, and immediately before the <Import> tag that is already there, just add this:
<Import Project="MyCommonProperties.settingsproj" />
Of course, you will have to provide the path to this file, otherwise MSBuild won't be able to find it.
Option 2. You could modify your copy of Microsoft.Common.targets, and somewhere towards the beginning of the file (for example, immediately after the opening <Project> tag), you could add the same line:
<Import Project="MyCommonProperties.settingsproj" />
Again, you will have to specify the path to the file.
Option 3. You could also drop a new file at %ProgramFiles%\msbuild\v2.0\Custom.Before.Microsoft.Common.targets. This file gets automatically imported by Microsoft.Common.targets already, so the nice thing here is that you don't actually have to make any changes to your .CSPROJ files or Microsoft.Common.targets. The contents of Custom.Before.Microsoft.Common.targets can be the same <Project> + <PropertyGroup> tag I showed earlier. Of course, you would have to drop this file onto every machine that you wanted to use these settings.
The above options work for C#/VB projects, but for VC++ projects, you will have to do something different. You have to create what's called a "property sheet" for VC, and then find a way to get all your VC++ projects to use that property sheet. I'm not very familiar with the details here, but you might consider posting a question on the VC forum if you can't figure it out on your own.
Good luck!
--Rajeev
methylamine
In continuation with last response. I have vc8 projects also under particular solution in that case MS Build will work Because, as per now i have gone thru the documentation of MS Build it is not supporting VC projects (If I'm not wrong).
Do we able to import
<Import Project="${MSBuildBinPath\Microsoft.VC.Targets"/ > or similar to this statement
Can you please tell me is there any alternative solution that works in vc project also under VS-2005
Thanks in advance!!
Regards,
Madhur
James Hunter
Could you just create wrapper projects to do this Something on these lines
<Project xmlns="..usual ... ">
<Target Name="build">
<MSBuild Projects="my.sln" Properties="aaa=bbb;ccc=ddd .. "/>
</Target>
</Project>
then build the wrapper project and it will build the solution with the properties you listed. Note -- properties would only be useful for managed projects in the solution. To affect VC projects, you need to look into "project stylesheets" or "stylesheet override files". I don't know much about these -- best to ask on a VC forum about them.
Dan
Coder0xff
Thanks for quick response. Looks like this will build solution from command prompt.
I have one question here if I apply in a batch file for all the solutions in a application and some solutions may have vc8 project(unmanaged) some may have c# projects so in that condition will it work
The moment when I'm replying this I have not applied your solution but hope this will solve my problem, further is there anything in DotNet where the projects read its configuration and other settings like disabling framepointer from a file(may be xml,config or anything else) before building
Ultimate purpose is that to control build settings from one common place so that after modifying that file we can leave it for nightly build.
Neil thanks a lot for giving time to me on this problem.
Regards,
Madhur
+919444217398
L. Lysaght
Thanks for your kind response.
Can you please elaborate little bit more as where I have to create this project I mean inside the solution or outside the solution, what will be the project type (library etc..)
Dan, my application has more than 50 solutions and some solutions contain vc8 project and some vc# projects, would it be possible this way to control all project settings from one common place
My ultimate purpose is that controlling project settings from a common place(like xml file or config file or anything else) so that after modifying settings at common place we can leave it for nightly build.
Hope I'll receive some more ideas from you.
Thanks in advance.
Regards,
Madhur
+919444217398
Samlazyeye
I think this will work for my problem. Thanks!!
I'll let you know issues related to MSBuild when I'll implement for my applications.
In the begining i have just gone thru MicrosoftBuild.common.targets file and looks like it is very huge, so i'm looking what r the places, I can set custom settings for my application.
One basic question- if I want to change MicrosoftBuild.common.targets file then what is the correct procedure I mean do we have to change same file or include different file in this file.
If you have idea then can you please tell me what r the steps that we have to follow in MSBuild.
Regards,
Madhur
jbanks27
In VS2005-Beta2 i could not find Microsoft.VC.targets file.
I'm pasting .vcproj file code that is generated by VS8 while compiling VC6 to VC8.
------------------------------------------------------------------------
< xml version="1.0" encoding="Windows-1252" >
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="JobInfo"
ProjectGUID="{B04DF6E0-3308-405B-9BC0-9F9B0361899A}"
RootNamespace="JobInfo"
SccProjectName="JobInfo"
SccLocalPath="."
Keyword="AtlProj"
AssemblyReferenceSearchPaths=""..\..\..\inc";"..\..\..\..\..\..\..\Program Files\Microsoft Visual Studio 8\VC\include";"..\..\..\..\..\..\..\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include""
SignManifests="true"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
InheritedPropertySheets="UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="@echo on"
/>
<Tool
Name="VCCustomBuildTool"
Description="Performing registration"
CommandLine="copy "$(TargetPath)" "%VobRoot%\rel\debug\bin\SelfRegister\."
copy ".\$(TargetName).idl" "%Vobroot%\inc\MIDL\."
copy ".\$(TargetName).h" "%Vobroot%\inc\MIDL\."
copy ".\$(TargetName).tlb" "%Vobroot%\inc\MIDL\."
regsvr32 /s /c "%Vobroot%\rel\debug\bin\SelfRegister\$(TargetName).dll"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
Outputs="$(OutDir)\regsvr32.trg"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\Debug/JobInfo.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Debug/JobInfo.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\Debug/JobInfo.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\JobInfo.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/JobInfo.pdb"
SubSystem="2"
ImportLibrary=".\Debug/JobInfo.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/JobInfo.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Unicode Release MinDependency|Win32"
OutputDirectory=".\ReleaseUMinDependency"
IntermediateDirectory=".\ReleaseUMinDependency"
ConfigurationType="2"
InheritedPropertySheets="UpgradeFromVC60.vsprops"
UseOfMFC="0"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="true"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
Description="Performing registration"
CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
Outputs="$(OutDir)\regsvr32.trg"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\ReleaseUMinDependency/JobInfo.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="1"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\ReleaseUMinDependency/JobInfo.pch"
AssemblerListingLocation=".\ReleaseUMinDependency/"
ObjectFile=".\ReleaseUMinDependency/"
ProgramDataBaseFileName=".\ReleaseUMinDependency/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\ReleaseUMinDependency/JobInfo.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\JobInfo.def"
ProgramDatabaseFile=".\ReleaseUMinDependency/JobInfo.pdb"
SubSystem="2"
ImportLibrary=".\ReleaseUMinDependency/JobInfo.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\ReleaseUMinDependency/JobInfo.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release MinSize|Win32"
OutputDirectory=".\ReleaseMinSize"
IntermediateDirectory=".\ReleaseMinSize"
ConfigurationType="2"
InheritedPropertySheets="UpgradeFromVC60.vsprops"
UseOfMFC="0"
UseOfATL="2"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
Description="Performing registration"
CommandLine="copy "$(TargetPath)" "%VobRoot%\rel\release\bin\SelfRegister\."
copy ".\$(TargetName).idl" "%Vobroot%\inc\MIDL\."
copy ".\$(TargetName).h" "%Vobroot%\inc\MIDL\."
copy ".\$(TargetName).tlb" "%Vobroot%\inc\MIDL\."
regsvr32 /s /c "%Vobroot%\rel\release\bin\SelfRegister\$(TargetName).dll"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
Outputs="$(OutDir)\regsvr32.trg"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\ReleaseMinSize/JobInfo.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="1"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\ReleaseMinSize/JobInfo.pch"
AssemblerListingLocation=".\ReleaseMinSize/"
ObjectFile=".\ReleaseMinSize/"
ProgramDataBaseFileName=".\ReleaseMinSize/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\ReleaseMinSize/JobInfo.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\JobInfo.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\ReleaseMinSize/JobInfo.pdb"
SubSystem="2"
OptimizeReferences="2"
ImportLibrary=".\ReleaseMinSize/JobInfo.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\ReleaseMinSize/JobInfo.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release MinDependency|Win32"
OutputDirectory=".\ReleaseMinDependency"
IntermediateDirectory=".\ReleaseMinDependency"
ConfigurationType="2"
InheritedPropertySheets="UpgradeFromVC60.vsprops"
UseOfMFC="0"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="true"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
Outputs="$(OutDir)\regsvr32.trg"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\ReleaseMinDependency/JobInfo.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="1"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\ReleaseMinDependency/JobInfo.pch"
AssemblerListingLocation=".\ReleaseMinDependency/"
ObjectFile=".\ReleaseMinDependency/"
ProgramDataBaseFileName=".\ReleaseMinDependency/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\ReleaseMinDependency/JobInfo.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\JobInfo.def"
ProgramDatabaseFile=".\ReleaseMinDependency/JobInfo.pdb"
SubSystem="2"
ImportLibrary=".\ReleaseMinDependency/JobInfo.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\ReleaseMinDependency/JobInfo.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Unicode Debug|Win32"
OutputDirectory=".\DebugU"
IntermediateDirectory=".\DebugU"
ConfigurationType="2"
InheritedPropertySheets="UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
Description="Performing registration"
CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
Outputs="$(OutDir)\regsvr32.trg"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\DebugU/JobInfo.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\DebugU/JobInfo.pch"
AssemblerListingLocation=".\DebugU/"
ObjectFile=".\DebugU/"
ProgramDataBaseFileName=".\DebugU/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\DebugU/JobInfo.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\JobInfo.def"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\DebugU/JobInfo.pdb"
SubSystem="2"
ImportLibrary=".\DebugU/JobInfo.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\DebugU/JobInfo.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Unicode Release MinSize|Win32"
OutputDirectory=".\ReleaseUMinSize"
IntermediateDirectory=".\ReleaseUMinSize"
ConfigurationType="2"
InheritedPropertySheets="UpgradeFromVC60.vsprops"
UseOfMFC="0"
UseOfATL="2"
ATLMinimizesCRunTimeLibraryUsage="true"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
Description="Performing registration"
CommandLine="if "%OS%"=="" goto NOTNT
if not "%OS%"=="Windows_NT" goto NOTNT
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
goto end
:NOTNT
echo Warning : Cannot register Unicode DLL on Windows 95
:end
"
Outputs="$(OutDir)\regsvr32.trg"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\ReleaseUMinSize/JobInfo.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="1"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\ReleaseUMinSize/JobInfo.pch"
AssemblerListingLocation=".\ReleaseUMinSize/"
ObjectFile=".\ReleaseUMinSize/"
ProgramDataBaseFileName=".\ReleaseUMinSize/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\ReleaseUMinSize/JobInfo.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ModuleDefinitionFile=".\JobInfo.def"
ProgramDatabaseFile=".\ReleaseUMinSize/JobInfo.pdb"
SubSystem="2"
ImportLibrary=".\ReleaseUMinSize/JobInfo.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\ReleaseUMinSize/JobInfo.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="JobInfo.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinDependency|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_UNICODE;_ATL_STATIC_REGISTRY;_ATL_MIN_CRT;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinSize|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;_ATL_DLL;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinDependency|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;_ATL_STATIC_REGISTRY;_ATL_MIN_CRT;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_UNICODE;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinSize|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_UNICODE;_ATL_DLL;_ATL_MIN_CRT;$(NoInherit)"
/>
</FileConfiguration>
</File>
<File
RelativePath="JobInfo.def"
>
</File>
<File
RelativePath="JobInfo.idl"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCMIDLTool"
GenerateStublessProxies="true"
TypeLibraryName=".\JobInfo.tlb"
HeaderFileName="JobInfo.h"
InterfaceIdentifierFileName="JobInfo_i.c"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinDependency|Win32"
>
<Tool
Name="VCMIDLTool"
GenerateStublessProxies="true"
TypeLibraryName=".\JobInfo.tlb"
HeaderFileName="JobInfo.h"
InterfaceIdentifierFileName="JobInfo_i.c"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinSize|Win32"
>
<Tool
Name="VCMIDLTool"
GenerateStublessProxies="true"
TypeLibraryName=".\JobInfo.tlb"
HeaderFileName="JobInfo.h"
InterfaceIdentifierFileName="JobInfo_i.c"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinDependency|Win32"
>
<Tool
Name="VCMIDLTool"
GenerateStublessProxies="true"
TypeLibraryName=".\JobInfo.tlb"
HeaderFileName="JobInfo.h"
InterfaceIdentifierFileName="JobInfo_i.c"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Debug|Win32"
>
<Tool
Name="VCMIDLTool"
GenerateStublessProxies="true"
TypeLibraryName=".\JobInfo.tlb"
HeaderFileName="JobInfo.h"
InterfaceIdentifierFileName="JobInfo_i.c"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinSize|Win32"
>
<Tool
Name="VCMIDLTool"
GenerateStublessProxies="true"
TypeLibraryName=".\JobInfo.tlb"
HeaderFileName="JobInfo.h"
InterfaceIdentifierFileName="JobInfo_i.c"
/>
</FileConfiguration>
</File>
<File
RelativePath="JobInfo.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG;$(NoInherit)"
AdditionalIncludeDirectories="$(OUTDIR)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinDependency|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;$(NoInherit)"
AdditionalIncludeDirectories="$(OUTDIR)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinSize|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;$(NoInherit)"
AdditionalIncludeDirectories="$(OUTDIR)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinDependency|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;$(NoInherit)"
AdditionalIncludeDirectories="$(OUTDIR)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG;$(NoInherit)"
AdditionalIncludeDirectories="$(OUTDIR)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinSize|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;$(NoInherit)"
AdditionalIncludeDirectories="$(OUTDIR)"
/>
</FileConfiguration>
</File>
<File
RelativePath="JobInfoService.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinDependency|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_UNICODE;_ATL_STATIC_REGISTRY;_ATL_MIN_CRT;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinSize|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;_ATL_DLL;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinDependency|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;_ATL_STATIC_REGISTRY;_ATL_MIN_CRT;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_UNICODE;$(NoInherit)"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinSize|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_UNICODE;_ATL_DLL;_ATL_MIN_CRT;$(NoInherit)"
/>
</FileConfiguration>
</File>
<File
RelativePath="StdAfx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinDependency|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_UNICODE;_ATL_STATIC_REGISTRY;_ATL_MIN_CRT;$(NoInherit)"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinSize|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;_ATL_DLL;$(NoInherit)"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release MinDependency|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;_ATL_STATIC_REGISTRY;_ATL_MIN_CRT;$(NoInherit)"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_UNICODE;$(NoInherit)"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Unicode Release MinSize|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_UNICODE;_ATL_DLL;_ATL_MIN_CRT;$(NoInherit)"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="JobInfoService.h"
>
</File>
<File
RelativePath="Resource.h"
>
</File>
<File
RelativePath="StdAfx.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="JobInfoService.rgs"
>
</File>
<File
RelativePath="JobInfoService_ATEReg.rgs"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
----------------------------------------------
Hope you will address my point.
Thanks Ibrahim for your kind timely response.
Regards,
Madhur
Huxwell
You could control the settings for an enterprise application in this manner. Lets look at how Visual Studios utilaizes MSBuild in a similar fashion.
There are many different types of projects, C#, VB.NET,ASP.NET,etc.
If you create a VC# application then in your project file there is an import statement
<Import Project="${MSBuildBinPath\Microsoft.CSharp.Targets"/ >
(From memory spelling or whatever may be wrong, see your file for exact value )
Inside of this file it will import the Microsoft.Common.Targets file.
Every project created with Visual Studios will import the Microsoft.Common.Targets file. This is a place the defines things that are common to all projects. For instance the Build target is defined in that file. Let's take a look at how the Build is performed, Microsoft.Common.Targets defines what steps are involved in the build, and how to do many of them. For instance resolving dependencies is in there. But the Compile target is not defined there, because it doesn't know what type of project you are dealing with. This is one reason for the Micsooft.CSharp.Targets file, it defines HOW to compile the project, but it doesn't know everything else to build it.
In your scenario, for every project that your orginization creates you need to ensure that those common project files get included. You could break it up in division and have them include the higher project file. Just like Visual Studios does, your VC# applications don't directly include Microsoft.Common.Targets. That file is included through Microsoft.CSharp.Targets. Does this answer your question
Sayed Ibrahim Hashimi
Tom Issac
Looks like I should have verified before I wrote it. Just checked my other machine that has VS2005 on it. There is no Microsoft.VC.targets file, because MSBuild will simply invoke the VC++ builder to perform those operations. Looks like there is currently no method to change how your VC++ project will build. But I don't think that this is necessary for what you're trying to achieve based on your previous message. Sorry for the mis-information.
Sayed Ibrahim Hashimi
fantasimus
You can pass in the parameters on the commandline to MSBuild:
msbuild <mysolution.sln> /p:ParameterName1=ParameterValue1 /p:ParameterName2=ParameterValue2
Then stick this in a .bat file and run it. The parameters would match to whatever properties in the project file you want to control. For example, if you wanted to control retail vs. debug, you would do:
msbuild <mysolution.sln> /p:Configuration=Retail
The parameters you apply on the command-line will override the settings in any of the project files included in the solution.
Neil
DaveIHS01
hth,
Sayed Ibrahim Hashimi
kasra007
Thanks for your quick response.
I'm not sure whether config file will work from the command prompt or not.
According to your suggession I have to add
<Import Project="$(XXX_Path)\SolutionProperties.proj" />. line in each project and my ultimate purpose is that to control settings for all the projects in a application from a common place.
My application may have more than 50 solutions and some have VC8 project and some have vc# projects. Would it be possible in this way to control the project settings in an application from a common place
Ibrahim, hope to hear from you more on this.
Regards,
Madhur
JonesEJ20
In continuation with last response. I have vc8 project also under particular solution in that case MS Build will work Because as per now i have gone thru the documentation of MS Build it is not supporting VC projects (If I'm not wrong).
Do we able to import
<Import Project="${MSBuildBinPath\Microsoft.VC.Targets"/ > or similar to this statement
Can you please tell me is there any alternative solution that works in vc project also under VS-2005.
Regards,