NETStandard 2.0 class library build error

dustin's Avatar


29 Jul, 2017 01:37 AM


I am evaluating postsharp for targeting NETStandard 2.0 projects, I am currently experiencing a build error after doing the following:

- installed the latest version of postsharp (5.0.30)
- created a NETStandard class library targeting 2.0
- added Postsharp.Patterns.Model nuget dependency
- added [NotifyPropertyChanged] attribute to empty class
- build

Error PS0125 An unexpected exception occurred when executing user code: System.TypeLoadException: Could not load type 'Enumerator' from assembly 'System.Collections, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at PostSharp.Patterns.Model.NotifyPropertyChanged.ChangeTracking.PropertyFieldBindingsMap.GenerateBindingsMap(Type type, Dictionary`2 methodFieldDependencies, ExplicitDependencyMap dependencyMap)
   at PostSharp.Patterns.Model.NotifyPropertyChangedAttribute.CompileTimeInitialize(Type type, AspectInfo aspectInfo)
   at PostSharp.Sdk.AspectWeaver.AspectWeavers.TypeLevelAspectWeaverInstance.^gAHJKdyo.^WnalpwzH()
   at PostSharp.Sdk.Utilities.ExceptionHelper.ExecuteUserCode(MessageLocation messageLocation, Action userCode, Type[] acceptableExceptions). Test

Postsharp Extension 5.0.30
Windows 10 pro
Visual Studio 2017 Preview 2

  1. Support Staff 1 Posted by PostSharp Techn... on 01 Aug, 2017 04:10 PM

    PostSharp Technologies's Avatar


    Thank you for reporting this error to us. The support for .NET Standard 2.0 is currently planned for PostSharp 5.1 and this early feedback is very important for us. We will get back to you once we learn more about the issue.

    (filed as internal issue #15320)


  2. Support Staff 2 Posted by PostSharp Techn... on 21 Aug, 2017 12:01 PM

    PostSharp Technologies's Avatar


    We're closing the ticket for now as the bug has been internally filed as issue #15320. We will contact you as soon as the bug fix has been released.

    For more details on our support policies and prioritization of bug fixes, please visit

    Thank you,
    PostSharp Team

  3. PostSharp Technologies closed this discussion on 21 Aug, 2017 12:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac