Test classes with long names

karl.richardson's Avatar


16 Aug, 2017 01:44 PM

I have seen similar errors discussed before on other forums, but not exactly this and with no resolution.

I am using PostSharp 5.0.28. Some of my test classes have very long names. I can run the tests fine through Test Explorer, but if I try to use ctrl+r or right-click > run tests it fails to find any tests (test output says 'No tests found to run'). This does not happen if the test project does not reference PostSharp or if the test class has a shorter name. Is there a solution to this?

  1. Support Staff 1 Posted by PostSharp Techn... on 16 Aug, 2017 02:18 PM

    PostSharp Technologies's Avatar

    Hello Karl,

    could you please share with us a sample solution reproducing the issue including the path (or at least length of the path) where the solution is located on your machine?

    Sometimes such issues can be solved by reducing the total length of paths by moving the solution closer to the root directory or by shortening the folder names on in the path. But that's just a hint. Once you share the sample with us, we'll have a look at why exactly is this happening in your case.

    Best regards,

  2. 2 Posted by karl.richardson on 16 Aug, 2017 02:59 PM

    karl.richardson's Avatar

    I can say for certain it isn't due to the path length, as it is the class name length that causes the issue to occur and not the actual file name. Regardless I created a simple project and put it in the root of my D drive and still saw the error. I have attached a zip.

    Many thanks.

  3. Support Staff 3 Posted by PostSharp Techn... on 17 Aug, 2017 07:07 AM

    PostSharp Technologies's Avatar

    Thanks Karl for the repro. It looks like a Visual Studio bug. I've reported it. See https://developercommunity.visualstudio.com/content/problem/95374/t... for details.

    Best regards,

  4. Support Staff 4 Posted by PostSharp Techn... on 05 Sep, 2017 02:48 PM

    PostSharp Technologies's Avatar


    We are going to close this request as there have not been any further updates. Please feel free to reopen the discussion if you need more help.

    PostSharp Team

  5. PostSharp Technologies closed this discussion on 05 Sep, 2017 02:48 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