c# - 如何在我的 vsix 项目中重命名解决方案文件(IWizard 实现)
问题描述
我有一个 vsix 项目,用于创建具有多个项目的解决方案。我遇到的问题是如何重命名解决方案文件。
我试过了
public void RunStarted(object automationObject,
Dictionary<string, string> replacementsDictionary,
WizardRunKind runKind, object[] customParams)
{
try
{
if (replacementsDictionary[ParameterKey.EnteredProjectName] == replacementsDictionary[ParameterKey.SolutionName]
&& ! replacementsDictionary[ParameterKey.EnteredProjectName].ToLower().Contains("restapi"))
replacementsDictionary[ParameterKey.SolutionName] = String.Concat(replacementsDictionary[ParameterKey.SolutionName], ".RestAPI");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
public class ParameterKey
{
internal const string MachineName= "$machinename$";
internal const string EnteredProjectName = "$projectname$";
internal const string Organization = "$registeredorganization$";
internal const string SafeProjectName = "$safeprojectname$";
internal const string SolutionName = "$specifiedsolutionname$";
internal const string Username = "$username$";
internal const string Time = "$time$";
}
这不起作用。
我关注了这篇文章
解决方案
推荐阅读
- django - 如何在 azure 广告上配置 redirect_uri 以响应两种不同的环境?
- php - 上传多个图像在 PHP MySqli 中删除多个图像上的选定图像
- erlang - 为什么 cyrsasl_scram 机制不允许 base64 GUID?
- dynamics-crm - 使用 Common Data Service (CDS) 设置是或否布尔选项集
- aws-lambda - AWS 上的 Lambdas CloudFormation 错误:“此 Lambda 函数的版本存在。修改函数以创建新版本。”
- java - 这是一本书中的一个问题,我无法理解,但不知何故我想知道我的编码是否正确
- substrate - Substrate 是否有终端 CLI 工具,例如 Ethereum attach?
- git - `git rebase` 期间的许多合并冲突
- xml - 为什么不能用xidel提取数据?
- python - City'对象在django-autocomplete-light中没有属性'region__name'