Closed beeradmoore closed 1 year ago
Thanks to Microsoft. It's really difficult.
The easiest way:
1) Open Xamarim.MediaGallery.sln
2) Delete all "*.Maui" projects (Sample.Common.Maui
and etc.)
3) Remove all net6.0 TargetFrameworks
in other projects
4) Clean projects
5) Close IDE
6) Open Xamarim.MediaGallery.sln
Thanks for the quick reply. That got it working. Will get started on those changes.
I spoke too soon. Appears the demo will compile and run. And appears it does not like it when I have errors in the MediaGallery project. But for some reason it does not like additional arguments added onto SaveAsync
. Says SaveAsync with 4 arguments does not exist, but IDE seems to not only show me it exists it shows the comment I added to the doc tags about the new argument 😂
I'll keep fiddling and see what I can do.
Got it. I reverted my csproj/sln/targets changes.
Leaving a list of things I did that worked for me here for the next person to find.
netstandard2.0
to netstandard2.1
. No idea why, IDE didn't like it._UseNuget
from any csproj file (it's just in one)Xamarim.MediaGallery.targets
<PackageReference Condition="'$(_UseNuget)'=='true'" Include="Xamarin.MediaGallery.Permision" Version="$(_PermissionLibVersion)" />
<ProjectReference Condition="'$(_UseNuget)'!='true'" Include="$(MSBuildThisFileDirectory)\Permission\Xamarin\Permission.csproj" />
should become
<ProjectReference Include="$(MSBuildThisFileDirectory)\Permission\Xamarin\Permission.csproj" />
Xamarim.MediaGallery.sln
in Visual Studio.Permissions
and MediaGallery
.For any changes made I needed to manually build MediaGallery
again.
Hey @dimonovdd , I'd like to make some changes to Xamarin.MediaGallery (see #122) regarding the differences between iOS and Android and how they handle albums. I think the changes should be quite simple, but currently I am unable to build the project.
I am using macOS + Visual Studio 2022. I am able to build and deploy both
Xamarim.MediaGallery.Sample
andXamarim.MediaGallery.Sample.Maui
but it appears that in both instancesXamarim.MediaGallery.targets
is forcing those projects to use the nugets (see the_UseNuget
here).Changing
_UseNuget
to be false I would hope that it would then use the csproj files and build from source but there appears to be issues with it generatingNativeMedia.dll
. Poking around at this for an hour I was not able to find a resolution.I then changed tactic and made a new Xamarin.Forms project and added source for
Permission
andMediaGallery
to my solution and tried to get it to build from source that way to no avail.Third tactic I tried was to build the project manually with msbuild, but building just resulted in compilation errors no matter how I tired to build and what I tried to target.
Is there any info you can provide on how you build it from source. I can see from your comment here that you were building from cli. I am more than happy to build on cli and manually dump dlls in my test project to test the new code out before I update the samples and send it all off as a PR.