I am using Bamboo and MSBuild and enabled restore packages.
When I run it it does not restore all pacakges when I see logs it restore some pacakges but does not all projects pacakges in solution... is there anything I need to fix in MS Build script?
Full Error Log: http://justpaste.it/oq2p
Error Log:
02-Nov-2015 10:08:55 Infrastructure\InMemoryMultipartStreamProvider.cs(14,52): error CS0246: The type or namespace name 'MultipartStreamProvider' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj]
02-Nov-2015 10:08:55 Infrastructure\InMemoryMultipartStreamProvider.cs(30,32): error CS0115: 'InMemoryMultipartStreamProvider.GetStream(HttpContent, HttpContentHeaders)': no suitable method found to override [C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj]
02-Nov-2015 10:08:55 Infrastructure\InMemoryMultipartStreamProvider.cs(41,36): error CS0115: 'InMemoryMultipartStreamProvider.ExecutePostProcessingAsync()': no suitable method found to override [C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj]
02-Nov-2015 10:08:55 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:55 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\API.SmartDesk360.com\SmartDesk360.API.csproj" (2) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) on node 1 (default targets).
02-Nov-2015 10:08:55 RestorePackages:
02-Nov-2015 10:08:55 "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\.nuget\NuGet.exe" install "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\ "
02-Nov-2015 10:08:55 Restoring NuGet packages...
02-Nov-2015 10:08:55 To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
02-Nov-2015 10:08:55 All packages listed in packages.config are already installed.
02-Nov-2015 10:08:55 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.DataLayer\SmartDesk360.DataLayer.csproj" (7) on node 1 (default targets).
02-Nov-2015 10:08:55 RestorePackages:
02-Nov-2015 10:08:55 "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\.nuget\NuGet.exe" install "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.DataLayer\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\ "
02-Nov-2015 10:08:55 Restoring NuGet packages...
02-Nov-2015 10:08:55 To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
02-Nov-2015 10:08:55 All packages listed in packages.config are already installed.
02-Nov-2015 10:08:55 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.DataLayer\SmartDesk360.DataLayer.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:55 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.FileManager\SmartDesk360.FileManager.csproj" (8) on node 1 (default targets).
02-Nov-2015 10:08:55 RestorePackages:
02-Nov-2015 10:08:55 "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\.nuget\NuGet.exe" install "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.FileManager\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\ "
02-Nov-2015 10:08:56 Restoring NuGet packages...
02-Nov-2015 10:08:56 To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
02-Nov-2015 10:08:56 All packages listed in packages.config are already installed.
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.FileManager\SmartDesk360.FileManager.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:56 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Mailer\SmartDesk360.Mailer.csproj" (9) on node 1 (default targets).
02-Nov-2015 10:08:56 GenerateTargetFrameworkMonikerAttribute:
02-Nov-2015 10:08:56 Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
02-Nov-2015 10:08:56 CoreCompile:
02-Nov-2015 10:08:56 Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
02-Nov-2015 10:08:56 CopyFilesToOutputDirectory:
02-Nov-2015 10:08:56 SmartDesk360.Mailer -> C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Mailer\bin\Debug\SmartDesk360.Mailer.dll
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Mailer\SmartDesk360.Mailer.csproj" (default targets).
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\API.SmartDesk360.com\SmartDesk360.API.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:56 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\API.SmartDesk360.com.sln" (1) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\Tests.SmartDesk360.com\Tests.SmartDesk360.com.csproj" (10) on node 1 (default targets).
So if your repositories.config file contains something like this:
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path=".\MyCsProj\packages.config" />
</repositories>
And your MyCsProj\packages.config file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SuperCoolPackage" version="4.3.2.1" targetFramework="net452" />
</packages>
Nuget is going to look for a directory like:
.\packages\SuperCoolPackage.4.3.2.1\
Regardless of whether or not there are the actual binaries in the ".\packages\SuperCoolPackage.4.3.2.1\" directory, Nuget ~thinks~/assumes they are there by the name of the folder.
So sometimes, while the folder ".\packages\SuperCoolPackage.4.3.2.1\" exists, it may not have any child-files that are the actual binaries you need.
You need to re-read the latest suggestions for storing files in source control.
https://docs.nuget.org/consume/package-restore
To promote a cleaner developer environment while also reducing repository size, NuGet offers a Package Restore feature that will install all referenced packages before a project is built, thereby ensuring that all dependencies are available to a project without requiring them to be stored in source control.
So here's what you want in source control.
.\packages\repositories.config
and NO subfolders under this ".\packages\"
Then you will run
nuget.exe restore MySolution.sln during the build process.
Because there are NO subfolders under this ".\packages\", it will download them. (and cache them locally so only the first time is really painful)
The biggest tripping point (IMHO) is having
.\packages\SuperCoolPackage.4.3.2.1\
in source control. I recommend NOT having any of these subfolders in source control, as per the nuget url I mention above.
If you have .\packages\SuperCoolPackage.4.3.2.1\ ... either remove it from source control..........or write msbuild code to delete all subfolders before running the nuget.exe restore command.