On any project using the new VS2017 csproj format (.NET Core, Standard, or Framework), unless PostSharp is a direct NuGet dependency, aspects are not weaved into the code.
For example, if I create a .NET Core project that depends on PubComp.Caching.AopCaching, which has a dependency on PostSharp, it will allow me to use aspects that are defined in the AopCaching NuGet. The project will compile, but the PostSharp aspects are not actually weaved into the code. The only way to make it work is to install PostSharp as a direct NuGet dependency.
I assume it has something to do with the order in which msbuild resolves NuGet dependencies for the new csproj and when the IL code weaving of PostSharp takes place.
Does anyone know exactly why it happens? Is there any solution other than remembering to always install PostSharp as well?