Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using latest Xamarin Studio, build errors stating "Can't find .NetPortable" framework

I'm using the latest Xamarin Studio and have even tried the alpha channel and I'm still getting the same issue.

/Library/Frameworks/Mono.framework/Versions/3.2.0/lib/mono/4.0/Microsoft.Common.targets: Warning: Unable to find framework corresponding to the target framework moniker '.NETPortable,Version=v4.0,Profile=Profile3'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.

This is happening with creating just an empty PCL project. I'm not seeing any posts which lead me to any answer. I am targeting Mono 3.2 and I have tried several profile numbers.

Any ideas?

like image 240
Mark Erickson Avatar asked Oct 04 '22 09:10

Mark Erickson


1 Answers

Since the profile your are targeting is Profile 3 (.net 4.0 and Silverlight4) the only way and older version would work if it's prior to Portable support in mono and faked it (I believe that would be some version prior to 3.0.12 and faking it may not be what you want, you may want to change your target).

Mono 3.1.2 was the first version that could out of the box compile PCL libraries, because it was distributed with facaded assemblies in

/Library/Frameworks/Mono.framework/Versions/3.1.2/lib/mono/xbuild-frameworks/.NETPortable

for:

  • v4.0, Profile136 .NET Framework 4, Silverlight 5, Windows Phone 8, Windows Store apps (Windows 8)
  • v4.0, Profile14 .NET Framework 4, Silverlight 5
  • v4.0, Profile147 .NET Framework 4.0.3, Silverlight 5, Windows Phone 8, Windows Store apps (Windows 8)
  • v4.0, Profile158 .NET Framework 4.5, Silverlight 5, Windows Phone 8, Windows Store apps (Windows 8)
  • v4.0, Profile19 .NET Framework 4.0.3, Silverlight 5
  • v4.0, Profile24 .NET Framework 4.5, Silverlight 5
  • v4.0, Profile37 .NET Framework 4, Silverlight 5, Windows Store apps (Windows 8)
  • v4.0, Profile42 .NET Framework 4.0.3, Silverlight 5, Windows Store apps (Windows 8)
  • v4.0, Profile47 .NET Framework 4.5, Silverlight 5, Windows Store apps (Windows 8)
  • v4.0, Profile5 .NET Framework 4, Windows Store apps (Windows 8)
  • v4.0, Profile6 .NET Framework 4.0.3, Windows Store apps (Windows 8)
  • v4.5, Profile49 .NET Framework 4.5, Windows Phone 8
  • v4.5, Profile7 .NET Framework 4.5, Windows Store apps (Windows 8)
  • v4.5, Profile78 .NET Framework 4.5, Windows Phone 8, Windows Store apps (Windows 8)

Mono 3.2.0 currently has none.

like image 68
jbtule Avatar answered Oct 12 '22 10:10

jbtule