2016-07-26 13 views
0

私はチャールズ・ペッツォルトの書籍「Xamarain.Formsでモバイルアプリケーションを作成する」を読んで始めましたが、多くのエラーや警告が表示され、修正方法がわからないため、私はVisual Studioをアンインストールして、それを無償で再インストールしようとしました。私は多くのエラーと警告を受けています。ちょうどXamarinをインストールしました

ポータブルまたは共有のXamarin.FormsアプリのAndroidデバイスにアプリケーションをビルドして展開できるため、問題が本当に不明です。これらのエラーが正確であり、それらを修正する。どこかで私がそれらについて学ぶことができるリソースがある場合、または答えが単純でわかりやすい場合、私は知りたいです。

おかげでずっと、

は、私は以下のアプリの種類ごとに得たすべてのエラーと警告が含まれています。

空のXamarin.Forms Portableアプリから始まります。

まず対話エラー:

Package Installation Error 
Could not add all required packages to the project. 
The following packages failed to install from 
'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Microsoft.NETCore.UniversalWindowsPlatfrom.5.0.0 
: Package restore failed.Rolling back pagage changes for 'App3.UWP'. 

、エラーリストに私は12の警告

Severity Code Description Project File Line Suppression State 
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.App3  1 Active 
Warning  The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3\obj\Debug\App3.dll'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3\obj\Debug\App3.dll' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App3 
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.App3.Droid  1 Active 
Warning  Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly 'App3, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? App3.Droid   
Warning Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.App3.UWP 
Warning  Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll' App3.UWP c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.UWP\App3.UWP.csproj 
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.App3.WinPhone  1 Active 
Warning  The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.WinPhone\obj\Debug\App3.WinPhone.exe'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.WinPhone\obj\Debug\App3.WinPhone.exe' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App3.WinPhone 
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.App3.Windows  1 Active 
Warning  The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.Windows\obj\Debug\App3.Windows.exe'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.Windows\obj\Debug\App3.Windows.exe' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App3.Windows 
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.App3.iOS  1 Active 
Warning  The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.iOS\obj\iPhone\Debug\App3iOS.exe'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.iOS\obj\iPhone\Debug\App3iOS.exe' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App3.iOS 

とを持って、私は14のエラーと8つの警告

Severity Code Description Project File Line Suppression State 
Warning The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.iOS\obj\iPhone\Debug\App3iOS.exe'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.iOS\obj\iPhone\Debug\App3iOS.exe' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App3.iOS 
Error  Xamarin.Forms 2.0.0.6482 is not compatible with UAP, Version = v10.0 (win10-arm-aot).   0 
Error Xamarin.Forms 2.0.0.6482 is not compatible with UAP, Version= v10.0 (win10-x64).   0 
Error Xamarin.Forms 2.0.0.6482 is not compatible with UAP, Version= v10.0.   0 
Error Some packages are not compatible with UAP, Version= v10.0 (win10-x86-aot).   0 
Error Xamarin.Forms 2.0.0.6482 is not compatible with UAP, Version= v10.0 (win10-x86-aot).   0 
Error Xamarin.Forms 2.0.0.6482 is not compatible with UAP, Version= v10.0 (win10-x86).   0 
Error Some packages are not compatible with UAP, Version = v10.0 (win10-x64-aot).   0 
Error Some packages are not compatible with UAP, Version = v10.0 (win10-arm-aot).   0 
Error Some packages are not compatible with UAP, Version = v10.0 (win10-x64).   0 
Error Some packages are not compatible with UAP, Version = v10.0 (win10-arm).   0 
Error Some packages are not compatible with UAP, Version = v10.0 (win10-x86).   0 
Error Xamarin.Forms 2.0.0.6482 is not compatible with UAP, Version= v10.0 (win10-arm).   0 
Error Some packages are not compatible with UAP, Version = v10.0.   0 
Error Xamarin.Forms 2.0.0.6482 is not compatible with UAP, Version= v10.0 (win10-x64-aot).   0 
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.App3  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.App3.Droid  1 Active 
Warning  Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.App3.UWP 
Warning  Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll' App3.UWP c:\users\user\documents\visual studio 2015\Projects\App3\App3\App3.UWP\App3.UWP.csproj 
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.App3.WinPhone  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.App3.Windows  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.App3.iOS  1 Active 
を取得するソリューションを構築しようとしたとき

AndroidデバイスにXamarin.Froms Portableをデバッグ/展開することができます。

また、空のXamarin.forms共有アプリケーションを作成すると、ダイアログエラーが発生します。 サブプロジェクト 'App4.UWP'の作成中に問題が発生しました。プロジェクトには、インストールされていないプラットフォームSDK(UAP、バージョン= 10.0.10240.0)が必要です。詳細については、次のリンクをご覧ください。http://go.microsft.com/fwlink/?prd=12514&pver=14.0&sbp=PlatformSDKMissing&plcid=0x409&o1=UAP,%20Version=10.0.10240.0

このURLをブラウザに入力してください。DNSアドレスが見つかりませんでした。

それがプロジェクトの作成を完了したとき、私は6つの警告があります

Severity Code Description Project File Line Suppression State 
Warning The referenced component 'System.ObjectModel' could not be found. App4.Droid 
Warning  The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.Droid\obj\Debug\App4.Droid.dll'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.Droid\obj\Debug\App4.Droid.dll' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App4.Droid 
Warning The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.WinPhone\obj\Debug\App4.WinPhone.exe'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.WinPhone\obj\Debug\App4.WinPhone.exe' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App4.WinPhone 
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.App4.Windows  1 Active 
Warning The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.Windows\obj\Debug\App4.Windows.exe'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.Windows\obj\Debug\App4.Windows.exe' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App4.Windows 

を私は3つの警告

Severity Code Description Project File Line Suppression State 
Warning The "XamlCTask" task failed unexpectedly. 
System.IO.FileNotFoundException: Could not find file 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.iOS\obj\iPhone\Debug\App4iOS.exe'. 
File name: 'c:\users\user\documents\visual studio 2015\Projects\App4\App4\App4.iOS\obj\iPhone\Debug\App4iOS.exe' 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) 
    at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Compile() 
    at Xamarin.Forms.Build.Tasks.XamlCTask.Execute() 
    at Microsoft.Build.Framework.ITask.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App4.iOS 
Warning  The referenced component 'System.ObjectModel' could not be found.App4.Droid 
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.App4.Windows  1 Active 

を取得するソリューションを構築するとき、私はXamarinを構築し、デバッグ/展開することができています.Formsは私のAndroidデバイスに共有されます。

これらの警告とエラーを解決するにはどうすればよいですか?

+0

Hey!私はこの問題を再現できました。私はさらに研究を進める予定で、すぐに回避策を教えてくれるでしょう – clb

+0

ねえ。だから私はここにいる。これらのエラーは次の手順で再現できます。新しい共有プロジェクト>ビルド>更新ナゲット>ビルドと私はこのエラーを受け取った後、私はそれを解決したたびにVisual Studioを開く> Visual Studioを開く>クリーンプロジェクト>ビルド。あなたはそれらの手順を試してみてください、それが問題を解決するかどうか教えてください。 – clb

答えて

0

私はこれらの問題に対していくつかの答えといくつかの方法を持っています。まず、これらは異種の問題であるように見えることに注意してください。

最初に、NuGetパッケージを更新した後に発生する可能性があるエラーについては、プロジェクトをクリーンアップすることで解決できます。だから、手順は次のようになります。>近くのVisual Studio> Visual Studioを開き>クリーンプロジェクト> XAMLCエラーのために

を構築パッケージをアップデートした後、私はIDE0006エラーのためにXamarin's bug tracking tool

上のバグを作成して、私はまた、作成しました次のエラーのためにa new bug

'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Microsoft.NETCore.UniversalWindowsPlatfrom.5.0.0 
: Package restore failed.Rolling back pagage changes for 'App3.UWP'. 

私はそのエラーを再現することはできませんされてきました。しかし、私は努力するつもりです。できるだけ早く、この投稿を更新します。

ありがとうございます! nugetを更新することによって

0

など、私は「Xamarinフォームへようこそ」テンプレートのコンパイル時に、次を除くすべてのエラーを取り除く得ている - 重大度コード説明プロジェクトファイルの行の抑制状態 参照コンポーネントのSystem.ObjectModel警告を'見つけることができませんでした。

+0

ようこそスタックオーバーフロー!これは質問への答えを提供しません。批評をしたり、著者の説明を求めるには、自分の投稿の下にコメントを残してください。自分の投稿にいつもコメントをつけることができます。そして、十分な[評判](http://stackoverflow.com/help/whats-reputation) [任意の投稿にコメントする]ことができます(http://stackoverflow.com/help/privileges/comment)。 –

関連する問題