I'm trying to build continous integration with pipelines in Azure DevOps for my ASP.NET Zero project.
I created a Build Pipeline. As Source I choose Azure Repos Git, as template i choose ASP.NET.
I left everything as it was and then click on Save and Queue. But then, during build solution, I'm having these error.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly. Mono.Linker.MarkException: Error processing method: 'System.Void Acr.UserDialogs.ProgressDialog/<>c__DisplayClass18_0::<Refresh>b__0()' in assembly: 'Acr.UserDialogs.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void AndroidHUD.AndHUD::Show(Android.Content.Context,System.String,System.Int32,AndroidHUD.MaskType,System.Nullable`1<System.TimeSpan>,System.Action,System.Boolean,System.Action) at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference) at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) at Mono.Linker.Steps.MarkStep.ProcessQueue() --- End of inner exception stack trace --- at Mono.Linker.Steps.MarkStep.ProcessQueue() at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() at Mono.Linker.Steps.MarkStep.Process() at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context) at Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.
I'm stuck here, how can I solve this?
3 Answer(s)
-
0
I had a similar - if not the same - issue. But it didn't always show up, just occasionally when I wanted to run the solution. And when it did show up I just cleaned the solution and tried to run it again. That was successful most of the time. But now I decided to get rid of it and searched for solutions.
~~I came across this solution https://stackoverflow.com/a/54344591/3843695 which I found to be quite helpful.
~~I basically changed the target framework to the one below, cleaned the solution, rebuilt the solution, set the target framework back to the original value, cleaned the solution, rebuilt the solution, restarted Visual Studio and now the error is gone ... The .csproj-file didn't change from what I can tell. Don't really know what caused the issue in the first place and don't really know why this approach solved it.~~
EDIT Issue was back again when I did a
Update-Database
... -
0
See this post in Xamarin forum: ACR User Dialogs not working in Android PCL
I replaced the following in
CompanyName.ProjectName.Mobile.Droid.csproj
:<Reference Include="AndHUD, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\packages\AndHUD.1.4.1\lib\MonoAndroid81\AndHUD.dll</HintPath> </Reference>
with
<Reference Include="AndHUD, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\packages\AndHUD.1.2.0\lib\MonoAndroid\AndHUD.dll</HintPath> </Reference>
This seems to work after all.
Downgrading via NuGet Package Manager will be easier, though :D
-
0
thanks for feedback.