I'm attempting to use the Visual Studio Team Services CI builds, and I'm running into a problem with a Ninject class that's making a WebActivator call.
This code is executing within my NinjectWebCommon.cs:
This builds/runs fine locally using Visual Studio. However, when I push my project to VSTS and attempt to run a build, I get this warning (which inevitably leads to the expected compilation error):
If I comment out the global attributes shown above, the CI build succeeds.
I'm having a hard time pinpointing exactly where the problem lies. The error message is simple enough, but then what is the difference between a build in Visual Studio and VSTS that's allowing this to work in one place and not the other? I'm certain I could prevent this issue by manually placing the calls within my Global.asax, but that's not the direction I want to go -- Ninject is using WebActivator calls for a reason.
Thanks!
Giving a definitive answer would be difficult without checking your actual project and CI process.
The problem is that on your CI server, the WebActivatorEx assembly is missing. Assuming your CI server pulls a copy of the solution down from source control, here's some things you can check:
If you clean your bin folders and delete your packages folder locally you will probably be able to replicate the issue on your machine.