App Center build failed for xamarin android project

680 views Asked by At

I am trying to set build configuration on APP CENTER for xamarin Android project like below.

enter image description here

when i run the build i am getting below error.

"/Users/runner/work/1/s/EmguCVSource/Android/Emgu.CV.Platform.Android.csproj" (default target) (2:2) ->
(_CheckForInvalidConfigurationAndPlatform target) -> 
  /Library/Frameworks/Mono.framework/Versions/6.4.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(791,5): error : The OutputPath property is not set for project 'Emgu.CV.Platform.Android.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Dev'  Platform='AnyCPU'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [/Users/runner/work/1/s/EmguCVSource/Android/Emgu.CV.Platform.Android.csproj]

    141 Warning(s)
    1 Error(s)

Time Elapsed 00:00:38.88
##[error]Error: The process '/Library/Frameworks/Mono.framework/Versions/6_4_0/bin/msbuild' failed with exit code 1
See https://go.microsoft.com/fwlink/?LinkId=760847.```

i tried to fix this by changing mono version but not success.

what should i do to avoid this issue?
1

There are 1 answers

0
Chandu Ranwala On BEST ANSWER

This is a good sample if you have 2 csproj in side the project.

in my case i have 2.

  1. original xamarin.android.csproj.
  2. Emgu.CV.Platform.Android.csproj (which i used for image transformation)

to fixed this i have to keep update Emgu.CV.Platform.Android.csproj as same xamarin.android.csproj.

so i fixed this by adding below line of code.

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Dev|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>$(OpenCVBinaryDir)\Build\$(AssemblyName)\$(Platform)\$(Configuration)\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
  </PropertyGroup>

Thank You.