This project is read-only.


Case issues with Linux + xbuild (Mono)


Steps to reproduce:
  1. Create new solution with new project in it
  2. add some dependency, i.e: via PM> Install-Package Nancy
  3. Project->Enable Nuget Package Restore [1]
  4. Commit your solution somewhere.
  5. Check out solution in a Linux machine with Mono 3.0.
  6. Build it with xbuild.
Expected results:
Should work.

Current results:
XBuild generates some warnings about not finding some nuget things [1]
The above warnings are "ignored", then when really trying to build the solution, it doesn't find the libraries (references) of the nuget packages installed.

[1] This step modifies the project in this way:
  • Adds a ".nuget" folder.
  • Adds 4 files inside the .nuget folder: NuGet.Config, NuGet.exe, NuGet.targets, packages.config
[2] One of the warnings is:

WebApplication1.csproj: warning : Could not find project file //.nuget/nuget.targets, to import. Ignoring.

Pull request coming.
Closed Apr 12, 2013 at 8:28 AM by JeffHandley


knocte wrote Nov 29, 2012 at 2:49 PM

In [1], forgot to add:
  • It adds <Import Project="$(SolutionDir).nuget\nuget.targets" /> into the .csproj file.

knocte wrote Nov 29, 2012 at 2:57 PM

First problem should fixed by

But after this, you get:

/WebApplication1/.nuget/NuGet.targets: error : Unable to locate '/home/andres1210/Code/banshee-server/WebApplication1/.nuget/nuget.exe'

And this problem should be fixed in:

JeffHandley wrote Nov 29, 2012 at 10:28 PM

@dotnetjunky - it looks like we have a pull request for this issue.

Thanks, @knocte!!

dotnetjunky wrote Dec 2, 2012 at 12:39 AM

Pull request accepted. Mark this bug as fixed.

deepakverma wrote Apr 11, 2013 at 7:25 PM

** Closed by deepakverma 04/11/2013 11:25AM

theonlylawislove wrote Jan 24, 2014 at 6:38 PM

I am having similar problems, but with with case sensitivity, but with an import path change. I had to manually change it to support sharing csproj files between projects.

<Import Project="...nuget\NuGet.targets" Condition="Exists('...nuget\NuGet.targets')" />