CZEMacLeod / MSBuild.SDK.SystemWeb

This MSBuild SDK is designed to allow for the easy creation and use of SDK (shortform) projects targeting ASP.NET 4.x using System.Web.
MIT License
151 stars 8 forks source link

AutoGenerateBindingRedirects causes output xml attributes to change order randomly #48

Closed laped closed 1 year ago

laped commented 1 year ago

Not sure this is the right repo to ask this, but I just changed one of our projects to use this SDK and set these properties:

`

true Overwrite

`

When building the project it occasionally makes updates to the config that looks like this:

image

For some reason it changes the order of those attributes in the xml, but the order seems to be random or always opposite of the current xml. Some times publicKeyToken comes first, other times it's the culture attribute. The value of the attributes doesn't change.

Does this xml output come from this project or is it coming from an msbuild task/target?

leusbj commented 1 year ago

As of v4.0.77 this package has used the MSBuild engine to create/generate the potentially new content of the web.config file.

Under normal circumstances MSBUild is only overwriting an <<applicationnamehere>>.config file in the \bin directory (a transient and generated file traditionally not source controlled).

When the <GeneratedBindingRedirectsAction>Overwrite</GeneratedBindingRedirectsAction> property is set, the output is redirected to the main project directory web.config.