private ITaskItem CreateCandidate(
            string itemSpec,
            string sourceId,
            string sourceType,
            string relativePath,
            string assetKind,
            string assetMode)
        {
            var result = new StaticWebAsset()
            {
                Identity               = Path.GetFullPath(itemSpec),
                SourceId               = sourceId,
                SourceType             = sourceType,
                ContentRoot            = Directory.GetCurrentDirectory(),
                BasePath               = "base",
                RelativePath           = relativePath,
                AssetKind              = assetKind,
                AssetMode              = assetMode,
                AssetRole              = "Primary",
                RelatedAsset           = "",
                AssetTraitName         = "",
                AssetTraitValue        = "",
                CopyToOutputDirectory  = "",
                CopyToPublishDirectory = "",
                OriginalItemSpec       = itemSpec,
            };

            result.ApplyDefaults();
            result.Normalize();

            return(result.ToTaskItem());
        }
        private static StaticWebAsset CreateAsset(
            string itemSpec,
            string sourceId,
            string sourceType,
            string relativePath,
            string assetKind,
            string assetMode,
            string basePath                = "base",
            string assetRole               = "Primary",
            string relatedAsset            = "",
            string assetTraitName          = "",
            string assetTraitValue         = "",
            string copyToOutputDirectory   = "Never",
            string copytToPublishDirectory = "PreserveNewest")
        {
            var result = new StaticWebAsset()
            {
                Identity               = Path.GetFullPath(itemSpec),
                SourceId               = sourceId,
                SourceType             = sourceType,
                ContentRoot            = Directory.GetCurrentDirectory(),
                BasePath               = basePath,
                RelativePath           = relativePath,
                AssetKind              = assetKind,
                AssetMode              = assetMode,
                AssetRole              = assetRole,
                RelatedAsset           = relatedAsset,
                AssetTraitName         = assetTraitName,
                AssetTraitValue        = assetTraitValue,
                CopyToOutputDirectory  = copyToOutputDirectory,
                CopyToPublishDirectory = copytToPublishDirectory,
                OriginalItemSpec       = itemSpec,
            };

            result.ApplyDefaults();
            result.Normalize();

            return(result);
        }