Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
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.
*** This bug has been marked as a duplicate of bug 1426 ***
Michael, did you read what I said about bug 1426?
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.
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.
@Nikhil: you should create a Xamarin.iOS or Xamarin.Android library project and import the source files in that project.
@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 ?
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.