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

XML Properties #38

Open
ChristopherHaws opened this issue Jun 13, 2018 · 2 comments
Open

XML Properties #38

ChristopherHaws opened this issue Jun 13, 2018 · 2 comments

Comments

@ChristopherHaws
Copy link

Hello, thanks for this great extension!

There seems to be an issue when using XML properties with this extension. It seems to think that it is an invalid property when it isn't. The tooling give the error: "MyProperty" is not a valid child element of a "Property" element.

https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/msbuild/msbuild-properties.md#storing-xml-in-properties

@tintoy
Copy link
Owner

tintoy commented Jun 13, 2018

Hi - thanks, and sorry it's not behaving correctly; I'm trying to reproduce that now. In the meanwhile, as a workaround does it function correctly if you wrap the property value (XML) in <!CDATA[]]>?

@tintoy
Copy link
Owner

tintoy commented Jun 13, 2018

Hmm, is the parent element called Property or PropertyGroup?

I tried opening a project with the following XML, and this is what I see:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <AssemblyName>ConsoleApp1</AssemblyName>
    <OutputType>Exe</OutputType>
    <Diddly>
      <Foo Bar="Baz">
        <Hello>
          <World />
        </Hello>
      </Foo>
    </Diddly>
  </PropertyGroup>
</Project>

xmlpropertyvalue

However, I do see errors in the output window if I'm typing that inner XML by hand and it's temporarily invalid. That's sort of a bug because those messages should only be logged when verbose logging is turned on (XML often becomes invalid while you're typing but will become valid again once you're done) and I'll get that fixed.

Can I just confirm that it's the log window where you're seeing the message about the invalid XML? Is it while editing or building the project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants