0

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":

enter image description here

So, is it possible to include/execute an MSBuild .targets file manually in a project.json file?

Mike-E
  • 2,477
  • 3
  • 22
  • 34
  • [PostSharp roadmap](https://www.postsharp.net/support/roadmap) says that PostSharp 5.0, planned for Q4 2016, will support ASP.NET Core. Maybe wait until then? – svick Aug 01 '16 at 18:00
  • You are correct, @svick! And I had a fundamental misunderstanding as well with ".NET Standard" vs. "Project.json". Turns out I just wanted to upgrade my PCL to Nuget 3.0 (answered my question below). Thank you for your comment! – Mike-E Aug 01 '16 at 19:49

1 Answers1

0

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. :)

Mike-E
  • 2,477
  • 3
  • 22
  • 34