When using Octopus Extended Variable Syntax in my app.config file, Visual Studio 2017 Intellisense recognizes this as invalid xml format and shows multiple errors. This is undesirable noise.
Example:
<SomeConfigElement attribute=“normal” #{if this} that=“something” #{/if} />
Is there a way to tell VS this syntax is ok? or is there a way to better shape the syntax so it doesn’t parse as invalid?
Hi,
Thanks for getting in touch! After trying a few things in Visual Studio 2017 to stop these validation errors, I came up empty handed and I was not able to suppress these Intellisense errors unfortunately.
So we came up with one potential work-around which may fit here and I thought I would mention it here just in case. Please note this is an example only and it might need a bit of extra work to get the desired results.
For example, you could abstract the variable substitution syntax out of the XML File and into Octopus as a variable. To do this, you could have a new Octopus Variable called SomeConfigElement which has a value of: