Reputation: 3373
I'm pushing a NancyFx solution to AppHarbor, but it fails to build since AppHarbor isn't restoring the packages.
Package restore is defined in my solution file though.
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{313EB245-8733-45FC-82B3-6C1404446A50}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Here is a relevant piece of the AppHarbor log.
Build started 11/21/2012 8:50:07 AM.
1>Project "D:\temp\cqcytykz.jkt\input\src\xxx\xxx.sln" on node 1 (default targets).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|Mixed Platforms".
1>Project "D:\temp\cqcytykz.jkt\input\src\xxx\xxx.sln" (1) is building "D:\temp\cqcytykz.jkt\input\src\xxx\xxx\xxx.csproj" (2) on node 1 (default targets).
2>PrepareForBuild:
Creating directory "obj\Release\".
ResolveAssemblyReferences:
Primary reference "Nancy".
2>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Nancy". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\temp\cqcytykz.jkt\input\src\xxx\xxx\xxx.csproj]
Anyone having an idea what's missing?
Upvotes: 0
Views: 564
Reputation: 42333
Is there a section in the csproj that references the NuGet.targets file? What you have just shows the items in the solution, the project needs a reference to the targets file to actually know what to execute upon build of a project.
The NuGet support isn't really anything special that MSBuild/VS knows about it (though VS does have an extension to make some things easier). The stuff (which should be inserted if you use the VS extensions "Enable Package Restore" functionality) is what tells MSBuild it needs to run an external command during build, which is what then restores the packages :-)
Upvotes: 2