tags:

views:

150

answers:

2

I am working on a unit testing project. This project has roughly 2600 test classes with an average of 15 unit tests per class. I'm not sure how many more classes I need to add to this project to recreate the error mentioned below, but I do know that adding a large amount (I tried 500) of files to the project is directly related to it. If I remove some files, I am able to build.

Compilation errors

unknown_location error PS0034: PostSharp: ILASM exited with return code 255. Tool output:

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

What is causing this to happen?

Edit: It might be important to note that that the test project does not use the custom PostSharp attribute directly. In other words, in none of the test classes do I have a using directive for a PostSharp dll. They are, however, used in the classes that the tests are testing.

+1  A: 

It's probably not the number of classes, per se, but something unusual that you're doing in these classes. That said, 2600 classes is certainly a large number, so it may be possible that this is an issue. I'd report this to the PostSharp folks -- it's going to be impossible for StackOverflow to diagnose the problem here without access to your code.

To submit an issue, visit the PostSharp bug tracker here.

John Feminella
+1  A: 

Generally, to debug ILASM errors, I need at least to see the ILASM output. It must have printed some better error message. If you don't see it, try to build from the command line using MSBuild. The error message should help you to understand what the cause could be and to create a repro case, then submit it to our issue tracker.

If you say that your project does not have aspects (even indirectly), you may simply skyp PostSharp for that project by including the compilation symbol "SkipPostSharp".

-gael

Gael Fraiteur
We will split the unit testing project up to be functionality-specific and then use the compilation symbol for the project which does not need it. Thanks for the answer.
Corpsekicker