I am using Stamp.Fody nuget package to stamp my .Net assembly. It has Fody as dependent nuget package. Jenkin is our continuous integration server. In order to build .Net solution MSBuild command line call is used.
Upon running the msbuild command line following error is appearing.
"C:\Source\Demo.sln" (default target) (1) -> "C:\Source\Demo.UI.csproj" (default target) (2) -> C:\Source\Demo.UI.csproj(185,5): error : This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Fody.1.25.0\build\Fody.targets.
When working with Visual Studio IDE, if either Fody or any other nuget packages are missing then the Visual Studio IDE's package manager itself restoring all the missed packages successfully.
Interestingly if I run MSBuild command line after removing NUnit, Prism and Fody nuget packages and clearing the Nuget package cache, other than Fody nuget package all other packages (NUnit and Prism) are successfully restored. But not Fody.
According to NuGet Package Restore does not fetch Build Target Assemblies (Tools) reference I understood there was a nuget download problem with all Fody nuget packages version prior to 1.13.0.0. Also as advised in that link I added Fody nuget package reference to all the projects in my solution and tried to build the solution but it is again complete build failure. (I have no previous versions installed so no need to remove anything from Tools/Fody folder - as mentioned in the readme.txt)
I have checked all other following known possible cases and end up with no success.
- TFS Build doesn't download missing NuGet packages
- Nuget - Don't see allow nuget to download missing packages during build
- NuGet Package Restore Not Working
I don't know what I am missing here. Could anyone help me on this please?