asp.net-mvc-5 - 如何重命名 web.config 转换

标签 asp.net-mvc-5 visual-studio-2005 rename web-config-transform

我在 Visual Studio 2015 中使用 ASP.net MVC 5 解决方案。我有以下 web.config
web config transforms

我如何将它们重命名为

  • Web.Integration.config
  • Web.Staging.config
  • Web.Production.config

  • 当我右键单击它们时,我没有重命名选项!

    最佳答案

    您可以复制文件,重命名它们并手动编辑 .csproj 文件以包含它们(替换生成的文件),如下所示:

    <Content Include="Web.Integration.config">
       <DependentUpon>Web.config</DependentUpon>
       <SubType>Designer</SubType>
     </Content>
     <Content Include="Web.Staging.config">
       <DependentUpon>Web.config</DependentUpon>
       <SubType>Designer</SubType>
     </Content>
     <Content Include="Web.Production.config">
       <DependentUpon>Web.config</DependentUpon>
       <SubType>Designer</SubType>
     </Content>
    

    不幸的是,我没有找到通过 Visual Studio 实现这一点的方法。

    关于asp.net-mvc-5 - 如何重命名 web.config 转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38371196/

    相关文章:

    asp.net-mvc-routing - MVC 5 路由和可选参数

    c# - XmlDocument.Load(xml) 从 XmlSerializer 序列化代码生成“无根元素”错误

    visual-studio-2005 - 调试窗口服务

    javascript - 如何重命名 D3 图中的节点

    asp.net-mvc - "rows"中的 "cols"和 `@Html.TextAreaFor` 是什么测量单位?

    ASP.net MVC + ASP.net Identity Seeding 角色和用户

    javascript - MVC 从局部 View 调用函数不起作用

    c++ - 编译随机失败: "cannot open program database"

    Linux根据列表重命名批处理文件

    r - 在R中--更改列表中的列表的列表的名称具有不同的长度