ContentFilesExample package doesn't work when the PCL frameworks are selected as assets
coffee-lover16 opened this issue · 7 comments
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
VS Package Manager Console
NuGet version (x.x.x.xxx):
4.9.4.5839
VS version (if appropriate):
15.9.9
OS version (i.e. win10 v1607 (14393.321)):
Win 10
Detailed repro steps
-
Enable PackageReference for Nuget in VS
-
Create new class library based on .Net Framework 4.6.2(same for 4.5)
-
Go to the 'Package Manager Console' and enter
Install-Package contentfilesexample
. Package url: https://www.nuget.org/packages/ContentFilesExample
Result:
There aren't any content files in the project
Other suggested things
That works fine for .Net Core projects
Is it possible to get that working for .Net Framework projects that use PackageReference?
@Eugenio161288
I was not able to reproduce the issue.
The content files that are copy to output are copied to the output directory at build time.
I believe what you are seeing is dotnet/project-system#3431
NuGet is the one generating the folders and the assets file.
It's the build tasks that handle the copying and wiring up into the build.
The error message suggests that the path is getting decoded.
I'll investigate and rout to them as necessary.
@Eugenio161288
This is a problem in the build targets.
New style projects have the same issue:
//cc @tmeschter for the old csproj targets.
The build targets should not decode the path, but rather treat it as a string.
@Eugenio161288
I will fix the contentfilesexample package to not include PCL framework as they are no longer the recommended way.
What you are referring to seems to be a duplicate of another report NuGet/Samples#21
Closing this as there's nothing actionable remaining from NuGet.