'How to disable warning MSB4011 in Visual Studio (property sheets included 2+ times)

I use property sheets to manage inclusion of header and library dependencies. In the dependency tree, a project might end up including a property sheet twice, if 2 dependencies share a common dependency (and that's because property sheets can include other propery sheets).

Which results in:

warning MSB4011: "xxx.props" ne peut pas être réimporté car il a déjà été importé. Cette importation est ignorée. (already imported, ignored....)

This is just a warning but I would like to disable it. How ?

I tried compiler option:

/nowarn:MSB4011

/nowarn:4011

Doesn't work.

I tried pragma:

#pragma warning( disable : 4011)

Doesn't work.



Solution 1:[1]

Suppressing the warning level with /p:WarningLevel=X might be a way, other than that, there doesn't seem to be a way: related thread. I suggest to propose a new feature (suppress MSB warning) to Developer Community. You can put the link in the comments.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Minxin Yu - MSFT