Update: install the patch -
http://slodge.blogspot.co.uk/2013/02/a-patched-monodevelop-for-pcls.html
Thanks especially to "Jonathan Peppers"...
There is a solution to the problem that MonoDevelop can only build Profile1 for MonoTouch PCL libraries.
The solution is to use Conditional MSBuild attributes.
So... replace:
<TargetFrameworkProfile>Profile104</TargetFrameworkProfile>
with:
<TargetFrameworkProfile Condition="'$(OS)' != 'Windows_NT'">Profile1</TargetFrameworkProfile> <TargetFrameworkProfile Condition="'$(OS)' == 'Windows_NT'">Profile104</TargetFrameworkProfile>
This can be done using Replace In Files :)
Afterwards it seems to work perfectly in both Visual Studio and in MonoDevelop :)
Stuart
where can I change that? which file is that?
ReplyDeleteYou have to do that in each and every one of your portable projects
ReplyDeleteI'm still receiving 'Assembly not available for .NETPortable 4.0 Profile1 Profile (in Mono 2.10.9)' on MonoDevelop/osx
ReplyDeleteIf that's a clean install of MonoDevelop for MonoToch then you can also try the fix from http://stackoverflow.com/questions/12041290/monodevelop-is-it-possible-to-switch-pcls-compiler/12062589#12062589 (see https://bugzilla.xamarin.com/show_bug.cgi?id=5329)
ReplyDeleteHi Slodge, it is a clean install indeed, and the fix suggested on stackoverflow does not fix my problem unfortunately.
ReplyDeleteThe problem gets stranger and stranger. I'd really like to get this going, but man, what a hassle.
If I download your project from github and compile it on the mac: i get no errors. If I then do a REBUILD of the project, I get lots of errors.
My guess is that still the 'Assembly not available for .NETportable 4.0 profile1' is the problem.
On the first build (the working one) the references are yellow, with a warning sign and the message "'Assembly not available for .NETportable 4.0 profile1'"... after the rebuild they've turned red (same message still) and I get build errors on stuff like Dictionary not found
Maybe move this over to http://forums.xamarin.com/categories/ios - someone from Xamarin can help work it out.
ReplyDeleteThat bug has been logged since last Summer - it shouldn't still be in NEW State.