【发布时间】:2017-12-30 03:41:51
【问题描述】:
我采用了一个全新的自动生成项目并添加了以下代码:
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 和 Universal Windows。 PCL 指的是.NET、Xamarin.Forms.Core、Xamarin.Forms.Platform 和Xamarin.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.443 和 Visual Studio 2015。我试图搜索 CS1703 的解决方案但没有成功。现在我尝试更改目标配置文件,再次给我不同的错误 (37) 和警告 (11)。
【问题讨论】:
-
它引用了 uwp 默认项目中的
Microsoft.NETCore.UniversalWindowsPlaform、Universal Windows、Xamarin.Forms和YourPCLproject。但是我没有在我身边找到System。请尝试删除System引用。 -
同时我更新到 Xamarin 4.5.0.486,再次创建项目,从 UWP 项目中删除
System引用,现在它可以工作了。谢谢!如果需要,您可以将其发布为答案。
标签: xamarin visual-studio-2015 uwp xamarin.forms