Bug 9906 - When using the Client profile, it should fail mentioning that the profile is unsupported
Summary: When using the Client profile, it should fail mentioning that the profile is ...
Status: RESOLVED DUPLICATE of bug 1426
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-01-30 11:17 UTC by Andres G. Aragoneses
Modified: 2014-02-06 02:49 UTC (History)
3 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andres G. Aragoneses 2013-01-30 11:17:37 UTC
Every time I try to build a project that is configured to target the Client Profile framework, i.e. having this in its csproj file:


It fails with some cryptic compiler error instead of asserting that this profile is not compatible with Mono.

An example of a compiler error I get:
Extension methods require `System.Runtime.CompilerServices.ExtensionAttribute' type to be available. Are you missing an assembly reference?

This is particularly painful because I think some new versions of VS are setting this .NET framework profile by default.

Note: this is not a duplicate of bug 1426 because the solution proposed there is to fallback to an existing profile.

I think the solution proposed in this bug would at least be easier to implement and good enough to not confuse users.
Comment 1 Mikayla Hutchinson [MSFT] 2014-01-13 14:59:19 UTC

*** This bug has been marked as a duplicate of bug 1426 ***
Comment 2 Andres G. Aragoneses 2014-01-13 15:04:00 UTC
Michael, did you read what I said about bug 1426?
Comment 3 Mikayla Hutchinson [MSFT] 2014-01-13 15:16:18 UTC
Yes. Your proposed solution would break MSBuild compatibility. We already do what MSBuild does when a profile is missing, emit a warning and fall back to the GAC:

/Users/michael/Mono/bockbuild/profiles/monodevelop-mac-dev/build-root/_install/lib/mono/4.5/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETFramework,Version=v4.0,Profile=Client'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.
Comment 4 Andres G. Aragoneses 2014-01-13 15:23:34 UTC
Ah, brilliant.
Comment 5 Nikhil 2014-02-05 23:00:45 UTC
I m trying to use Apache Chemistry DotCMIS client library for .NET with Xamarin in order to integrate with Alfresco repository. I read in xamarin documentation "We cannot use off-the-shelf .NET assemblies without recompiling the C# source against the Xamarin Mobile profile".  So i downloaded the DotCMIS client source -> imported in Xamarin Studio -> Build. I am getting error similar to what Andres posted:

/Downloads/chemistry-dotcmis-0.5-src/src/enums.cs(30,30): Error CS1110: `DotCMIS.Enums.CmisValue.GetCmisValue(this System.Enum)': Extension methods require `System.Runtime.CompilerServices.ExtensionAttribute' type to be available. Are you missing an assembly reference? (CS1110) (DotCMIS) 

I m a newbie  to .Net world and Xamarin world, i tried reading the above comments and bug 1426 but not sure i understood the fix. Please help me with this as i am stuck here. Thanks.
Comment 6 Mikayla Hutchinson [MSFT] 2014-02-06 01:16:48 UTC
@Nikhil: you should create a Xamarin.iOS or Xamarin.Android library project and import the source files in that project.
Comment 7 Nikhil 2014-02-06 02:30:17 UTC
@Michael: Thanks for replying back.  I have the downloaded the DotCMIS client source ( https://chemistry.apache.org/dotnet/dotcmis.html). This code is itself a .net c# project(DotCMIS.csproj file within src folder).
 I have tried 

1) Creating a new Android library project and add source to it but it fails during build ,complains for different namespaces not available. I tried fixing some of those by adding reference to "System.ServiceModel" but now failing on "System.Web" assembly reference. It is not showing in "Edit references" to include.

2) Tried importing the downloaded project as it is within studio. It gives errors as per my earlier post.

Is there some well defined steps to import third party source as Android library project or am i missing something ?
Comment 8 Mikayla Hutchinson [MSFT] 2014-02-06 02:49:10 UTC
It may be that the library depends on APIs not available in Xamarin.Android. Did you try scanning it with the Xamarin Mobility Scanner (http://scan.xamarin.com/)?

In any case, it probably isn't a bug. I would suggest you ask in the forums at http://forums.xamarin.com.