PostSharp 5.0.29: crashes on compile when source includes a generic type whose type parameter is a ValueTuple

avatar's Avatar

avatar

28 Jul, 2017 04:46 PM

Error message:

    Error PS0125: An unexpected exception occurred when executing user code: PostSharp.Sdk.CodeModel.BindingException: Cannot find declaration System.Collections.Generic.List`1[System.ValueTuple`2[System.String,System.Type]] test.
   at ^0pvyajNmgrdW.GetSemanticInfo(MemberInfo _0)
   at PostSharp.Reflection.ReflectionHelper.GetSemanticInfo(MemberInfo member)
   at PostSharp.Patterns.Model.AggregatableAttribute.CompileTimeValidate(Type type)
   at PostSharp.Aspects.TypeLevelAspect.CompileTimeValidate(Object target)
   at PostSharp.Sdk.AspectWeaver.AspectWeaverInstance.^pCdttYEs.^Q7McNsOl()
   at PostSharp.Sdk.Utilities.ExceptionHelper.ExecuteUserCode[T](MessageLocation messageLocation, Func`1 userCode, Type[] acceptableExceptions). (1, 1)

Reproduction solution included. (I hope this has an easy/quick fix; I use this idiom a lot!)

Regards,

Alistair

  1. Support Staff 1 Posted by PostSharp Techn... on 31 Jul, 2017 10:44 PM

    PostSharp Technologies's Avatar

    Hello,

    Thank you for reporting this issue. So far the reproduction project has built successfully on our machine (tried in VS 15.0.26228.09).
    Could you please also share the exact Visual Studio version you're using for build?

    -alex

  2. 2 Posted by avatar on 01 Aug, 2017 05:07 AM

    avatar's Avatar

    I'm using Visual Studio Enterprise 5.2 (26430.16).

    (I can also confirm that the same error occurs when using PostSharp 5.0.30.)

    • Alistair
  3. Support Staff 3 Posted by PostSharp Techn... on 02 Aug, 2017 09:55 PM

    PostSharp Technologies's Avatar

    Hello,

    The reproduction project still builds successfully with Visual Studio 15.2 (26430.16) in our environment.

    Could you please try to rebuild the project with diagnostic MSBuild log output enabled (/v:diag on command-line)? Also set PostSharpTrace MSBuild property to ReflectionBinding. You can attach the detailed log output to this discussion.

    -alex

  4. 4 Posted by avatar on 03 Aug, 2017 06:25 PM

    avatar's Avatar

    Sure, can do. Log attached below.

    • Alistair
  5. Support Staff 5 Posted by PostSharp Techn... on 04 Aug, 2017 12:14 PM

    PostSharp Technologies's Avatar

    Hello,

    In the build log we have noticed one important difference between your environment and ours. You have .NET Framework 4.7.1 installed and we have 4.7. We didn't find any information about 4.7.1 yet, if you know how to download and install this version then please let us know.

    We would also like to ask you to build the project on a machine with .NET 4.7 installed, if possible. You can see the list of .NET versions installed under this registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs. Please also export this key on your machine and upload here for us to review.

    -alex

  6. 6 Posted by avatar on 04 Aug, 2017 02:08 PM

    avatar's Avatar

    Aha!

    I wasn't aware of this myself until went digging for it, but it seems that .NET Framework 4.7.1 ships with the current Insider Program builds of Windows 10. (I'm using the current slow ring build, 16251.)

    I've exported the key, and attached it. I'll build the project on a non-Insider build (Creator's Update; 15063) with 4.7 as soon as I can get a machine set up with it, but figured I should get you this information up front.

    • Alistair
  7. 7 Posted by avatar on 06 Aug, 2017 09:37 PM

    avatar's Avatar

    Having now built a clean machine on build 15603 with .NET Framework 4.7, I can confirm that the project builds fine on that.

    • Alistair
  8. Support Staff 8 Posted by PostSharp Techn... on 07 Aug, 2017 01:25 PM

    PostSharp Technologies's Avatar

    Hello,

    Thank you for the update. Your early feedback about .NET 4.7.1 is valuable for us. We have filed a corresponding issue (#15337) and we'll get back to you once we've made a progress. However it's possible that the fix won't be available until after .NET 4.7.1 is RTM.

    -alex

  9. 9 Posted by avatar on 07 Aug, 2017 03:10 PM

    avatar's Avatar

    No problem - now I know what the problem is, I can build on 4.7 for now.

    Thanks muchly for the help,

    • Alistair
  10. Support Staff 10 Posted by PostSharp Techn... on 21 Aug, 2017 12:10 PM

    PostSharp Technologies's Avatar

    Hello,

    We're closing the ticket for now as the bug has been internally filed as issue #15337. 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 https://www.postsharp.net/support/policies

    PostSharp Team

  11. PostSharp Technologies closed this discussion on 21 Aug, 2017 12:10 PM.

  12. PostSharp Technologies re-opened this discussion on 20 Nov, 2017 09:51 AM

  13. Support Staff 11 Posted by PostSharp Techn... on 20 Nov, 2017 09:51 AM

    PostSharp Technologies's Avatar

    Hello,

    we released a bug fix for this issue in PostSharp 5.0.38.

    I'm going to close this ticket now, but feel free to reopen it if you need a further assistance.

    Best regards
    -jakub

  14. PostSharp Technologies closed this discussion on 20 Nov, 2017 09:51 AM.

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

Keyboard shortcuts

Generic

? 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