dotnet / dotnet/NuGet.BuildTasks

TargetPath not set correctly for contentFiles

Open
#80 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
47
Forks
65
PR merge metrics
No merged PRs in 30d

Description

When trying to use contentFiles with UWP project, the files were not copied to the expected subdirectory.

Here's the nuspec:
https://gist.github.com/clairernovotny/5d007fd323a8393412b9

I expected Doc2.txt to be in the `AppX\Resources\Doc2.txt` directory. Instead, it was in `AppX\Doc2.txt`

Looking at a diagnostic build, it seems like the TargetPath metadata was not set correctly:

```
1> C:\Users\oren\.nuget\packages\TestWhitelist\1.2.0\contentFiles\any\uap10.0\Resources\Doc2.txt
1> NuGetItemType=Content
1> NuGetPackageId=TestWhitelist
1> NuGetPackageVersion=1.2.0
1> OriginalItemSpec=C:\Users\oren\.nuget\packages\TestWhitelist\1.2.0\contentFiles\any\uap10.0\Resources\Doc2.txt
1> TargetPath=Doc2.txt
```

cc @clairernovotny @jasonmalinowski

Moved from: https://github.com/NuGet/Home/issues/2001

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.