TFS & Visual Studio ALM – by Neno Loje

(formerly Team System, VSTS)

Solution for Error CS0246: The type or namespace name `App’ could not be found when building Xamarin.iOS

April 4th, 2016 · 2 Comments · Team Foundation Build (TF Build)

When trying to build an Xamarin iOS solution with TFS Build, you get the following errors/warnings:

/Library/Frameworks/Mono.framework/Versions/4.2.3/lib/mono/4.5/Microsoft.Common.targets:  warning : Project reference ‘../HelloWorldApp/HelloWorldApp.csproj’ could not be resolved.

AppDelegate.cs(26,33): error CS0246: The type or namespace name `App’ could not be found. Are you missing an assembly reference?

How to fix this:

Remove references to the project that could not get resolved (in the example above, it’s a portable class library HelloWorldApp.csproj) and put them back in (as project reference).

(Big thanks goes out to the guys at for making me aware of the forum post that contained this useful solution, which fixed it for me.)

Good luck!


2 Comments so far ↓

  • Michael

    Hi Neno,

    Thanks for this. I thought I would also mention for future folks that this error can also occur if you have TFS 2015 point to the .csproj file for Xamarin.iOS and not the .sln (solution) file. This error will occur the first time you build because it will not have built the PCL library and instead only builds the .csproj file. If you point to the .sln file and build, then change back to .csproj file it will continue to work, however you are using old code and you are getting a false positive. Therefore, it is best to point to the .sln file, even though this will build everything (including other platforms) and takes longer.

  • Roney Sebastian

    Gracias Brother … me funcionó 😀

Leave a Comment