Reputation: 8236
I am in process of Configuring CI using Visual Studio Team Services for my projects. The Solution structure looks like this:
+MyApplications
+.nuget
NuGet.Config
+Packages
+AdminWebApp ---> ("AdminWebApp" references the class library "AdminClassLib")
+ClientWebApp ---> ("ClientWebApp" references the class library "ClientClassLib")
+AdminClassLib
+ClientClassLib
MyApplications.sln
I have created a build definition that builds one web application (admin) to publish it at later stage. The AdminWeb Build Definition has the following Tasks:
->Nugget Installer
->Visual Studio Build
The repository maps to the "AdminWebApp" only.
The Build process failed, giving the following error:
Error CS0246: The type or namespace name 'AdminClassLib' could not be found (are you missing a using directive or an assembly reference?)
Warning : The referenced project '..\AdminClassLib\AdminClassLib.csproj' does not exist.
In the Visual Studio, it builds successfully because i guess it compiles all the projects and build the dependencies.
Is there any helpful information that explains how to do that using Visual Studio Team Services?
Upvotes: 1
Views: 820
Reputation: 114641
Without the referenced project Team Build isn't going to be able to find the binaries that are not produced in the build.
It probably builds locally because the .csproj is there or the binaries are still there form a previous build.
Either include the project in your builds workspace or configure your AdminClassLib build definition to publish it as a NuGet package. You can use the Package Management feature of VSTeam Services to store your packages in.
You can then configure your WebUI to fetch the latest version of the AdminClassLib from the private NuGet repository.
Upvotes: 1