mrlacey / WarnAboutTodos

Create warnings about TODO comments
https://marketplace.visualstudio.com/items?itemName=MattLaceyLtd.WarnAboutTODOs
MIT License
21 stars 5 forks source link

Config file contents are not recognized #6

Closed KCarterSr closed 5 years ago

KCarterSr commented 5 years ago
  1. The File contents are not recognized.

What do you mean by "AdditionalFile"? Is that a tag in the .csproj file?

When I "Right Click -> Add Existing File", I get the file in the project but nothing in the .csproj file (I think this is normal unless you change the file properties in the properties box).

I also tried adding this to the .csproj file. `

Never

`

  1. Visual Studio (2017) intellisense is showing an error (I think it thinks its XML). This happens on other team members computer as well. image

image

mrlacey commented 5 years ago

1.

"AdditionalFiles" is a build action. You set it in the properties window for the file. image

Inside the csproj it looks like this inside an ItemGroup

    <AdditionalFiles Include="TODO-Warn.config">
      <SubType>Designer</SubType>
    </AdditionalFiles>

2.

You can ignore the intellisense errors and they will go away when you close the file. They are displayed because VS is treating files wtih ".config" extensions as XML configuration files.

Visual Studio also offers different ways of viewing ".config" files. From your screenshot I can see it's in "Design" mode. If you change to "Source" mode (as below) you'll see line wrapping, etc.

image

KCarterSr commented 5 years ago

Works!!

Thank you

KCarterSr commented 5 years ago

NOTE: In VS 2017 in the properties window it's called "C# analyzer additional files" Thanks

mrlacey commented 5 years ago
      NOTE: In VS 2017 in the properties window it's called "C# analyzer additional files"

I think it varies by project type, not VS version. But, yes, good to document the other name here too. :)