clairernovotny / ReferenceGenerator

MIT License
75 stars 13 forks source link

Error RG001 on UWP library using PackageReference instead of project.json #29

Closed bramborman closed 7 years ago

bramborman commented 7 years ago

I'm getting this error since I "upgraded" my UWP library to the new NuGet reference type.

EXEC : error RG001: Only PCLs are supported by this tool. TargetFrameworkProfile or TargetFrameworkVersion is missing

(By upgrading I mean creating new project and copying all the files etc to the new project while checking the changes in git diff.)

clairernovotny commented 7 years ago

You shouldn't need this tool anymore.... it was for a time last year before using netstandard.library was the recommended approach.

bramborman commented 7 years ago

So I could just remove reference to this tool and delete all dependencies in my .nuspec file? Or the netstandard.library NuGet will generate them for me instead of this tool?

clairernovotny commented 7 years ago

You can remove the reference to this tool. As to the specifics of what you need, it depends on your library. Do you have an example?

bramborman commented 7 years ago

Yes, it's UWPHelper and here you can see the dependencies generated by your tool the last time.

clairernovotny commented 7 years ago

For that, I would just use the direct dependencies that you have as PackageReference, including "Microsoft.NETCore.UniversalWindowsPlatform". Be warned though, that 5.3.x will only work with VS 2017 and higher. If you want your library to be usable in VS 2015, you need to use 5.2.x.

bramborman commented 7 years ago

OK, thanks. Is there any article about that?

clairernovotny commented 7 years ago

About which part?

bramborman commented 7 years ago

You said that it's now recommended to use netstandard.library. So something where this recommendation is.

clairernovotny commented 7 years ago

@terrajobst, where is your explanation on this?

terrajobst commented 7 years ago

I answered in the .NET Standard FAQ: https://github.com/dotnet/standard/blob/master/docs/faq.md#should-i-reference-the-meta-package-or-should-i-reference-individual-packages