-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stryker fails with "Internal error due to compile error" when we reference a NuGet called MimeTypes #2930
Comments
Thanks for your precise reporting. I reproduce the issue. I have yet to analyze what is the root cause, but MimeTypes is NOT listed as a reference by BuildAlyzer, and that is what Stryker uses. |
Thanks for looking into this and that you could reproduce it.
Interesting, think that's the first time I even heard about that type of packaging. |
Thanks. I have been able to work around the issue, but this is still kludgy. It still needs tests and refinment |
This turns to be harder than expected: the problem is that BuildAlyzer exhibits two problems:
I have devised a work around for problem (1), but dealing with (2) requires a redesign of the project analysis logic so it can be done in two phases. In short, It requires time. I am currently working on a redesign of the project analysis logic, so I will incorporate needed changes there, but there are still several weeks of work before it being done. In the short time, a possible workaround is to reuse the MimeType.cs file directly in your project (as describled in the project readme). |
I remember seeing this kind of nuget package before. Is this kind of package similar to #2345? I think the conclusion there was that this works correctly on windows for some reason, perhaps we like learn something from that.
Are you talking about buildalyzer executing a clean during project analysis? In that case multiple attempts have been made to do that, none successful. The maintainers of buildalyzer state that without a clean there's a good chance analysis fails. |
It looks like a similar package, but I did not check it for confirmation?
It does not work correctly on windows, at least, not any longer, as I did reproduce on first trial.
I did test removing What I have been able to achieve is:
But I did by manually restoring files after analysis: at first, I thought this a configuration/version issue, because folder structure was still here. |
Describe the bug
I'm currently attempting to run Stryker in one of our legacy solutions that utilizes a NuGet package called MimeTypes. However, for some reason, Stryker is unable to compile it and throws compilation errors such as the following:
The name 'MimeTypes' does not exist in the current context (Source code: MimeTypes)
To verify this issue, I created a fresh project, referenced
MimeTypes
, and added a sample class that primarily utilizes MimeTypes, like this:I can build it just fine from visual studio but If I run Stryker against the solution that only contains this class (and a simple unit test that calls this class), I get the following error in my logs:
So maybe someone with more knowledge about Stryker can tell me why this NuGet package creates issues, if there is a workaround, or if it's something that needs to be fixed in Stryker to handle?
Expected behavior
It should compile the project just fine.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: