c# 6.0 - Getting Build Error Creating Android Application using Xamarin Extension for Visual Studio 2015 Preview -


i'm using released visual studio 2015 preview along xamarian studio 5.6.3(or 5.6.2) extension visual studio.

after hours of downloading , installing required software (all done successfully), started developing android application in vs2015p, every time create blank android application, error, no error code:

the "mergeapkrecipelists" task not given value required parameter "recipefiles".

figured out looking @ xamarin's .targets files.

short version

you can either:

  • create android c++ library project , reference xamarin android project

or

  • comment out import element defined in %programfiles(x86)%\msbuild\xamarin\android\xamarin.android.common.after.targets. note disable support adding c++ project references xamarin android projects.

once 1 of those, xamarin android project should build , run.

long version

first, note error in vs output window:

c:\program files (x86)\msbuild\xamarin\android\xamarin.android.common\importafter\microsoft.cpp.android.targets(54,9): error msb4044: "mergeapkrecipelists" task not given value required parameter "recipefiles".

the microsoft.cpp.android.targets file mentioned in error looks supporting project references c++ projects. in it, element mergeapkrecipelists task looks so:

<!-- language: lang-xml --> <mergeapkrecipelists recipefiles="@(_nativeandroidrecipefiles)">         ... </mergeapkrecipelists> 

the nativeandroidrecipefiles variable doesn't seem defined in .targets files, presumably it's being initialized build process. since .targets file seems aimed @ supporting c++ project refs, tried adding android c++ shared library project solution:

adding dynamic shared library (android) project

then referenced c++ project xamarin android project, , voila! building , running afterwards successful.

but since it's pretty onerous have bring in dummy lib, tracked down xamarin's microsoft.cpp.android.targets file gets pulled in. happens in c:\program files (x86)\msbuild\xamarin\android\xamarin.android.common.after.targets file, has 1 import element:

<!-- language: lang-xml --> <import project="$(msbuildthisfiledirectory)\xamarin.android.common\importafter\*"         condition="exists('$(msbuildthisfiledirectory)\xamarin.android.common\importafter')"/> 

that brings in under %programfiles(x86)\msbuild\xamarin\android\xamarin.android.common\importafter. since item in directory .targets file want exclude, can commented out without affecting else. note that, since .targets file appears part of support referencing c++ projects xamarin android projects, commenting out presumably means no longer work properly.

with import statement commented out, xamarin android project should build , run without c++ references.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -