It looks like the DLL in the MonoAndroid10 folder is versioned to 3.0.2 but all the others are 1.0.0.0
Is this expected? I think it is the cause for some build warnings because I built a .net standard 2.0 dll and then use it in my Xamarin Android project and I get conflicting version warnings.
Is this expected, can someone comment on it? Thanks!
Hmmmm... The abstractions are 1.0.0.0? Probably because of .net standard format....
This could be naivety on my part (very good odds), but I will basically explain what's happening. I have an Android 8.0 (oreo) project, and .NET Standard 2.0 targeted project in my solution. When I install the Media plugin from nuget it puts the monoandroid10 media plugin dll in my android project and the .net standard media plugin dll in my net standard project.
Then, when I build _my_ .net standard project and add my built dll as a reference inside the android Xamarin project I get the conflict, saying the .net standard dll version in my dll (1.0.0.0) conflicts with the monoandroid10 version referenced in the android project.
My understanding is that using Xamarin and targeting android 8.0 supports .net standard 2.0, so shouldn't the _.net standard media plugin_ dll be added to the references of the android project, and not the monoandroid10 dll? The only other thing that led me down that path is that newtonsoft.json nuget installation just puts the .net standard dll in the android project AND my .net standard targeted project as a reference, so I thought maybe the same should be done here.
There are 2 dlls:
Plugin.Media.Abstractions.dll -> both .NET Standard + Android
Plugin.Media.dll -> Only Android
i think i figure out what is going on and can fix on the build server.
Awesome, thanks very much! Mind giving a little more detail for inquiring minds when you have a chance? No rush.
3.0.2.118-beta
Give that a go.
Yeah, so:... Appveyor I have it turned on to update the assembly info... however .NET Standard Libraries don't have this stuff as it is in the .csproj. So since they dont' have auto tooling you have to do it manually in the powershell script such as:
$newVersion = $env:APPVEYOR_BUILD_VERSION.Replace("-beta","")
$configFiles = Get-ChildItem . *.csproj -rec
$assemblyVersionString = "<AssemblyVersion>" + $newVersion + "</AssemblyVersion>"
$assemblyFileVersionString = "<AssemblyFileVersion>" + $newVersion + "</AssemblyFileVersion>"
$versionString = "<Version>" + $newVersion + "</Version>"
foreach ($file in $configFiles)
{
(Get-Content $file.PSPath) |
Foreach-Object { $_ -replace "<AssemblyVersion>1.0.0.0</AssemblyVersion>", $assemblyVersionString } |
Set-Content $file.PSPath
}
foreach ($file in $configFiles)
{
(Get-Content $file.PSPath) |
Foreach-Object { $_ -replace "<AssemblyFileVersion>1.0.0.0</AssemblyFileVersion>", $assemblyFileVersionString } |
Set-Content $file.PSPath
}
foreach ($file in $configFiles)
{
(Get-Content $file.PSPath) |
Foreach-Object { $_ -replace "<Version>1.0.0.0</Version>", $versionString } |
Set-Content $file.PSPath
}
Thanks!