The textures reside in the same folder as the model e.g. ("Assets\Models\Cars\Audi\Audi.x"), ("Assets\Models\Cars\Audi\Audi.jpg")
Here's a snippet from ContentPipeline.xml,
<Item>
<Source>C:\Users\user\AppData\Roaming\XnaWinformMapEditor\UncompiledAssets\Models\Animals\Tirarex\tirarex.X</Source>
<Importer>XImporter</Importer>
<Options>IntermediateFile, DontCacheImportedData</Options>
<Output>obj\Release\tirarex_0.xml</Output>
<Time>2009-11-20T12:03:26.3260065-06:00</Time>
</Item>
<Item>
<Source>C:\Users\user\AppData\Roaming\XnaWinformMapEditor\UncompiledAssets\Models\Animals\Tirarex\GRANDECO.jpg</Source>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
<Parameters>
<Data Key="ColorKeyColor" Type="Graphics:Color">FFFF00FF</Data>
<Data Key="ColorKeyEnabled" Type="bool">true</Data>
<Data Key="TextureFormat" Type="Processors:TextureProcessorOutputFormat">DxtCompressed</Data>
<Data Key="GenerateMipmaps" Type="bool">true</Data>
<Data Key="ResizeToPowerOfTwo" Type="bool">true</Data>
</Parameters>
<Options>None</Options>
<Output>C:\Users\user\AppData\Roaming\XnaWinformMapEditor\Assets\GRANDECO_0.xnb</Output>
<Time>1995-03-19T06:34:00-05:00</Time>
</Item>
I am thinking its how the files are getting added to msBuildItem,
BuildItem buildItem = msBuildProject.AddNewItem("Compile", source); // source is the full path
string buildItemPath = Path.GetFullPath(source).Replace(Path.GetFullPath(projectPath), "").Remove(0, 1); // need a better way to calculate nested folder path
buildItem.SetMetadata("Link", buildItemPath);
buildItem.SetMetadata("Name", name);
It's probably as trivial as setting the right metadata...