I am taking the plunge and am converting a (Profile 7) PCL to the new .NET Standard format. I mostly have everything working. (This is a great article -- but perhaps a little dated -- if you are interested).
My only remaining issue is that it doesn't appear that the .targets
file for one of my dependencies (PostSharp
) is executing during the build of my project. I have been looking all over to see how to include/execute a MSBuild .targets file.
The closest I could find is some sort of spec listing here: https://github.com/NuGet/Home/wiki/%5BSpec%5D-Managing-dependency-package-assets
However, that doesn't appear to be available when I break out my dependency node. The only available options are "build" and "default":
So, is it possible to include/execute an MSBuild .targets
file manually in a project.json
file?
OK this was due (as to most of my problems!) to poor understanding of the new paradigm as I learn it. It turns out you can reference .NET Standard libraries from a PCL that is running project.json. The trick is to NOT upgrade the PCL to .NET Standard, and simply update it to use project.json (and NuGet 3.0), using the same profile that was used pre-project.json.
From there you can reference any .NET Standard library and/or any traditional/legacy PCL from the new project.json-PCL. Kind of cool. :)