Updated the proj file to create the appSettings, connectionString config files if they are missing, then we also ignore these files and remove them from the repo - just like the web.config
This commit is contained in:
@@ -2597,6 +2597,13 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
|
||||
<Target Name="BeforeBuild">
|
||||
<!-- Create web.config file from Template if it doesn't exist -->
|
||||
<Copy SourceFiles="$(ProjectDir)web.Template.config" DestinationFiles="$(ProjectDir)Web.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)Web.config')" />
|
||||
|
||||
<!-- Create appSettings.config file from Template if it doesn't exist -->
|
||||
<Copy SourceFiles="$(ProjectDir)config\appSettings.release.config" DestinationFiles="$(ProjectDir)config\appSettings.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)config\appSettings.config')" />
|
||||
|
||||
<!-- Create connectionStrings.config file from Template if it doesn't exist -->
|
||||
<Copy SourceFiles="$(ProjectDir)config\connectionStrings.release.config" DestinationFiles="$(ProjectDir)config\connectionStrings.config" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="false" Condition="!Exists('$(ProjectDir)config\connectionStrings.config')" />
|
||||
|
||||
<!-- Transform the local Web.config file in Visual Studio -->
|
||||
<TransformXml Source="$(ProjectDir)Web.config" Transform="$(ProjectDir)web.Template.$(Configuration).config" Destination="$(ProjectDir)Web.$(Configuration).config.transformed" Condition="$(BuildingInsideVisualStudio) == true" />
|
||||
<!-- Always transform the Template file when not in VS (ie: build.bat) -->
|
||||
|
||||
Reference in New Issue
Block a user