Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only include web.$(Configuration).config where xxxx exists on disk. Fixes #67 #68

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "2.0.1",
"MSBuild.SDK.SystemWeb": "4.0.82",
"MSBuild.SDK.SystemWeb.RazorLibrary": "4.0.82"
"MSBuild.SDK.SystemWeb": "4.0.88",
"MSBuild.SDK.SystemWeb.RazorLibrary": "4.0.88"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,22 @@

<ItemGroup Condition="'$(EnableWebFormsDefaultItems)'=='true'">
<Content Include="Web.config" />
<_WebConfigConfigurations Include="$(Configurations)" />
<None Include="@(_WebConfigConfigurations->'Web.%(Identity).config')">
<DependentUpon>Web.config</DependentUpon>
</None>
<!-- web.*.config where * is a Configuration type (used for transforms) fixes #67 -->
<_WebConfigConfiguration Include="$(Configurations)" Exclude="@ExcludeWebConfigConfiguration">
<Configuration>%(Identity)</Configuration>
</_WebConfigConfiguration>
<_WebConfigConfigurationFile Include="@(_WebConfigConfiguration->'Web.%(Identity).config')" >
<DependentUpon Condition="EXISTS('Web.config')">Web.config</DependentUpon>
<CurrentConfiguration>false</CurrentConfiguration>
<CurrentConfiguration Condition="'$(Configuration)'=='%(Configuration)'">true</CurrentConfiguration>
<!-- The following could be extended to allow applying transforms based on the configuration in a hierarchical way. See notes in PR #68 -->
<!--<ApplyConfiguration>false</ApplyConfiguration>
<ApplyConfiguration Condition="'$(Configuration)'=='%(Configuration)'">true</ApplyConfiguration>
<ApplyConfiguration Condition="$(Configuration.StartsWith('%(Configuration).'))">true</ApplyConfiguration>-->
</_WebConfigConfigurationFile>
<None Include="@(_WebConfigConfigurationFile->Exists())" />
<None Include="Web.BindingRedirects.config" Condition="EXISTS('Web.BindingRedirects.config')">
<DependentUpon>Web.config</DependentUpon>
<DependentUpon Condition="EXISTS('Web.config')">Web.config</DependentUpon>
</None>

<!-- Altered web.*.config inclusion so these items will be in the WebDeploy Package
Expand Down