Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ public static string GetCandidateRelativePath(ITaskItem candidate, bool fingerpr
{
fileName = Path.GetFileNameWithoutExtension(destinationSubPath);
extension = Path.GetExtension(destinationSubPath);
subPath = destinationSubPath.Substring(fileName.Length + extension.Length);
subPath = Path.GetDirectoryName(destinationSubPath);
if (!string.IsNullOrEmpty(subPath))
subPath += "/";
}

string relativePath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public void WriteBootJson(Stream output, string entryAssemblyName)
resourceList = new();
resourceData.extensions[extensionName] = resourceList;
}
var targetPath = resource.GetMetadata("TargetPath");
var targetPath = endpointByAsset[resource.ItemSpec].ItemSpec;
Debug.Assert(!string.IsNullOrEmpty(targetPath), "Target path for '{0}' must exist.", resource.ItemSpec);
AddResourceToList(resource, resourceList, targetPath);
continue;
Expand Down Expand Up @@ -431,7 +431,7 @@ void AddResourceToList(ITaskItem resource, ResourceHashesByNameDictionary resour
{
if (!resourceList.ContainsKey(resourceKey))
{
Log.LogMessage(MessageImportance.Low, "Added resource '{0}' to the manifest.", resource.ItemSpec);
Log.LogMessage(MessageImportance.Low, "Added resource '{0}' with key '{1}' to the manifest.", resource.ItemSpec, resourceKey);
resourceList.Add(resourceKey, $"sha256-{resource.GetMetadata("Integrity")}");
}
}
Expand Down