2017-07-24 63 views
1

的UWP不能编译,我参加了一个新的自动生成的项目,基本上都添加此代码:Xamarin.Forms因为磊和其他错误

using System; 
using System.Threading.Tasks; 
using Xamarin.Forms; 

[assembly: Dependency(typeof(TestUWPFilePicker.UWP.FilePicker))] 
namespace TestUWPFilePicker.UWP 
{ 
    public class FilePicker : IFilePicker 
    { 
     public async Task<string> PickFolder() 
     { 
      var folderPicker = new Windows.Storage.Pickers.FolderPicker(); 
      folderPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.Desktop; 
      folderPicker.FileTypeFilter.Add("*"); 

      Windows.Storage.StorageFolder folder = await folderPicker.PickSingleFolderAsync(); 
      if (folder != null) 
      { 
       // Application now has read/write access to all contents in the picked folder 
       // (including other sub-folder contents) 
       Windows.Storage.AccessCache.StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder); 
       return folder.Path; 
      } 
      else 
      { 
       return null; 
      } 
     } 
    } 
} 

这引发了我42个错误

Severity Code Description Project File Line Suppression State 
Error CS0518 Predefined type 'System.Void' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 13 Active 
Error CS4036 'IAsyncOperation<StorageFolder>' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type 'IAsyncOperation<StorageFolder>' could be found (are you missing a using directive for 'System'?) TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 16 Active 
Error CS1729 'object' does not contain a constructor that takes 0 arguments TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 8 Active 
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\some-user\.nuget\packages\Microsoft.NETCore.Portable.Compatibility\1.0.2\ref\netcore50\System.dll' and 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'. Remove one of the duplicate references. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\CSC 1 Active 
Error CS0518 Predefined type 'System.Boolean' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 17 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 8 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 10 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 12 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 12 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 13 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 16 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 16 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 21 Active 
Error CS0518 Predefined type 'System.Object' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 21 Active 
Error CS0518 Predefined type 'System.String' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 10 Active 
Error CS0518 Predefined type 'System.String' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 14 Active 
Error CS0518 Predefined type 'System.String' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 21 Active 
Error CS0518 Predefined type 'System.String' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 22 Active 
Error CS0518 Predefined type 'System.Type' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 5 Active 
Error CS0518 Predefined type 'System.Void' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 12 Active 
Error CS0518 Predefined type 'System.Void' is not defined or imported TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 21 Active 
Error CS1983 The return type of an async method must be void, Task or Task<T> TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 10 Active 
Error CS0012 The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 13 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\App.g.i.cs 20 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\App.g.i.cs 31 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\App.g.i.cs 36 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\MainPage.g.i.cs 17 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\MainPage.g.i.cs 23 Active 
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 14 Active 
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 13 Active 
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 14 Active 
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 16 Active 
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 17 Active 
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 21 Active 
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 21 Active 
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 22 Active 
Error CS0012 The type 'Task<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 8 Active 
Error CS0246 The type or namespace name 'Dependency' could not be found (are you missing a using directive or an assembly reference?) TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 5 Active 
Error CS0246 The type or namespace name 'DependencyAttribute' could not be found (are you missing a using directive or an assembly reference?) TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 5 Active 
Error CS0246 The type or namespace name 'Task<>' could not be found (are you missing a using directive or an assembly reference?) TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 10 Active 
Error CS0234 The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 2 Active 
Error CS0246 The type or namespace name 'Xamarin' could not be found (are you missing a using directive or an assembly reference?) TestUWPFilePicker.UWP c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\FilePicker.cs 3 Active 

和13警告

Severity Code Description Project File Line Suppression State 
Warning  A problem occurred while trying to set the "References" parameter for the IDE's in-process compiler. An item with the same key has already been added. TestUWPFilePicker.iOS   
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. TestUWPFilePicker.Android  1 Active 
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. TestUWPFilePicker.iOS  1 Active 
Warning  Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 4 
Warning  Error: No resource found that matches the given name: attr 'colorAccent'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 3 
Warning  Error: No resource found that matches the given name: attr 'colorAccent'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 4 
Warning  Error: No resource found that matches the given name: attr 'colorPrimary'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error: No resource found that matches the given name: attr 'colorPrimaryDark'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error: No resource found that matches the given name: attr 'windowActionBar'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error: No resource found that matches the given name: attr 'windowActionModeOverlay'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 4 
Warning  Error: No resource found that matches the given name: attr 'windowNoTitle'. TestUWPFilePicker.Android c:\users\some-user\documents\visual studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  No way to resolve conflict between "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. TestUWPFilePicker.UWP 

我UWP项目有System,我PCL和引用。 PCL是指.NET,Xamarin.Forms.Core,Xamarin.Forms.PlatformXamarin.Forms.Xaml。最低版本为Windows 10 (10.0; Build 10240),目标版本为Windows 10 Anniversary Edition (10.0; Build 14393)NuGet Package Manager显示我Microsoft.NETCore.UniversalWindowsPlatform 5.2.2安装(仅限UWP)和Xamarin.Forms 2.3.4.224,尽管它在UWP参考下未显示。

如果我卸载和安装Xamarin.Forms 2.3.4.247,并希望在我的Windows Phone部署我再次只得到6个错误

Severity Code Description Project File Line Suppression State 
Error CS1703 Multiple assemblies with equivalent identity have been imported: 'C:\Users\some-user\.nuget\packages\Microsoft.NETCore.Portable.Compatibility\1.0.2\ref\netcore50\System.dll' and 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'. Remove one of the duplicate references. TestUWPFilePicker.UWP c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\CSC 1 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\App.g.i.cs 20 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\App.g.i.cs 31 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\App.g.i.cs 36 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\MainPage.g.i.cs 17 Active 
Error CS0433 The type 'GeneratedCodeAttribute' exists in both 'System.Diagnostics.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' TestUWPFilePicker.UWP c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.UWP\obj\ARM\Debug\MainPage.g.i.cs 23 Active 

,并再次警告13

Severity Code Description Project File Line Suppression State 
Warning  Could not copy "obj\Debug\TestUWPFilePicker.dll" to "bin\Debug\TestUWPFilePicker.dll". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\TestUWPFilePicker.dll' because it is being used by another process. TestUWPFilePicker   
Warning  Could not copy "obj\Debug\TestUWPFilePicker.dll" to "bin\Debug\TestUWPFilePicker.dll". Beginning retry 2 in 1000ms. The process cannot access the file 'bin\Debug\TestUWPFilePicker.dll' because it is being used by another process. TestUWPFilePicker   
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. TestUWPFilePicker.Android  1 Active 
Warning  Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 4 
Warning  Error: No resource found that matches the given name: attr 'colorAccent'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 3 
Warning  Error: No resource found that matches the given name: attr 'colorAccent'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 4 
Warning  Error: No resource found that matches the given name: attr 'colorPrimary'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error: No resource found that matches the given name: attr 'colorPrimaryDark'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error: No resource found that matches the given name: attr 'windowActionBar'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  Error: No resource found that matches the given name: attr 'windowActionModeOverlay'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 4 
Warning  Error: No resource found that matches the given name: attr 'windowNoTitle'. TestUWPFilePicker.Android c:\Users\some-user\Documents\Visual Studio 2015\Projects\TestUWPFilePicker\TestUWPFilePicker\TestUWPFilePicker.Android\Resources\values\styles.xml 2 
Warning  No way to resolve conflict between "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily. TestUWPFilePicker.UWP 

什么是错我的参考?

目前,我已安装Xamarin 4.5.0.443Visual Studio 2015。我试图搜索CS1703的解决方案,但没有成功。现在我试图改变目标配置文件,再次给我不同的错误(37)和警告(11)。

+1

它在uwp默认项目中引用“Microsoft.NETCore.UniversalWindowsPlaform”,“通用Windows”,“Xamarin.Forms”和“YourPCLproject”。但是我没有在我身边发现'System'。请尝试删除'System'参考。 –

+0

与此同时,我更新到Xamarin 4.5.0.486,再次创建该项目,从UWP项目中删除'System'引用,现在它工作。谢谢!如果你愿意,你可以把它作为答案发布。 – testing

回答

1

请更新至Xamarin 4.5.0.486并从UWP客户端项目中删除System参考。 enter image description here