简体   繁体   English

在Visual Studio自定义向导中设置解决方案配置

[英]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.

相关问题 重命名Visual Studio解决方案配置? - Rename Visual Studio Solution Configurations? 在Visual Studio 2010中检测解决方案配置 - Detect solution configurations in Visual Studio 2010 Visual Studio自定义向导-添加其他配置 - Visual Studio custom wizard - add additional configuration Visual Studio安装程序项目向导自定义 - Visual Studio Setup Project Wizard Custom 如何比较visual studio 2010解决方案的2个构建配置? - How to compare 2 build configurations of visual studio 2010 solution? 为什么在 Visual Studio 2010 中尝试打开 Visual Studio 2010 解决方案时运行 Visual Studio 转换向导? - Why does the Visual Studio Conversion Wizard run when trying to open a Visual Studio 2010 solution in Visual Studio 2010? 为Visual Studio定制项目向导存储用户首选项 - Storing user preferences for a Visual Studio custom project wizard Visual Studio 2010可扩展性 - 自定义项目模板向导 - Visual Studio 2010 Extensibility - Custom Project Template Wizard Visual Studio 2010安装向导不会使用3.5 GB的SqlCE数据库生成解决方案 - Visual Studio 2010 Setup Wizard will not build the solution with a 3.5 GB SqlCE database 带向导的Visual Studio项模板 - Visual Studio Item Template with Wizard
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM