Sharpmake icon indicating copy to clipboard operation
Sharpmake copied to clipboard

ResourcesPath and ContentPath have invalid values.

Open Michron opened this issue 6 years ago • 0 comments

The values of ResourcesPath and ContentPath are combined with RootPath in InitCSharpSpecifics (https://github.com/ubisoftinc/Sharpmake/blob/dev/Sharpmake/Project.cs#L2126), but because this is called from the constructor the value of RootPath will always be an empty string. This causes CSharpProject types to fill ResolvedResourcesFullFileNames and ResolvedContentFullFileNames with all files found in "/Resources/" and "/Content/", which will be interpreted to for example "C:/Resources" if the working directory is on the C: drive. This adds all the files found in those folders to the C# project, even though they are not related to the project at all.

A simple fix for the issue would be to wait with combining RootPath and ResourcesPath/ContentPath until the ResolveSourceFiles method of Project.cs.

Michron avatar Jul 25 '19 15:07 Michron