当我运行它时,它不会恢复所有的pacakges当我看到日志它恢复一些pacakges但并不是所有的项目都在解决方案中...在MS Build脚本中有什么我需要修复的吗?
完整错误日志: http://justpaste.it/oq2p
错误日志:
02-Nov-2015 10:08:55 Infrastructure\InMemoryMultipartStreamProvider.cs(14,52): error CS0246: The type or namespace name 'MultipartStreamProvider' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj]
02-Nov-2015 10:08:55 Infrastructure\InMemoryMultipartStreamProvider.cs(30,32): error CS0115: 'InMemoryMultipartStreamProvider.GetStream(HttpContent, HttpContentHeaders)': no suitable method found to override [C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj]
02-Nov-2015 10:08:55 Infrastructure\InMemoryMultipartStreamProvider.cs(41,36): error CS0115: 'InMemoryMultipartStreamProvider.ExecutePostProcessingAsync()': no suitable method found to override [C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj]
02-Nov-2015 10:08:55 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk.BusinessObjects\SmartDesk360.BusinessObjects.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:55 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\API.SmartDesk360.com\SmartDesk360.API.csproj" (2) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) on node 1 (default targets).
02-Nov-2015 10:08:55 RestorePackages:
02-Nov-2015 10:08:55 "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\.nuget\NuGet.exe" install "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\ "
02-Nov-2015 10:08:55 Restoring NuGet packages...
02-Nov-2015 10:08:55 To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
02-Nov-2015 10:08:55 All packages listed in packages.config are already installed.
02-Nov-2015 10:08:55 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.DataLayer\SmartDesk360.DataLayer.csproj" (7) on node 1 (default targets).
02-Nov-2015 10:08:55 RestorePackages:
02-Nov-2015 10:08:55 "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\.nuget\NuGet.exe" install "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.DataLayer\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\ "
02-Nov-2015 10:08:55 Restoring NuGet packages...
02-Nov-2015 10:08:55 To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
02-Nov-2015 10:08:55 All packages listed in packages.config are already installed.
02-Nov-2015 10:08:55 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.DataLayer\SmartDesk360.DataLayer.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:55 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.FileManager\SmartDesk360.FileManager.csproj" (8) on node 1 (default targets).
02-Nov-2015 10:08:55 RestorePackages:
02-Nov-2015 10:08:55 "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\.nuget\NuGet.exe" install "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.FileManager\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\ "
02-Nov-2015 10:08:56 Restoring NuGet packages...
02-Nov-2015 10:08:56 To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
02-Nov-2015 10:08:56 All packages listed in packages.config are already installed.
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.FileManager\SmartDesk360.FileManager.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:56 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (6) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Mailer\SmartDesk360.Mailer.csproj" (9) on node 1 (default targets).
02-Nov-2015 10:08:56 GenerateTargetFrameworkMonikerAttribute:
02-Nov-2015 10:08:56 Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
02-Nov-2015 10:08:56 CoreCompile:
02-Nov-2015 10:08:56 Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
02-Nov-2015 10:08:56 CopyFilesToOutputDirectory:
02-Nov-2015 10:08:56 SmartDesk360.Mailer -> C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Mailer\bin\Debug\SmartDesk360.Mailer.dll
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Mailer\SmartDesk360.Mailer.csproj" (default targets).
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\SmartDesk360.Core\SmartDesk360.Core.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:56 Done Building Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\API.SmartDesk360.com\SmartDesk360.API.csproj" (default targets) -- FAILED.
02-Nov-2015 10:08:56 Project "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\API.SmartDesk360.com.sln" (1) is building "C:\Users\Administrator\bamboo-home\xml-data\build-dir\API-STAG-JOB1\Tests.SmartDesk360.com\Tests.SmartDesk360.com.csproj" (10) on node 1 (default targets).
答案 0 :(得分:2)
因此,如果您的repositories.config文件包含以下内容:
Bitmap
您的MyCsProj \ packages.config文件如下所示:
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path=".\MyCsProj\packages.config" />
</repositories>
Nuget将寻找像以下目录:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SuperCoolPackage" version="4.3.2.1" targetFramework="net452" />
</packages>
无论&#34;。\ packages \ SuperCoolPackage.4.3.2.1 \&#34;中是否存在实际的二进制文件;目录,Nuget~think~ /假设它们在那里的文件夹名称。
有时,文件夹&#34;。\ packages \ SuperCoolPackage.4.3.2.1 \&#34;存在,它可能没有任何子文件是你需要的实际二进制文件。
您需要重新阅读有关在源代码管理中存储文件的最新建议。
https://docs.nuget.org/consume/package-restore
促进更清洁的开发者环境,同时减少 存储库大小,NuGet提供了一个包恢复功能 在构建项目之前安装所有引用的包 确保所有依赖项都可用于项目 要求将它们存储在源代码管理中。
所以这就是你想要的源代码控制。
。\ packages \ repositories.config
这个&#34;。\ packages \&#34; 下的和NO子文件夹
然后你将运行
nuget.exe在构建过程中恢复MySolution.sln。
由于此&#34;。\ packages \&#34;下没有子文件夹,因此会下载它们。 (并在本地缓存它们,所以只是第一次真的很痛苦)
最大的跳闸点(恕我直言)正在
.\packages\SuperCoolPackage.4.3.2.1\
在源代码管理中。我建议不要在源代码管理中使用任何这些子文件夹,就像我上面提到的nuget url一样。
如果你有。\ packages \ SuperCoolPackage.4.3.2.1 \ ...要么从源代码控制中删除它..........或者写msbuild代码删除所有子文件夹,然后再运行nuget.exe恢复命令。
答案 1 :(得分:0)
"relations": {
"userDetails": {
"type": "hasOne",
"model": "UserDetail",
"foreignKey": "userDetailUserId"
},
我希望这会解决问题