[英]Setting solution configurations in visual studio custom wizard
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. 我已经为Visual Studio 2010创建了一个自定义向导。我可以设置项目配置,但是我找不到如何设置解决方案配置。
Below is an abstract from my code to setup a project configuration from default.js. 下面是我的代码的摘要,用于从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. 更新我最近从Visual Studio 2008迁移到Visual Studio2010。当我重新查看2008版本时,我注意到它的行为符合要求,即为解决方案和项目都添加了新配置。 Is there a known difference in this respect between studio 2008 and 2010?
Studio 2008和2010之间在这方面是否有已知的区别?
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)/';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.