Reputation: 465
I have a web api project that is working fine in my local machine. After I pushed it to GIT on Visual Studio Team Services, created a build definition (with Restore NuGet packages enabled) and queued a build, i get the below error:
The type or namespace name 'Practices' does not exist in the namespace 'Microsoft' (Are you missing assembly reference?)
I have tried building with "Keep Local" property both true and false & "Specific version" property both true and false for the CommonLibrary references. Any combination for these two properties is resulting in the same.
Upvotes: 6
Views: 2408
Reputation: 1298
I had exactly the same symptoms, but in my case it turns out that although I could see the package listed under 'References' for my .Web project and all ran OK locally it wasn't actually installed.
Installing the package via the NuGet UI worked for me.
Upvotes: 1
Reputation: 1988
I had a similar problem with VSO build and Azure packages:
The problem was solved by reinstalling the packages for the projects.
In the Package Manager Console:
Update-Package -Reinstall
Upvotes: 4
Reputation: 465
This is how i resolved it. I made sure that the same libraries referred in packages.config file in all five projects of the solution have same version number. (In most cases, i re-installed from NuGet manager). In the Git branch, i deleted the packages folder so that the libraries are restored afresh. That did the trick. The build passed the next time.
Upvotes: 1