BenchmarkDotNet: [Bug] FileNotFoundException On 0.9.4.
Fresh VS 2015u1 install + latest Resharper EAP (if important at all). No additional extensions/packages.
New Console App project, add BenchmarkDotNet nuget package, copy the code from getting started, run.
Fails with:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Не удается найти указанный файл.
File name: 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at BenchmarkDotNet.Toolchains.Classic.ClassicBuilder.Build(GenerateResult generateResult, ILogger logger, Benchmark benchmark)
at BenchmarkDotNet.Running.BenchmarkRunner.Build(ILogger logger, IToolchain toolchain, GenerateResult generateResult, Benchmark benchmark)
at BenchmarkDotNet.Running.BenchmarkRunner.Run(Benchmark benchmark, ILogger logger, IConfig config)
at BenchmarkDotNet.Running.BenchmarkRunner.Run(IList`1 benchmarks, ILogger logger, String title, IConfig config)
at BenchmarkDotNet.Running.BenchmarkRunner.Run(IList`1 benchmarks, IConfig config)
at BenchmarkDotNet.Running.BenchmarkRunner.Run[T](IConfig config)
at Bench.Test.Program.Main(String[] args) in c:\users\igors\documents\visual studio 2015\Projects\Bench.Test\Program.cs:line 19
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///c:/users/igors/documents/visual studio 2015/Projects/Bench.Test/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.Build.Utilities.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\users\igors\documents\visual studio 2015\Projects\Bench.Test\bin\Debug\Bench.Test.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 16 (15 by maintainers)
Commits related to this issue
- target NET46 to reference msbuild 14 that comes with VS 2015 to make BDN work on machines without VS 2013, fixes #132 — committed to dotnet/BenchmarkDotNet by adamsitnik 8 years ago
Hey @jgrandyxignite. I guess, you are trying to run benchmark from unit tests, is it correct? In this case, you have to disable “shadow copy”.
I understand 😉 I think that we should publish a new version of BenchmarkDotNet that has strict net46 target that references msbuild dlls from VS 2015. So then any net46+ project that either way must use VS 2015 and uses BDN should work.