diff --git a/TextFile1.txt b/TextFile1.txt new file mode 100644 index 0000000..711d2b6 --- /dev/null +++ b/TextFile1.txt @@ -0,0 +1,15 @@ +Here's what we do. It's not hard to set up but not intuitive or well documented. +Create web.config.template. No build action, do not copy. Copy-paste your web.config contents here. (This is an arbitrary name, no black magic.) +Right-click and select "Add Transform". This will get you files like Web.config.Debug.template and Web.config.Release.template. Add your transforms here. +Unload your project (right-click on project, select "Unload Project") +Open the .csproj file (right-click on closed project, select "Edit .csproj" +Add the XML below to the bottom of the file (just before ) +Build the project. This should create a web.config file, but you still need to add it to the project. +Click "Show All Files" +Right-click the new web.config that was created and select "Include in Project" +Delete and transform files that were added automatically under web.config + + + +Now when you build, you'll get a shiny new web.config that is the result of the transformation. +Be sure to add the .template files to source control, and exclude the actual web.config. I also put a big warning at the top of Web.config.template to only edit the .template files, not the actual web.config, or your changes will be overwritten. \ No newline at end of file diff --git a/eDos/eDos.csproj b/eDos/eDos.csproj index 67d6c8e..1feca52 100644 --- a/eDos/eDos.csproj +++ b/eDos/eDos.csproj @@ -268,17 +268,32 @@ - + + Always + - - web.config + + true + + + web.config.template + true - - web.config + + web.config.template + true + + + web.config.template + true + + + web.config.template + true @@ -329,4 +344,7 @@ + + + \ No newline at end of file diff --git a/eDos/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/eDos/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index b211cc2..febccca 100644 Binary files a/eDos/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/eDos/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/eDos/web.Debug.config b/eDos/web.Debug.config deleted file mode 100644 index 53fc452..0000000 --- a/eDos/web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/eDos/web.Release.config b/eDos/web.Release.config deleted file mode 100644 index 8af5b7b..0000000 --- a/eDos/web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/eDos/web.config b/eDos/web.config index 3398d2a..2c1d3af 100644 --- a/eDos/web.config +++ b/eDos/web.config @@ -1,8 +1,8 @@  - - + + diff --git a/eDos/web.config.Debug.template b/eDos/web.config.Debug.template new file mode 100644 index 0000000..b098b3c --- /dev/null +++ b/eDos/web.config.Debug.template @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/eDos/web.config.FolderProfile.template b/eDos/web.config.FolderProfile.template new file mode 100644 index 0000000..50378e9 --- /dev/null +++ b/eDos/web.config.FolderProfile.template @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/eDos/web.config.Release.template b/eDos/web.config.Release.template new file mode 100644 index 0000000..fd38cce --- /dev/null +++ b/eDos/web.config.Release.template @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/eDos/web.config.eDosTest.template b/eDos/web.config.eDosTest.template new file mode 100644 index 0000000..fd38cce --- /dev/null +++ b/eDos/web.config.eDosTest.template @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/eDos/web.config.template b/eDos/web.config.template new file mode 100644 index 0000000..2c1d3af --- /dev/null +++ b/eDos/web.config.template @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eDosWeb.sln b/eDosWeb.sln index 8a4545b..ad69735 100644 --- a/eDosWeb.sln +++ b/eDosWeb.sln @@ -5,6 +5,11 @@ VisualStudioVersion = 15.0.27703.2018 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eDos", "eDos\eDos.csproj", "{7EC1704D-587D-4AD8-87B0-498C958EBF3C}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E3FA148E-447D-4C65-B5E5-E24EB082D34C}" + ProjectSection(SolutionItems) = preProject + TextFile1.txt = TextFile1.txt + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU