Closed rgroenewoudt closed 1 year ago
What if you build with .NET 6? Is AssemblyPath
still undefined? If yes, we can’t default to .NET 5.
With .NET6 Android (currently in preview) it is defined. $(TargetFrameworkIdentifier) is defined as .NETCoreApp.
Could you tell me if 2.9.6-testing1
solves your problem?
Yes, building works with 2.9.6-testing1.
Other strange thing: when installing the Nuget package I get the following error in the Errors list once but it doesn't seem to affect building:
Severity Code Description Project File Line Suppression State
Warning The command ""C:\Users\x\.nuget\packages\mradvice\2.9.6-testing1\build\..\tools\net5.0\MrAdvice.Weaver.exe" AssemblyPath="obj\Debug\120\App2.dll" ReferencePath="@obj\Debug\120\App2.dll.MrAdvice.ReferencePath.txt" ReferenceCopyLocalPaths="@obj\Debug\120\App2.dll.MrAdvice.LocalReferencePath.txt" AssemblyOriginatorKeyFile="" SignAssembly=""" exited with code 2. App2
Do you get this error at package install, not at build?
Yes, at package install.
It would be fine to close this bug as Xamarin is getting replaced with new .NET 6 Android and MrAdvice works well in .NET 6.
Thank you
In a Xamarin.Android project the latest MrAdvice is failing to run.
This is because property MrAdviceWeaverPath is not defined. Xamarin project doesn't have $(TargetFrameworkIdentifier) as .NETFramework or .NETCoreApp or .NETStandard.
Using net5.0\MrAdvice.Weaver.exe seems to work fine so it might be a good idea to always use that one if $(TargetFrameworkIdentifier)' not equals to '.NETFramework'