# warning MSB4011: masm.props cannot be imported again.

**URL:** https://discourse.cmake.org/t/warning-msb4011-masm-props-cannot-be-imported-again/6566
**Category:** Code
**Tags:** os:windows
**Created:** [September 23, 2022, 11:22pm UTC](https://discourse.cmake.org/t/warning-msb4011-masm-props-cannot-be-imported-again/6566 "2022-09-23T23:22:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![PaulS](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/b3f665/32.png) [@PaulS](https://discourse.cmake.org/u/PaulS)
#### Post date: [September 23, 2022, 11:22pm UTC](https://discourse.cmake.org/t/warning-msb4011-masm-props-cannot-be-imported-again/6566/1 "2022-09-23T23:22:18Z")

</div>

Hi,

I’m using cmake to create the .sln/.vcxproj files for our Windows driver. Everything is working fine, except I get the following MSBUILD warning which I’d like to suppress or eliminate.

- warning MSB4011: “…\BuildCustomizations\masm.props” cannot be imported again.
- It was already imported at "…\Kits\10\build\WindowsDriver.Shared.props (352,3)

The driver has one .asm file which I add to the project using project(${PROJECT\_NAME} C CXX ASM\_MASM) and then adding the .asm as a source file.

When I do this, cmake adds masm.props to the project file.

```
	  <ImportGroup Label="ExtensionSettings">
	    <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
	  </ImportGroup>

```

This causes a problem as this new import is conflicting with the Windows driver imports (WindowsDriver.Shared.props) which has already included masm.props.

I was able to partially eliminate the warning by adding “-- -noWarn:MSB4011” to the cmake build command line.

The problem with this approach is

- it doesn’t eliminate all warnings. There is still a bunch of warning at the start of the project build (the main project has ~20 project dependencies)
- it doesn’t fix the warnings when building with Visual Studio (Microsoft documentation says that MSB4011 cannot be suppressed using project properties).

I was wondering if anyone has encountered this issue and if there is a way to solve it.  
Ideally, I would like to prevent cmake from adding “import masm.props” to the project files.

Thanks,  
Paul
