Xamarin.Android.CSharp.targets" was not found from jenkins

Hi,

I am setting up jenkins on windows machine. I have installed VS 2017 Community. When i run the solution from VS, It is working fine. But from jenkins, i am getting below error

Droid.csproj(124,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Done Building Project "C:\Users\Administrator.jenkins\workspace\Sample\Sample.Droid\Sample.Droid.csproj" (PackageForAndroid target(s)) -- FAILED.

Build FAILED.

Jenkins Code in Build section (Execute Windows batch command)

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe C:\Users\Administrator\.jenkins\workspace\Sample\Sample.Droid\Sample.Droid.csproj /p:Configuration=Release /t:PackageForAndroid

Need help on this!!

Answers

  • Alejandro-lAlejandro-l JPMember ✭✭
    Not this one: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
    This one: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe

    And supposing you installed with visual studio xamarin.android and sdks and so on
Sign In or Register to comment.