-
Couldn't load subscription status.
- Fork 137
Description
For Tsukisoft/direct-storage-rs#5
We had a list of the form:
<TraverseFiles>
$(PkgMicrosoft_Direct3D_DirectStorage)\native\include\dstorage.h;
$(PkgMicrosoft_Direct3D_DirectStorage)\native\include\dstorageerr.h
</TraverseFiles>But no constants from dstorageerr.h were parsed. Swapping the filenames makes it so that #defines from dstorage.h are lost, but defines from dstorageerr.h are parsed.
I believe the raw string it's parsing here is: dstorage.h;\ndstorageerr.h\n, splitting this on ; causes the last filename to never match. Perhaps a string item = items[i].Trim(); is missing here to make multiline filename strings work more naturally?
win32metadata/sources/GeneratorSdk/MetadataTasks/ScrapeHeaders.cs
Lines 476 to 488 in 3d2ba1e
| private string[] GetFilesFromMetadata(ITaskItem item, string name) | |
| { | |
| string[] items = item.GetMetadata(name).Split(';', System.StringSplitOptions.RemoveEmptyEntries); | |
| for (int i = 0; i < items.Length; i++) | |
| { | |
| if (!Path.IsPathRooted(items[i])) | |
| { | |
| items[i] = Path.Combine(this.MSBuildProjectDirectory, items[i]); | |
| } | |
| } | |
| return items; | |
| } |
After all, when merging this into one line:
<TraverseFiles>$(PkgMicrosoft_Direct3D_DirectStorage)\native\include\dstorage.h;$(PkgMicrosoft_Direct3D_DirectStorage)\native\include\dstorageerr.h</TraverseFiles>Both files were finally parsed correctly.