Skip to content
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

Brand new machine with VS 2015 only b0rks #137

Closed
ogreenz opened this issue Apr 4, 2016 · 14 comments
Closed

Brand new machine with VS 2015 only b0rks #137

ogreenz opened this issue Apr 4, 2016 · 14 comments
Labels
Milestone

Comments

@ogreenz
Copy link

ogreenz commented Apr 4, 2016

When running BDN 0.9.4 on a brand new machine with VS 2015 only installed I get this beatiful thing:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   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 LogRenderer.HCRenderer.Main(String[] args) in C:\dev\Snippets\HCLog\HCLog\LogRenderer\HCRenderer.cs:line 129

Looks like there is no support for Microsoft.Build.Framework v14.0 (which is the only thing I have installed in the GAC)...

@adamsitnik
Copy link
Member

Thanks for reporting the bug. It is already fixed #132, but not yet released (will be part of 0.9.5 version). If you do not want to wait for the release please Install msbuild 12

@adamsitnik adamsitnik self-assigned this Apr 4, 2016
@adamsitnik adamsitnik added this to the v0.9.5 milestone Apr 4, 2016
@adamsitnik
Copy link
Member

I was not 100% right. In #132 the user was getting FileNotFoundException, but you got FileLoadException which has not been handled yet. I added the right handler. Thanks once again and sorry for inconvinience!

@niemyjski
Copy link

+1

@niemyjski
Copy link

I'm getting the following now this morning when I reverted to 0.9.3


// *** Build ***
   Exceptionless.Tests.Plugins.PluginTests.RunBenchmark [FAIL]
      System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.\r\n---- System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
      Stack Trace:
            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)
         Source\Tests\Plugins\PluginTests.cs(636,0): at Exceptionless.Tests.Plugins.PluginTests.RunBenchmark()
         ----- Inner Stack Trace -----

File: 6303744
File: 6405318
File: 3151872

https://ci.appveyor.com/project/Exceptionless/exceptionless-net

@niemyjski
Copy link

Is it possible to generate a vs12 solution instead of a vs14?

@niemyjski
Copy link

We are using VS12 build image

@adamsitnik
Copy link
Member

Hi @niemyjski The bug is already fixed, but it's waiting for the Release (probably end of the next week). For .NET 4.5 target we are going to reference MSBuild 12 dlls, for .NET 4.6 MSBuild 14 dlls. We will also have a fallback mechanism in case when dll are not found we will just execute bash script that will do simple call to msbuild

@damageboy
Copy link
Contributor

As far as I can tell this should have been part of 0.9.5 but this still happens to me on a brand new machine with 0.9.5

@adamsitnik
Copy link
Member

@damageboy which .NET framework is your benchmark project targeting? It should be .NET 4.6 or higher

@niemyjski
Copy link

I'm targeting 4.5 on a machine that only has. Vs2015 installed and I get tons of errors with the latest version

@adamsitnik
Copy link
Member

BenchmarkDotNet for .NET 4.5 references MSBuild12 (VS 2013), for .NET 4.6 MSBuild 14 (VS 2015).

Could you please try removing BDN form your benchmark project, upgrade it to .NET 4.6 and install BDN 0.95 ?

@niemyjski
Copy link

Negative, we reference 4.5 explicitly because there are issues with using
the .net 4.6 compiler / toolchain when targeting pcl projects. As such
everything that runs as part of this build cannot be any higher than 4.5

Thanks
-Blake Niemyjski

On Tue, May 3, 2016 at 11:10 AM, Adam Sitnik notifications@github.com
wrote:

BenchmarkDotNet for .NET 4.5 references MSBuild12 (VS 2013), for .NET 4.6
MSBuild 14 (VS 2015).

Could you please try removing BDN form your benchmark project, upgrade it
to .NET 4.6 and install BDN 0.95 ?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#137 (comment)

@colgreen
Copy link

FYI I just just got this exact error with Visual Studio 2015, targetting .NET 4.5.1 and referencing the latest nuget (0.9.5). We're currently referencing 4.5.1 for the time being.

@adamsitnik
Copy link
Member

@colgreen could you give it a try with 0.9.6? It has been released an hour ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants