Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When using a project with a project.json file that references a NuGet package with its own custom MSBuild .targets file the generated .nuget.targets files are not used at compile time.
Mono 4.9.0 version 4.9.0 (master/8d1a651 Mon Oct 10 14:11:22 EDT 2016)
1) Git clone the following repo:
2) Open the solution in Xamarin Studio 6.1 and right click the Packages folder and click Restore
This generates the TestMSBuildNuGetImports.nuget.props and TestMSBuildNuGetImports.nuget.targets files. Running nuget restore from the command line does not do this (presumably because it is using NuGet v2)
3) From the command line run msbuild TestMSBuildNuGetImports.sln
A bin/debug/Test.1.2.3.nupkg is created.
No such file is created. It looks like the *.nuget.props and *.nuget.targets files are not imported by MSBuild. Possibly the NuGet.targets file is missing in Mono 4.9.0.
This PR should fix it : https://github.com/xamarin/bockbuild/pull/25
project.json is being replaced with PackageReferences in .NET Core style projects so there is no plan to fix this. The recommendation is to not use project.json files and stay with packages.config files or switch to a .NET Core MSBuild based project instead.
This seems to be fixed with Mono 4.8.0 (mono-4.8.0-branch/e4a3cf3 Fri Feb 17 15:57:45 EST 2017) for both xbuild and MSBuild.
*** Bug 52574 has been marked as a duplicate of this bug. ***
OK this works with a desktop .NET Framework project but not with Xamarin.iOS when using MSBuild. It does work with Xamarin.iOS if xbuild is used.
Marking this as not on roadmap. The NuGet.props/.targets files do not seem to be imported when building