# C# csproj \<None\> tool, VS\_TOOL\_OVERRIDE not working

**URL:** <https://discourse.cmake.org/t/c-csproj-none-tool-vs-tool-override-not-working/7249>\
**Category:** Code\
**Tags:** gen:vs\
**Created:** [January 15, 2023, 2:29am UTC](https://discourse.cmake.org/t/c-csproj-none-tool-vs-tool-override-not-working/7249 "2023-01-15T02:29:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ignus2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ignus2/32/3075_2.png) [@ignus2](https://discourse.cmake.org/u/ignus2)\
**Post date:** [January 15, 2023, 2:29am UTC](https://discourse.cmake.org/t/c-csproj-none-tool-vs-tool-override-not-working/7249/1 "2023-01-15T02:29:55Z")

</div>

I’m using CMake to convert an old project having C# project files, and in them there are a couple file using the \<None …\> tool, effectively disabling them from build. I saw the VS\_TOOL\_OVERRIDE property ([https://cmake.org/cmake/help/latest/prop\_sf/VS\_TOOL\_OVERRIDE.html](https://cmake.org/cmake/help/latest/prop_sf/VS_TOOL_OVERRIDE.html)) which sais it should allow me to override the tool but it doesn’t work for .cs and .resx files (a couple of those are set to None in the old csproj I’m converting to CMake).  
How can I set the None tool for these files?

---

<div class="post-metadata">

**Author:** ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)\
**Post date:** [January 16, 2023, 1:07pm UTC](https://discourse.cmake.org/t/c-csproj-none-tool-vs-tool-override-not-working/7249/2 "2023-01-16T13:07:56Z")

</div>

Wild guess, but perhaps setting their source property [`HEADER_FILE_ONLY`](https://cmake.org/cmake/help/latest/prop_sf/HEADER_FILE_ONLY.html) to `TRUE` could help.

---

<div class="post-metadata">

**Author:** ![ignus2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ignus2/32/3075_2.png) [@ignus2](https://discourse.cmake.org/u/ignus2)\
**Post date:** [January 23, 2023, 12:12am UTC](https://discourse.cmake.org/t/c-csproj-none-tool-vs-tool-override-not-working/7249/3 "2023-01-23T00:12:58Z")

</div>

Unfortunately no, if I set HEADER\_FILE\_ONLY then it becomes a `<ClInclude>...</ClInclude>` node always (regardless of the extension).

---

<div class="post-metadata">

**Author:** ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)\
**Post date:** [January 23, 2023, 6:10pm UTC](https://discourse.cmake.org/t/c-csproj-none-tool-vs-tool-override-not-working/7249/4 "2023-01-23T18:10:20Z")

</div>

I would have said, setting the [LANGUAGE](https://cmake.org/cmake/help/latest/prop_sf/LANGUAGE.html) to `NONE` should be working. Just like on the project command.

But this property only allows enabled languages.  
So I guess you have to create a [feature request](https://gitlab.kitware.com/cmake/cmake/-/issues), if there are no other suggestions.
