Pregunta

I have created a custom wizard for visual studio 2010. I can setup the the project configurations but I need I can't find how to set the solution configurations.

Below is an abstract from my code to setup a project configuration from default.js. How can I do a similar thin for the solution?

var debugConfig = proj.Object.Configurations('Debug');
debugConfig.OutputDirectory = '$(ProjectDir)$(ConfigurationName)';
debugConfig.IntermediateDirectory = '$(ConfigurationName)';
debugConfig.ConfigurationType = typeStaticLibrary;
debugConfig.CharacterSet = charSetUnicode;


var CLTool = debugConfig.Tools('VCCLCompilerTool');
CLTool.Optimization = optimizeDisabled;
CLTool.AdditionalIncludeDirectories = '.;$(COREDIR)/cliprt';
CLTool.PreprocessorDefinitions = 'WIN32;_DEBUG;_LIB;CLP_PLATFORM_WIN32';
CLTool.MinimalRebuild = 'true';
CLTool.BasicRuntimeChecks = runtimeBasicCheckAll;
CLTool.RuntimeLibrary = rtMultiThreadedDebug;
CLTool.UsePrecompiledHeader = pchNone;
CLTool.WarningLevel = warningLevel_3;

Update I recently migrated from Visual Studio 2008 to Visual studio 2010. When I checked back at the 2008 version I noticed that it was behaving as required ie the new configurations were added for both the solution and the project. Is there a known difference in this respect between studio 2008 and 2010?

¿Fue útil?

Solución

Ok

I have a solution now. I modified the above code to look like this.

var solCurrentConfig = Solution.SolutionBuild.SolutionConfigurations.Add('AutonomousDebug', 'Debug', true);

var currentConfig = proj.Object.Configurations('AutonomousDebug');

debugConfig.CopyTo( currentConfig );

currentConfig = proj.Object.Configurations('AutonomousDebug');

currentConfig.OutputDirectory = '$(SolutionDir)$(Configuration)';       

currentConfig.IntermediateDirectory = '$(Configuration)/';
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top