License error using Benchmark.NET + DevArt dotConnect for PostgreSQL
up vote
0
down vote
favorite
I'm working on an application consisting of several projects and using EntityFramework with dotConnect to run against PostgreSQL. I also have a license for dotConnect which successfully works in the main application.
In parallel, I'm crafting a console application(a different solution) using Benchmark.Net to measure the performance of the logic of one of the projects. But every time I run the benchmark I'm getting the error below:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> Devart.Data.PostgreSql.PgSqlException: Assembly that contains embedded dotConnect for PostgreSQL license cannot be used with this application: 0f238e83-669a-46b8-876f-40331880ee79.exe.exe.
Following this instruction, I have already generated licenses.licx
through Visual Studio and <exe file>.licenses
via lc.exe
. But it is still producing the same error.
I'm suspecting that the fact that Benchmark.NET generates its own exe to run the benchmark causing this error but I'm not 100% sure. So I'm looking for a solution if anybody has one?
Thank you
c# .net dotconnect benchmarkdotnet
add a comment |
up vote
0
down vote
favorite
I'm working on an application consisting of several projects and using EntityFramework with dotConnect to run against PostgreSQL. I also have a license for dotConnect which successfully works in the main application.
In parallel, I'm crafting a console application(a different solution) using Benchmark.Net to measure the performance of the logic of one of the projects. But every time I run the benchmark I'm getting the error below:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> Devart.Data.PostgreSql.PgSqlException: Assembly that contains embedded dotConnect for PostgreSQL license cannot be used with this application: 0f238e83-669a-46b8-876f-40331880ee79.exe.exe.
Following this instruction, I have already generated licenses.licx
through Visual Studio and <exe file>.licenses
via lc.exe
. But it is still producing the same error.
I'm suspecting that the fact that Benchmark.NET generates its own exe to run the benchmark causing this error but I'm not 100% sure. So I'm looking for a solution if anybody has one?
Thank you
c# .net dotconnect benchmarkdotnet
@dymanoid, how to do this? Could you, please, point me to the documentation of Benchmark.NET or any sample?
– Dmitry Senin
Nov 13 at 13:05
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm working on an application consisting of several projects and using EntityFramework with dotConnect to run against PostgreSQL. I also have a license for dotConnect which successfully works in the main application.
In parallel, I'm crafting a console application(a different solution) using Benchmark.Net to measure the performance of the logic of one of the projects. But every time I run the benchmark I'm getting the error below:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> Devart.Data.PostgreSql.PgSqlException: Assembly that contains embedded dotConnect for PostgreSQL license cannot be used with this application: 0f238e83-669a-46b8-876f-40331880ee79.exe.exe.
Following this instruction, I have already generated licenses.licx
through Visual Studio and <exe file>.licenses
via lc.exe
. But it is still producing the same error.
I'm suspecting that the fact that Benchmark.NET generates its own exe to run the benchmark causing this error but I'm not 100% sure. So I'm looking for a solution if anybody has one?
Thank you
c# .net dotconnect benchmarkdotnet
I'm working on an application consisting of several projects and using EntityFramework with dotConnect to run against PostgreSQL. I also have a license for dotConnect which successfully works in the main application.
In parallel, I'm crafting a console application(a different solution) using Benchmark.Net to measure the performance of the logic of one of the projects. But every time I run the benchmark I'm getting the error below:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> Devart.Data.PostgreSql.PgSqlException: Assembly that contains embedded dotConnect for PostgreSQL license cannot be used with this application: 0f238e83-669a-46b8-876f-40331880ee79.exe.exe.
Following this instruction, I have already generated licenses.licx
through Visual Studio and <exe file>.licenses
via lc.exe
. But it is still producing the same error.
I'm suspecting that the fact that Benchmark.NET generates its own exe to run the benchmark causing this error but I'm not 100% sure. So I'm looking for a solution if anybody has one?
Thank you
c# .net dotconnect benchmarkdotnet
c# .net dotconnect benchmarkdotnet
asked Nov 13 at 9:43
Dmitry Senin
32
32
@dymanoid, how to do this? Could you, please, point me to the documentation of Benchmark.NET or any sample?
– Dmitry Senin
Nov 13 at 13:05
add a comment |
@dymanoid, how to do this? Could you, please, point me to the documentation of Benchmark.NET or any sample?
– Dmitry Senin
Nov 13 at 13:05
@dymanoid, how to do this? Could you, please, point me to the documentation of Benchmark.NET or any sample?
– Dmitry Senin
Nov 13 at 13:05
@dymanoid, how to do this? Could you, please, point me to the documentation of Benchmark.NET or any sample?
– Dmitry Senin
Nov 13 at 13:05
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I'm not sure it's a good idea to create a benchmark for code that does database calls etc. You're benchmarking not the code then, but your whole system instead: the file system, the database drivers, possible interop stuff, and so on.
This is not the idea of BenchmarkDotNet. It's actually created for benchmarking of relatively small CPU-bound tasks to find bottlenecks and perform optimizations based on measurements.
However, if you still want to do that, a solution might be to run the benchmark in-process of the console app you've created, without producing special benchmarking assemblies.
To do so, use the [InProcess]
attribute. Just apply it to your benchmark class instead of usual job attributes:
[InProcess]
public class TypeWithBenchmarks
{
[Benchmark]
public void BenchmarkedMethod()
{
}
}
That worked. Thank you a lot. As for the benchmark itself, well, despite the fact that I agree that BenchmarkDotNet is designed for micro-benchmarking, I have to highlight that the logic I'm testing is quite lightweight and I have already found a performance problem in it using BenchmarkDotNet. So I think so far it meets all my needs
– Dmitry Senin
Nov 13 at 16:59
After applying the fix I gotUnhandled Exception: System.InvalidOperationException: List of measurements contains no elements
. It is a BDN bug which seems to be fixed in 0.11.2.849. To install this nightly build, follow the instructions: benchmarkdotnet.org/articles/guides/nuget.html#nightly
– Dmitry Senin
Nov 13 at 19:25
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I'm not sure it's a good idea to create a benchmark for code that does database calls etc. You're benchmarking not the code then, but your whole system instead: the file system, the database drivers, possible interop stuff, and so on.
This is not the idea of BenchmarkDotNet. It's actually created for benchmarking of relatively small CPU-bound tasks to find bottlenecks and perform optimizations based on measurements.
However, if you still want to do that, a solution might be to run the benchmark in-process of the console app you've created, without producing special benchmarking assemblies.
To do so, use the [InProcess]
attribute. Just apply it to your benchmark class instead of usual job attributes:
[InProcess]
public class TypeWithBenchmarks
{
[Benchmark]
public void BenchmarkedMethod()
{
}
}
That worked. Thank you a lot. As for the benchmark itself, well, despite the fact that I agree that BenchmarkDotNet is designed for micro-benchmarking, I have to highlight that the logic I'm testing is quite lightweight and I have already found a performance problem in it using BenchmarkDotNet. So I think so far it meets all my needs
– Dmitry Senin
Nov 13 at 16:59
After applying the fix I gotUnhandled Exception: System.InvalidOperationException: List of measurements contains no elements
. It is a BDN bug which seems to be fixed in 0.11.2.849. To install this nightly build, follow the instructions: benchmarkdotnet.org/articles/guides/nuget.html#nightly
– Dmitry Senin
Nov 13 at 19:25
add a comment |
up vote
1
down vote
accepted
I'm not sure it's a good idea to create a benchmark for code that does database calls etc. You're benchmarking not the code then, but your whole system instead: the file system, the database drivers, possible interop stuff, and so on.
This is not the idea of BenchmarkDotNet. It's actually created for benchmarking of relatively small CPU-bound tasks to find bottlenecks and perform optimizations based on measurements.
However, if you still want to do that, a solution might be to run the benchmark in-process of the console app you've created, without producing special benchmarking assemblies.
To do so, use the [InProcess]
attribute. Just apply it to your benchmark class instead of usual job attributes:
[InProcess]
public class TypeWithBenchmarks
{
[Benchmark]
public void BenchmarkedMethod()
{
}
}
That worked. Thank you a lot. As for the benchmark itself, well, despite the fact that I agree that BenchmarkDotNet is designed for micro-benchmarking, I have to highlight that the logic I'm testing is quite lightweight and I have already found a performance problem in it using BenchmarkDotNet. So I think so far it meets all my needs
– Dmitry Senin
Nov 13 at 16:59
After applying the fix I gotUnhandled Exception: System.InvalidOperationException: List of measurements contains no elements
. It is a BDN bug which seems to be fixed in 0.11.2.849. To install this nightly build, follow the instructions: benchmarkdotnet.org/articles/guides/nuget.html#nightly
– Dmitry Senin
Nov 13 at 19:25
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I'm not sure it's a good idea to create a benchmark for code that does database calls etc. You're benchmarking not the code then, but your whole system instead: the file system, the database drivers, possible interop stuff, and so on.
This is not the idea of BenchmarkDotNet. It's actually created for benchmarking of relatively small CPU-bound tasks to find bottlenecks and perform optimizations based on measurements.
However, if you still want to do that, a solution might be to run the benchmark in-process of the console app you've created, without producing special benchmarking assemblies.
To do so, use the [InProcess]
attribute. Just apply it to your benchmark class instead of usual job attributes:
[InProcess]
public class TypeWithBenchmarks
{
[Benchmark]
public void BenchmarkedMethod()
{
}
}
I'm not sure it's a good idea to create a benchmark for code that does database calls etc. You're benchmarking not the code then, but your whole system instead: the file system, the database drivers, possible interop stuff, and so on.
This is not the idea of BenchmarkDotNet. It's actually created for benchmarking of relatively small CPU-bound tasks to find bottlenecks and perform optimizations based on measurements.
However, if you still want to do that, a solution might be to run the benchmark in-process of the console app you've created, without producing special benchmarking assemblies.
To do so, use the [InProcess]
attribute. Just apply it to your benchmark class instead of usual job attributes:
[InProcess]
public class TypeWithBenchmarks
{
[Benchmark]
public void BenchmarkedMethod()
{
}
}
answered Nov 13 at 14:27
dymanoid
7,91821947
7,91821947
That worked. Thank you a lot. As for the benchmark itself, well, despite the fact that I agree that BenchmarkDotNet is designed for micro-benchmarking, I have to highlight that the logic I'm testing is quite lightweight and I have already found a performance problem in it using BenchmarkDotNet. So I think so far it meets all my needs
– Dmitry Senin
Nov 13 at 16:59
After applying the fix I gotUnhandled Exception: System.InvalidOperationException: List of measurements contains no elements
. It is a BDN bug which seems to be fixed in 0.11.2.849. To install this nightly build, follow the instructions: benchmarkdotnet.org/articles/guides/nuget.html#nightly
– Dmitry Senin
Nov 13 at 19:25
add a comment |
That worked. Thank you a lot. As for the benchmark itself, well, despite the fact that I agree that BenchmarkDotNet is designed for micro-benchmarking, I have to highlight that the logic I'm testing is quite lightweight and I have already found a performance problem in it using BenchmarkDotNet. So I think so far it meets all my needs
– Dmitry Senin
Nov 13 at 16:59
After applying the fix I gotUnhandled Exception: System.InvalidOperationException: List of measurements contains no elements
. It is a BDN bug which seems to be fixed in 0.11.2.849. To install this nightly build, follow the instructions: benchmarkdotnet.org/articles/guides/nuget.html#nightly
– Dmitry Senin
Nov 13 at 19:25
That worked. Thank you a lot. As for the benchmark itself, well, despite the fact that I agree that BenchmarkDotNet is designed for micro-benchmarking, I have to highlight that the logic I'm testing is quite lightweight and I have already found a performance problem in it using BenchmarkDotNet. So I think so far it meets all my needs
– Dmitry Senin
Nov 13 at 16:59
That worked. Thank you a lot. As for the benchmark itself, well, despite the fact that I agree that BenchmarkDotNet is designed for micro-benchmarking, I have to highlight that the logic I'm testing is quite lightweight and I have already found a performance problem in it using BenchmarkDotNet. So I think so far it meets all my needs
– Dmitry Senin
Nov 13 at 16:59
After applying the fix I got
Unhandled Exception: System.InvalidOperationException: List of measurements contains no elements
. It is a BDN bug which seems to be fixed in 0.11.2.849. To install this nightly build, follow the instructions: benchmarkdotnet.org/articles/guides/nuget.html#nightly– Dmitry Senin
Nov 13 at 19:25
After applying the fix I got
Unhandled Exception: System.InvalidOperationException: List of measurements contains no elements
. It is a BDN bug which seems to be fixed in 0.11.2.849. To install this nightly build, follow the instructions: benchmarkdotnet.org/articles/guides/nuget.html#nightly– Dmitry Senin
Nov 13 at 19:25
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53278063%2flicense-error-using-benchmark-net-devart-dotconnect-for-postgresql%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@dymanoid, how to do this? Could you, please, point me to the documentation of Benchmark.NET or any sample?
– Dmitry Senin
Nov 13 at 13:05