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
Generated code fails to build #42
Comments
@thomaslevesque, can you share a repro for the issue? |
I think this is because LINQPad's UserQuery class is not in a namespace, but the template expects a namespace. |
@AndreyAkinshin, just try to create any benchmark in LINQPad. Given the cause of the issue, I'm pretty sure it can be reproduced every time. |
OK, I just tried to fix the code to handle this case, but there's another issue. BenchmarkDotNet seems to assume that all required assemblies are in the working directory, but it's not necessarily the case. In fact, it's definitely not the case when running a LinqPad query. |
@thomaslevesque, ok, thanks for the investigation, I will try to fix it. |
@thomaslevesque I'm just taking a look at this, sorry for the delay. Just to make sure I'm testing in the same way as you, in LINQPad I assume you have your Benchmark setup something like this (sorry, I'm no LINQPad expert, so I don't know if this is the natural way to do it or not)? |
Either way, I see the same problem, here's my output:
|
Yes (assuming you also have a Main method that's not visible in your screenshot) The namespace issue is easy to fix. To fix the missing assembly issue, I think the referenced assemblies will have to be copied. |
I just checked in a fix that does exactly this, when you get a chance can you try it out? |
Sure, I'll do this ASAP. Is there a pre-release NuGet package available with the fix, or do I have to build it from source? |
@thomaslevesque, for now you should build it from source (VisualStudio 2015 is required). |
It works fine now 👍 |
@thomaslevesque, cool! I will update the NuGet package on the weekend. |
@thomaslevesque thanks for confirming the fix |
I tried to run a small benchmark from LINQPad, and the generated code fails to compile:
This is caused by the empty
using
clause on line 7The text was updated successfully, but these errors were encountered: