This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 41774 - [Regression] Project not recognized as Android project after update to Xamarin Studio 6
Summary: [Regression] Project not recognized as Android project after update to Xamari...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model (show other bugs)
Version: 6.0.0 (C7)
Hardware: PC Mac OS
: Normal normal
Target Milestone: C7SR1
Assignee: Lluis Sanchez
URL:
: 42265 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-06-13 19:49 UTC by Lucas Romero
Modified: 2016-06-29 22:06 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Lucas Romero 2016-06-13 19:49:13 UTC
We have been using Xamarin.Android for about half a year now, but after updating Xamarin Studio to 6.0 (were using newest version of 5 before, sorry, don't recall the exact version), all android-related actions in our project were gone.

You could build, but not configure android-specific options like linker or application settings in project properties.
Adding a new android project to our solution using the wizard made that the startup project and the android-specific options came back. But no luck with our "old" project. By comparing the XML of both .csproj files, I could determine the cause: we had manually added a <PropertyGroup> at the beginning of the file with some extra options. Which worked fine until the update to Xamarin Studio 6.

The easiest way to reproduce is create a new Xamarin.Android solutions and then adding an empty <PropertyGroup></PropertyGroup> to the beginning of the .csproj. As soon as you do that and Xamarin Studio reloads the project, all android-related actions are gone. If you remove it, they come back.

[snip]
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <!-- removing these comments makes Xamarin Studio not recognize the project type correctly
  <PropertyGroup>
  </PropertyGroup> -->
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{D394391D-1CEA-484B-AD26-25ACED06F0D7}</ProjectGuid>
    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <RootNamespace>xamarin6_xml_bug_testcase</RootNamespace>
    <AssemblyName>xamarin6_xml_bug_testcase</AssemblyName>
    <TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
    <AndroidApplication>True</AndroidApplication>
    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
    <AndroidResgenClass>Resource</AndroidResgenClass>
    <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
    <AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <ConsolePause>false</ConsolePause>
    <AndroidLinkMode>None</AndroidLinkMode>
  </PropertyGroup>
 [/snip]
Comment 1 Lucas Romero 2016-06-13 19:54:51 UTC
Details for my environment:
=== Xamarin Studio Community ===

Version 6.0 (build 5174)
Installation UUID: f7699ea9-ec10-4a6a-9cd5-85d7255aa375
Runtime:
	Mono 4.4.0 (mono-4.4.0-branch-c7-baseline/5995f74) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000182

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 6.1.0.71 (Xamarin Studio Community)
Android SDK: /Volumes/DatenMac/Tools/android-sdk
	Supported Android versions:
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.3.1 (10188.1)
Build 7D1014

=== Xamarin.iOS ===

Version: 9.8.0.323 (Xamarin Studio Community)
Hash: 39ebb77
Branch: cycle7
Build date: 2016-06-01 21:23:15-0400

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 600005174
Git revision: 694a75f040b7f2309bc43d4f78a3a6572ca898bf
Build date: 2016-06-01 17:28:08-04
Xamarin addins: 33f406fa2dcf214012c78cb846585f062b2e1d24
Build lane: monodevelop-lion-cycle7-baseline

=== Operating System ===

Mac OS X 10.11.2
Darwin Peter.fritz.box 15.2.0 Darwin Kernel Version 15.2.0
    Fri Nov 13 19:56:56 PST 2015
    root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Comment 2 xamarin-release-manager 2016-06-20 11:39:07 UTC
Fixed in version 6.1.0.4968 (master)

Author: Lluis Sanchez
Commit: 31e719c06449d776f2094a32109a09664f9e6373 (mono/monodevelop)
Comment 3 xamarin-release-manager 2016-06-20 11:41:45 UTC
Fixed in version 6.0.2.24 (cycle7)

Author: Lluis Sanchez
Commit: 833e293388089be759449253c4a66041060def05 (mono/monodevelop)
Comment 4 Mohit Kheterpal 2016-06-22 11:38:13 UTC
I have checked this issue with XS 6.0.2.30 and observed that this issue has been fixed as shown in screencast : http://www.screencast.com/t/EJwNm7M0xv

Hence closing this issue.

Thanks
Comment 5 Lluis Sanchez 2016-06-29 22:06:09 UTC
*** Bug 42265 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.