I want to publish my C++ modules to NuGet. However, tests have found that users are unable to import ixx modules in NuGet as they would with header files.
import ModuleFromNuGet; //Failed to build; module not found
I’ve added the ixx directory to the include directory in target, just like I did for the header:
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
This is sufficient if the NuGet package only has traditional header files. But if there is an ixx module, this does not seem to allow the user to automatically find the module.
What is the module lookup mechanism of MSVC++? Does anyone have experience using modules in NuGet?
3