Skip to content

Using BenchmarkDotNet with Unity #759

@AndreasObel

Description

@AndreasObel

Hello!
I'm working with a semester project at my university where i would like to benchmark some of my code.

I have an issue with using BenchmarkDotNet with VS2017 code which i have created through Unity.
Ive been trying to find several guides and other stuff which did not help me. first of I've changed the Scripting Runtime Version to .NET 4.x Equivelant and the API Compatibility Level to .NET 4.x in Unity.

Next up i tried changing the Target Framework in Visual Studio to .NET Framework 4.6 since it would seem that is what i needed to do since that is what is said on the NuGet Website.
When i try to install the BenchmarkDotNet from the NuGet Manager in VS i get the error:

"Could not install package 'BenchmarkDotNet 0.10.14'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."

I've tried to install the BenchmarkDotNet.Core and BenchmarkDotNet.Toolchains.Roslyn without any problems to my knowledge.

This is about as far as I've gotten and i dont know what to do about it. Maybe I'm missing something obvious but I'm completely new to the .NET scene and i dont know what to do!

Have a nice day!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions