0

我使用的是visual studio 2012,我发现很难为diff环境添加web.config文件。我看着这个link并试图右击.pubxml文件和选择添加配置变换选项。我这样做后,系统添加web.simplePublish.config文件,其中我不能使用visual studio重命名。Visual Studio 2012中的Web配置转换

enter image description here

如果我重命名使用Windows Explorer文件,该文件不web.config中树下解决方案上市。

enter image description here

什么是添加在Visual Studio中的各种环境下的web.config文件2012

回答

0

你可以尝试你之前修改*的.csproj然后找出文件名的正确方法重命名它并修改使用Windows资源管理器的文件名。 或者你可以尝试一个新的标签添加到* .csproj的

<ItemGroup> 
<Content Include="..\default.licenseheader"> 
    <Link>default.licenseheader</Link> 
</Content> 
<Content Include="packages.config" /> 
<None Include="Properties\PublishProfiles\xxxx.pubxml" /> 
<None Include="Web.Debug.config"> 
    <DependentUpon>Web.config</DependentUpon> 
</None> 
<None Include="Web.Release.config"> 
    <DependentUpon>Web.config</DependentUpon> 
</None> 
<None Include="Web.SimplePublish.config"> 
    <DependentUpon>Web.config</DependentUpon> 
</None> 

,您可以使用Configuration Manager在你的Visual Studio请参考以下链接Add an Additional

+0

感谢您的快速回复。但是这听起来更像是一种解决方法。必须有一个简单的方法。让我等待几个更多的答复。 – SharpCoder

+0

@Brown_Dynamite我已经更新了答案,并为您提供了另一种方式来达到您的要求。 –

相关问题