2016-03-23 17 views
0

Visual Studio 2015 Güncelleştirmesi 1'de bir Sınıf Kitaplığı (Package) projesi oluşturmaya çalışıyorum, proje yerel makinemde başarıyla oluşturuluyor, ancak yapı MyGet oluşturma hizmetlerinde başarısız oluyor (MyGet feed, projeyi github repo'dan çeker ve bunu oluşturmaya çalışır.MyGet aracılığıyla Sınıf Kitaplığı (Paket) oluştururken hatalar

project.json dosyası şuna benzer:

2016-03-23 18:58:46 [Information] Sources at revision 2e055ab76bb167d728924383fa842961389e1200 
. 
2016-03-23 18:58:46 [Information] Finished fetching sources. 
2016-03-23 18:58:46 [Information] Searching for projects to build... 
2016-03-23 18:58:46 [Information] Searching for MyGet.bat, MyGet.cmd or MyGet.ps1... 
2016-03-23 18:58:46 [Warning] Could not find MyGet.bat, MyGet.cmd or MyGet.ps1. 
2016-03-23 18:58:46 [Information] Searching for build.bat, build.cmd or build.ps1... 
2016-03-23 18:58:46 [Warning] Could not find build.bat, build.cmd or build.ps1. 
2016-03-23 18:58:46 [Information] Searching for MyGet.sln... 
2016-03-23 18:58:46 [Warning] Could not find MyGet.sln. 
2016-03-23 18:58:46 [Information] Searching for other *.sln files... 
2016-03-23 18:58:46 [Information] Registering NuGet package sources... 
2016-03-23 18:58:46 [Information] Creating new NuGet.config file in which to register package sources. 
Package Source with Name: feratur-public added successfully. 
2016-03-23 18:58:49 [Information] Finished registering package sources. 
2016-03-23 18:58:49 [Information] Running Package Restore... 
2016-03-23 18:58:49 [Information] Found NuGet.config file that will be used during package restore. 
2016-03-23 18:58:49 [Information] Start running package restore for D:\temp\656b00b\TestMyGet.sln... 

MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. 
2016-03-23 18:58:51 [Information] Finished running package restore for D:\temp\656b00b\TestMyGet.sln (restored 0 packages). 
2016-03-23 18:58:51 [Information] Finished Package Restore. 
2016-03-23 18:58:51 [Information] Searching for restored NuGet packages... 
2016-03-23 18:58:51 [Information] Found no restored packages. 
2016-03-23 18:58:51 [Information] Start building project(s)... 
2016-03-23 18:58:51 [Information] Start building project D:\temp\656b00b\TestMyGet.sln... 

    C:\Users\Wonka\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe --appbase "D:\temp\656b00b\src\TestMyGet" "C:\Users\Wonka\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\lib\Microsoft.Dnx.Tooling\Microsoft.Dnx.Tooling.dll" pack "D:\temp\656b00b\src\TestMyGet" --configuration Release --out "..\..\artifacts\bin\TestMyGet" 
    Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16231 
    Building TestMyGet for .NETFramework,Version=v4.5.1 
    Using Project dependency TestMyGet 1.0.0 
     Source: D:\temp\656b00b\src\TestMyGet\project.json 
    Unable to resolve dependency WindowsAzure.Storage 6.2.2-preview 
    Using Assembly dependency fx/mscorlib 4.0.0 
     Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll 
    Using Assembly dependency fx/System 4.0.0 
     Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll 
    Using Assembly dependency fx/System.Core 4.0.0 
     Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll 
    Using Assembly dependency fx/Microsoft.CSharp 4.0.0 

Ve:

Building TestMyGet for .NETPlatform,Version=v5.3 
    Using Project dependency TestMyGet 1.0.0 
     Source: D:\temp\7ca98d3\src\TestMyGet\project.json 
    Unable to resolve dependency WindowsAzure.Storage 6.2.2-preview 
    Unable to resolve dependency Microsoft.CSharp 4.0.1-beta-23516 
    Unable to resolve dependency System.Collections 4.0.11-beta-23516 
    Unable to resolve dependency System.Data.SqlClient 4.0.0-beta-23516 
    Unable to resolve dependency System.Linq 4.0.1-beta-23516 
    Unable to resolve dependency System.Runtime 4.0.21-beta-23516 
    Unable to resolve dependency System.Runtime.InteropServices 4.0.21-beta-23516 
    Unable to resolve dependency System.Threading 4.0.11-beta-23516 

Benim için MyGet hizmetler hazırlamasına gibi görünüyor şu şekilde

{ 
    "version": "1.0.0-*", 
    "description": "TestMyGet Class Library", 
    "authors": [ "Test" ], 
    "tags": [ "" ], 
    "projectUrl": "", 
    "licenseUrl": "", 

    "frameworks": { 
    "net451": { }, 
    "dotnet5.4": { 
     "dependencies": { 
     "Microsoft.CSharp": "4.0.1-beta-23516", 
     "System.Collections": "4.0.11-beta-23516", 
     "System.Data.SqlClient": "4.0.0-beta-23516", 
     "System.Linq": "4.0.1-beta-23516", 
     "System.Runtime": "4.0.21-beta-23516", 
     "System.Threading": "4.0.11-beta-23516" 
     } 
    } 
    }, 
    "dependencies": { 
    "WindowsAzure.Storage": "6.2.2-preview" 
    } 
} 

inşa günlüğü olduğu yapı için gereken NuGet paketlerini bulamıyor ve çekemiyor. Burada neyin yanlış gidebileceği hakkında bir fikrin var mı?

+0

ama yapmış TFS ve TeamCity gibi diğer yapım sistemleri ile. Genellikle, bu paketler için kaynak repolarını içeren ' 'öğesini içeren çözüme bir nuget.config dosyası eklemeniz gerekir. Bkz .: http://docs.nuget.org/Consume/NuGet-Config-File – CodingGorilla

+0

@CodingGorilla Varsayılan NuGet paket kaynağı, MyGet beslememde karşılık gelen menü ayarında 'Paket kaynakları' içinde belirtilmiştir ve bir not vardır: varsayılan olarak, geçerli feed'de tanımlı tüm paket kaynaklarınızı inşa makinelerimizdeki NuGet.config dosyasına ekleyeceğiz. " Ama kesinlikle bir nuget.config dosyası eklemeye çalışacağım –

+0

Yea, üzgünüm henüz MyGet kullanmadım, bu yüzden dış yapı sistemleri ve özel nuget reposları ile geçmiş deneyimlerime dayanarak tahmin ediyordum. Bu yüzden bir cevap olarak göndermedim. :) – CodingGorilla

cevap

0

Açık gibi görünüyor ancak sorun olmadığından emin olmak için lütfen: project.lock.json dosyasında kontrol etmediğinizden emin olun.

ek olarak, bazı şeylerin ilgilenir bir yapı komut dosyası (çözüm kök dizininde MyGet.ps1 koymak) gerekir: Ben MyGet ile bu yapılmazsa ettik

# bootstrap DNVM into this session. 
&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))} 

# load up the global.json so we can find the DNX version 
$globalJson = Get-Content -Path $PSScriptRoot\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore 

if ($globalJson) 
{ 
    $dnxVersion = $globalJson.sdk.version 
} 
else 
{ 
    Write-Warning "Unable to locate global.json to determine using 'latest'" 
    $dnxVersion = "latest" 
} 

# install DNX 
# only installs the default (x86, clr) runtime of the framework. 
# If you need additional architectures or runtimes you should add additional calls 
# ex: & $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -r coreclr 
& $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -Persistent 

# run DNU restore on all project.json files in the src folder including 2>1 to redirect stderr to stdout for badly behaved tools 
Get-ChildItem -Path $PSScriptRoot -Filter project.json -Recurse | ForEach-Object 
{ 
    & dnu restore $_.FullName 2>1 
} 

# run msbuild on the solution file 
Get-ChildItem -Path $PSScriptRoot -Filter *.sln -Recurse | ForEach-Object 
{ 
    & "$env:msbuildexe" $_.FullName /p:Configuration=$env:Configuration /m /v:M /fl /flp:LogFile="msbuild.log;Verbosity=Normal" /nr:false 2>1 
} 
+0

project.lock.json dosyası kontrol edilmedi, ancak yapı betiği hile yaptı, şimdi her şey iyi çalışıyor, çok teşekkürler! –