I don't know what got upgraded exactly today, I think all the Xamarin components got upgraded via Nuget , but the standard Xamarin Forms template in Visual studio is totally broken. I cannot get it to work and was hoping someone has an idea what is wrong.
First of all I also posted my question on Stack Overflow, so you can refer to that for more details, but I'll post them here as well.
stackoverflow (dot) com/q/48014827/1462656
But the main problems is that creating a basic project using Visual studio template no longer works. I can create it, but it will not run due to build errors. In no way have I altered the template project. They should work out of the box.
The main errors are as follows.
1)
Severity Code Description Project File Line Suppression State Error The current .NET SDK does not support targeting .NET Standard 2.0. Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0. Phoneword C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 126
2)
Severity Code Description Project File Line Suppression State Error The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'Phoneword, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Phoneword.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments) at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Phoneword.Android
Answers
@SalvatoreSalpietro For your 1st question, see my post in this thread.
I also just yesterday did the Phoneword example in Xamarin Forms using .NET Standard. I didn't get this error anyway. But depending on your VS and Windows setup, probably you will have to use .NET Standard 1.6. May be you have not upgraded your Windows 10 to "Falls Creators Update". To use .NET Standard 2.0, your Windows 10 build must be 16299 version. Check it out at .NET Standard versions vs Platform versions.
Once either you corrected .NET Standard version in the NET Std project properties and / or upgraded your Windows to FCU, you may still get errors as in this thread. Also check my answer in it for the corrections needed.
Same here, basic project of Visual studio xamarin form template, debugger does not start, me trying in real device, it gets deployed but unable to debug.
following error is displayed:
Start debugging Android application ...
Starting Android application ...
An error occured. See full exception on logs for more details.
Unable to start debugging.
The system cannot find the file specified.
exception log:
amarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin|Information|0|Xamarin - 4.8.0.753-d15-5+6575bd113
Xamarin.VisualStudio.Activation.AccountManager|Information|0|VS2017 Community
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|No license found for iOS
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Running license sync for iOS
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Not logged in, using iOS Community
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|No license found for Android
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Running license sync for Android
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Not logged in, using Android Community
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage|Warning|0|Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.Inspector|Information|0|Inspector extension loaded
Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider|Information|0|Start()
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|Solution loaded: 'RunIt'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'F:\Practices\TryToRunInDevice\RunIt\RunIt.Android\RunIt.Android.csproj'
Xamarin.VisualStudio.Android.AndroidVirtualDeviceProvider|Error|0|an error occurred loading avd
Android_Accelerated_Nougat
, the system image does not existsXamarin.VisualStudio.Android.AndroidVirtualDeviceProvider|Error|0|an error occurred loading avd
Android_Accelerated_x86_Nougat
, the system image does not existsXamarin.VisualStudio.Android.AndroidVirtualDeviceProvider|Error|0|an error occurred loading avd
Android_ARM_Nougat
, the system image does not existsMono.Debugging.VisualStudio.DebugLauncher|Error|0|Controller.Launch ()
Xamarin.VisualStudio.ProgressReport|Error|0|System.Runtime.InteropServices.COMException (0x89710015): Unable to start debugging.
The system cannot find the file specified.
basic xamarin form template works, after Installing Windows 10 "Falls Creators Update".