2016-04-07 45 views
4

Herhangi bir nedenden dolayı TeamCity ile uygulamanızı oluştururken "System.Runtime 4.0.20" yüklemeye çalışmakta ısrar ediyor. o paket ekleme konusunda ısrar neden anlayamıyorumNuget Paketini Geri Yükle: .Net Sürüm Hatası Hedef

[update] WARNING: Package 'System.Runtime 4.0.20' does not exist in project 'AkkaNeat.Tests.csproj' [20:04:08][update] Removed package 'System.Resources.ResourceManager 4.0.0' from 'packages.config' [20:04:08][update] Removed package 'System.Linq 4.0.0' from 'packages.config' [20:04:08][update] For adding package 'System.Runtime 4.0.10' to project 'AkkaNeat.Tests.csproj' that targets 'net45'. [20:04:08][update] Could not install package 'System.Runtime 4.0.20'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. [20:04:08][update] Process exited with code 1 [20:04:09][Step 2/4] Step Restore NuGet packages (NuGet Installer) failed

:

Sonra aşağıdaki hatayı alıyorum. Her şey Xamarin ve Visual Studio'da ajan makinesinde iyi bir performans sergiliyor.

Bunu anlamaya çalışırken iki tam gün geçirdim. Ben bile açıkça System.Runtime farklı bir sürümüne packages.json dosyasına bir başvuru eklemeyi denedim. Nuget hala belirtilen versiyonda ısrar ediyor.

cevap

4

Yüklemeyi denediğiniz paketiniz, projenizin hedeflediği .NET sürümünü desteklemez. Bunu düzeltmek için, projenizin hedeflediği .Net sürümünü, System.Runtime 4.0.20 (tarafından sağlanan çıktıda gösterilmiyor) paketiyle desteklenen .Net sürümüne güncelleyin.

Adım 1: paketin desteklediği .Net sürümünü bulun.

Nuget paketiniz için ihtiyacınız olan sürümü looking at the folder that it's installed under numaralı telefondan öğrenebilirsiniz. /path/to/lib/net46 veya path/to/lib/net451 numaralı klasörde bulunuyorsa, bunlar sırasıyla .Net 4.6 veya .Net 4.5.1 anlamına gelir.

Adım 2: change your project's .Net version

+0

Teşekkürler. Sonunda cevabın yardımıyla çalıştım. :) –

+0

Rica ederim :) –