Skip to content

Commit

Permalink
Minor text cleanup and link files to warnings about binding redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
CZEMacLeod committed Apr 26, 2022
1 parent 77bb72c commit cb9dc86
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
====================================================================================================
GenerateBindingRedirects Behaviors
Traditionally (Microsoft.Common.CurrentVersion.targets) only Performs BindingRedirect calculations when
Project type is deemed to "need" redirects -> when OutputType == 'exe' or OutputType == 'winexe' (Microsoft.Common.CurrentVersion.targets)
AND
Expand All @@ -12,7 +12,7 @@
A newer Full Framework project TargetFrameworkIdentifier == '.NETFramework' and '$(TargetFrameworkVersion.TrimStart(vV))' >= '4.7.2' (Microsoft.Common.CurrentVersion.targets)
Additionally it chooses the filename of the config file to be updated as what exe projects want...
$(IntermediateOutputPath)$(TargetFileName).config -> the config file named after the assembly and in the IntermediateOutputPath
https://github.com/CZEMacLeod/MSBuild.SDK.SystemWeb/issues/34
This SDK Project Type will override these settings so that we can facilitate developers working with BindingRedirects in the web.config
Enable the Build Process to calculate Binding Redirects
Expand All @@ -22,7 +22,7 @@
OverwriteAppConfigWithBindingRedirects -> this is the SystemWeb Sdk Legacy property
GeneratedBindingRedirectsAction (Overwrite) -> this will conditionally change wich config file is written to
====================================================================================================
-->
-->

<Project>

Expand All @@ -31,7 +31,7 @@
<AutoGenerateBindingRedirects Condition=" '$(AutoGenerateBindingRedirects)' == '' ">true</AutoGenerateBindingRedirects>
</PropertyGroup>

<PropertyGroup Label="Set the desire default behavior of what to do with SuggestedBindingRedirects if not yet set"
<PropertyGroup Label="Set the desired default behavior of what to do with SuggestedBindingRedirects if not yet set"
Condition=" '$(GeneratedBindingRedirectsAction)' == ''">
<GeneratedBindingRedirectsAction>None</GeneratedBindingRedirectsAction>
<GeneratedBindingRedirectsAction Condition=" '$(OverwriteAppConfigWithBindingRedirects)' != 'true' ">Preview</GeneratedBindingRedirectsAction>
Expand All @@ -56,8 +56,8 @@
In general we want to emit a "warning" whenever we either do, or don't do something to help developers find the property that drives this behavior
====================================================================================================
-->
<Target Name="SystemWebProject_ChooseConfigFileForGenerateBindingRedirects"
-->
<Target Name="SystemWebProject_ChooseConfigFileForGenerateBindingRedirects"
BeforeTargets="GenerateBindingRedirects"
Condition="'$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and @(SuggestedBindingRedirects->Count()) > 0 ">

Expand All @@ -67,16 +67,16 @@
</PropertyGroup>

<Warning Condition="'$(GeneratedBindingRedirectsAction)' != 'Preview' and '$(GeneratedBindingRedirectsAction)' != 'Overwrite'"
Text="Generated Binding Redirects have been applied only to the $(TargetFileName).config. You should incorporate them into the web.config. Consider setting &lt;GeneratedBindingRedirectsAction&gt;Preview&lt;/GeneratedBindingRedirectsAction&gt; to create a file containing the proposals. Consider setting &lt;GeneratedBindingRedirectsAction&gt;Overwrite&lt;/GeneratedBindingRedirectsAction&gt; to automatically update web.config with proposals." />
File="$(TargetFileName).config"
Text="Generated Binding Redirects have been applied only to the $(TargetFileName).config. You should incorporate them into the web.config. Consider setting &lt;GeneratedBindingRedirectsAction&gt;Preview&lt;/GeneratedBindingRedirectsAction&gt; to create a file containing the proposals. Consider setting &lt;GeneratedBindingRedirectsAction&gt;Overwrite&lt;/GeneratedBindingRedirectsAction&gt; to automatically update web.config with proposals." />

<Warning Condition="'$(GeneratedBindingRedirectsAction)' == 'Preview'"
Text="Generated Binding Redirects have been applied only to the Web.BindingRedirects.config. You should incorporate them into the web.config. Consider setting &lt;GeneratedBindingRedirectsAction&gt;Overwrite&lt;/GeneratedBindingRedirectsAction&gt; to automatically update web.config with proposals." />
File="Web.BindingRedirects.config"
Text="Generated Binding Redirects have been applied only to the Web.BindingRedirects.config. You should incorporate them into the web.config. Consider setting &lt;GeneratedBindingRedirectsAction&gt;Overwrite&lt;/GeneratedBindingRedirectsAction&gt; to automatically update web.config with proposals." />

<Warning Condition="'$(GeneratedBindingRedirectsAction)' == 'Overwrite'"
Text="Generated Binding Redirects have been applied automatically to the web.config. This warning will disappear on the next build." />
File="Web.config"
Text="Generated Binding Redirects have been applied automatically to the Web.config. This warning will disappear on the next build." />

</Target>



</Project>

0 comments on commit cb9dc86

Please sign in to comment.