Adding nuget package in elements 10 causes error in build

Steps to reproduce the bug:

  1. open Visual studio
  2. Create new wpf project
  3. Right click on project in solution explorer and select ‘manage nuget packages’
  4. Browse for MahApps.Metro and install latest nuget package
  5. Build the project
    -> an error happens: Reference ‘MahApps.Metro’ could not be resolved for target ‘Echoes’ (Echoes .NET anycpu)
    This worked for 9,3. When I open and build the project created in 9.3 in elements 10 it does build.

-> I’ve found this issue when I was trying to create a dummy project that shows another bug in one of our projects here. In that project a StaticResource in xaml (from mahapps) could not be found.

Thanks, logged as bugs://81461

My apologies for the late reply. We’ll have a ,look ASAP. Does the same issue show when you build the project in Water, too? Just to be sure, can you send me the project, as is, that sows this for you?

NugetElements10.zip (6.2 MB)
Here’s the dummy project that has this issue. It is created in visual studio 2015 with elements 10.0.0.2345
Building this solution with elements also gives an error

I had a similar problem when I tried to reference MongoDB from NuGet. I opened the project file as text and supplied a hint path, that solved it for me.

<Reference Include="MongoDB.Driver" >
 <HintPath>..\packages\MongoDB.Driver.2.7.0\lib\net45\MongoDB.Driver.dll</HintPath>
</Reference>

It looks like the MahApps.Metro reference has no hint path, so the build can’t find it. adding that hint path should fix the issue.

This referent was added automatically, lousy, by VS? if so, that might be a bug; I’ll log that for the VS team, with the steps from your first post.

    <Reference Include="ControlzEx">
      <HintPath>..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="MahApps.Metro">
      <Private>True</Private>
    </Reference>

Thanks, logged as bugs://81466

bugs://81466 got closed with status fixed.

bugs://81461 got closed with status fixed.