Adding nuget package in elements 10 causes error in build

net
visual-studio
oxygene

(Gert Hermans) #1

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.


Possibility to use msbuild instead of ebuild
(RemObjects) #2

Thanks, logged as bugs://81461


(marc hoffman) #3

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?


(Gert Hermans) #4

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


(Mark Currie) #5

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>

(marc hoffman) #6

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>

(RemObjects) #7

Thanks, logged as bugs://81466


(RemObjects) #8

bugs://81466 got closed with status fixed.


(RemObjects) #9

bugs://81461 got closed with status fixed.