I'm having some dependency issues installing Breeze.
I installed the ASP.NET and Web Tools 2012.2 update into Visual Studio 2012 and then installed Angular into a freshly made ASP.NET Web API project and when I try to install the Breeze nuget package it bombs out with this error.
Install failed. Rolling back... Install-Package : Failed to add
reference to 'System.Web.Http.OData'. At line:1 char:16
+ Install-Package <<<< Breeze.WebApi
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Here is the full install attempt from the command line including all the dependencies it is attempting to resolve.
Install-Package Breeze.WebApi
Attempting to resolve dependency 'Microsoft.AspNet.WebApi'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 4.0.20710.0 && < 4.1)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 4.0.20710.0 && < 4.1)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0 && < 4.1)'.
Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.0.20710.0 && < 2.1)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.6)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.OData'.
Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.2.0 && < 6.0.0)'.
Attempting to resolve dependency 'System.Spatial (= 5.2.0)'.
Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.2.0)'.
Attempting to resolve dependency 'WebActivator'.
Attempting to resolve dependency 'EntityFramework (≥ 4.4 && < 6.0)'.
Attempting to resolve dependency 'Q'.
You are downloading Microsoft.AspNet.WebApi.OData from Microsoft....
Successfully installed 'Microsoft.AspNet.WebApi.OData 4.0.1'.
Successfully installed 'WebActivator 1.5.3'.
Successfully installed 'Q 0.9.2'.
Successfully installed 'Breeze.WebApi 1.2.8'.
Successfully removed 'Microsoft.AspNet.WebApi.OData 4.0.0' from CrashBangZoom.WebApi.
Install failed. Rolling back...
Install-Package : Failed to add reference to 'System.Web.Http.OData'.
At line:1 char:16
+ Install-Package <<<< Breeze.WebApi
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I didn't have a problem - I just installed Angular (stable) and Breeze (stable) into a TestMVC project using NuGet on Windows 8 x64 machine. There is an acceptance prompt that displays before it is installed (OData-related) and it does use powershell to install - so you should check to make sure that is installed.
------- Installing...Breeze.WebApi 1.2.8 -------
Attempting to resolve dependency 'Microsoft.AspNet.WebApi'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 4.0.20710.0 && < 4.1)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 4.0.20710.0 && < 4.1)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0 && < 4.1)'.
Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.0.20710.0 && < 2.1)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.6)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.OData'.
Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.2.0 && < 6.0.0)'.
Attempting to resolve dependency 'System.Spatial (= 5.2.0)'.
Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.2.0)'.
Attempting to resolve dependency 'WebActivator'.
Attempting to resolve dependency 'EntityFramework (≥ 4.4 && < 6.0)'.
Attempting to resolve dependency 'Q'.
Added file 'System.Web.Http.OData.dll' to folder 'Microsoft.AspNet.WebApi.OData.4.0.1\lib\net40'.
Added file 'System.Web.Http.Odata.xml' to folder 'Microsoft.AspNet.WebApi.OData.4.0.1\lib\net40'.
Added file 'Microsoft.AspNet.WebApi.OData.4.0.1.nuspec' to folder 'Microsoft.AspNet.WebApi.OData.4.0.1'.
Added file 'Microsoft.AspNet.WebApi.OData.4.0.1.nupkg' to folder 'Microsoft.AspNet.WebApi.OData.4.0.1'.
Successfully installed 'Microsoft.AspNet.WebApi.OData 4.0.1'.
Added file 'WebActivator.dll' to folder 'WebActivator.1.5.3\lib\net40'.
Added file 'WebActivator.1.5.3.nuspec' to folder 'WebActivator.1.5.3'.
Added file 'WebActivator.1.5.3.nupkg' to folder 'WebActivator.1.5.3'.
Successfully installed 'WebActivator 1.5.3'.
Added file 'q.js' to folder 'Q.0.9.2\content\Scripts'.
Added file 'q.min.js' to folder 'Q.0.9.2\content\Scripts'.
Added file 'NuGet.exe' to folder 'Q.0.9.2'.
Added file 'Q.0.9.2.nuspec' to folder 'Q.0.9.2'.
Added file 'Q.0.9.2.nupkg' to folder 'Q.0.9.2'.
Successfully installed 'Q 0.9.2'.
Added file 'BreezeWebApiConfig.cs.pp' to folder 'Breeze.WebApi.1.2.8\content\App_Start'.
Added file 'breeze.debug.js' to folder 'Breeze.WebApi.1.2.8\content\Scripts'.
Added file 'breeze.intellisense.js' to folder 'Breeze.WebApi.1.2.8\content\Scripts'.
Added file 'breeze.min.js' to folder 'Breeze.WebApi.1.2.8\content\Scripts'.
Added file 'Breeze.WebApi.dll' to folder 'Breeze.WebApi.1.2.8\lib'.
Added file 'Irony.dll' to folder 'Breeze.WebApi.1.2.8\lib'.
Added file 'readme.txt' to folder 'Breeze.WebApi.1.2.8'.
Added file 'install.ps1' to folder 'Breeze.WebApi.1.2.8\tools'.
Added file 'Breeze.WebApi.1.2.8.nuspec' to folder 'Breeze.WebApi.1.2.8'.
Added file 'Breeze.WebApi.1.2.8.nupkg' to folder 'Breeze.WebApi.1.2.8'.
Successfully installed 'Breeze.WebApi 1.2.8'.
Removed reference 'System.Web.Http.OData.dll' from project 'MvcApplication1'
Added file 'packages.config'.
Successfully removed 'Microsoft.AspNet.WebApi.OData 4.0.0' from MvcApplication1.
Added reference 'System.Web.Http.OData' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'Microsoft.AspNet.WebApi.OData 4.0.1' to MvcApplication1.
Added reference 'WebActivator' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'WebActivator 1.5.3' to MvcApplication1.
Added file 'q.min.js' to folder 'Scripts'.
Added file 'Scripts\q.min.js' to project 'MvcApplication1'
Added file 'q.js' to folder 'Scripts'.
Added file 'Scripts\q.js' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'Q 0.9.2' to MvcApplication1.
Added file 'breeze.min.js' to folder 'Scripts'.
Added file 'Scripts\breeze.min.js' to project 'MvcApplication1'
Added file 'breeze.intellisense.js' to folder 'Scripts'.
Added file 'Scripts\breeze.intellisense.js' to project 'MvcApplication1'
Added file 'breeze.debug.js' to folder 'Scripts'.
Added file 'Scripts\breeze.debug.js' to project 'MvcApplication1'
Added file 'BreezeWebApiConfig.cs' to folder 'App_Start'.
Added file 'App_Start\BreezeWebApiConfig.cs' to project 'MvcApplication1'
Added reference 'Breeze.WebApi' to project 'MvcApplication1'
Added reference 'Irony' to project 'MvcApplication1'
Added file 'packages.config'.
Successfully added 'Breeze.WebApi 1.2.8' to MvcApplication1.
Executing script file 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Breeze.WebApi.1.2.8\tools\install.ps1'.
Removed file 'System.Web.Http.OData.dll' to folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib\net40'.
Removed file 'System.Web.Http.Odata.xml' to folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib\net40'.
Removed folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib\net40'.
Removed folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0\lib'.
Removed file 'Microsoft.AspNet.WebApi.OData.4.0.0.nuspec' to folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0'.
Removed file 'Microsoft.AspNet.WebApi.OData.4.0.0.nupkg' to folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0'.
Removed folder 'C:\Users\andrew\Documents\Visual Studio 2012\Projects\packages\Microsoft.AspNet.WebApi.OData.4.0.0'.
Successfully uninstalled 'Microsoft.AspNet.WebApi.OData 4.0.0'.
==============================
Related
I created a project in dot-net core 3.0.100. but i got mysterious error while try to run the project, this occurred after i installed few packages which listed bellow.
- > Microsoft.AspNet.WebApi.Core 5.2.7 5.2.7
- > Microsoft.AspNetCore.Mvc 2.2.0 2.2.0
- > Microsoft.AspNetCore.Razor.Language 2.2.0 2.2.0
- > Microsoft.EntityFrameworkCore 3.1.0 3.1.0
- > Microsoft.EntityFrameworkCore.Design 3.1.0 3.1.0
- > Microsoft.EntityFrameworkCore.Tools 3.1.0 3.1.0
- > Npgsql.EntityFrameworkCore.PostgreSQL 3.1.0 3.1.0
- > Swashbuckle.AspNetCore 5.0.0-rc4 5.0.0-rc4
ERROR MESSAE IN DETIL
[![D:\AngularAdmin-panel\API\API.csproj : warning NU1701: Package 'Microsoft.AspNet.WebApi.Core 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.0'. This package may not be fully compatible with your project.
D:\AngularAdmin-panel\API\API.csproj : warning NU1701: Package 'Microsoft.AspNet.WebApi.Core 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.0'. This package may not be fully compatible with your project.
C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets(404,5): warning RAZORSDK1006: Detected Razor language version downgrade. This is typically caused by a reference to the Microsoft.AspNetCore.Razor.Design package. Consider removing this package reference. \[D:\AngularAdmin-panel\API\API.csproj\]
CSC : warning CS8034: Unable to load Analyzer assembly C:\Users\DEV4\.nuget\packages\microsoft.aspnetcore.mvc.analyzers\2.2.0\analyzers\dotnet\cs\Microsoft.AspNetCore.Mvc.Analyzers.dll : Assembly with same name is already loaded \[D:\AngularAdmin-panel\API\API.csproj\]
Startup.cs(29,16): error CS0246: The type or namespace name 'IConfigurtion' could not be found (are you missing a using directive or an assembly reference?) \[D:\AngularAdmin-panel\API\API.csproj\]
The build failed. Fix the build errors and run again.][1]][1]
I am running application on grails 1.3.4 but I am getting this error while running applicaton.
Base Directory: /projects/upwork/jhon/jbilling-community-3.1.0_2
WARNING: Configurational method [inherits] in grails-app/conf/BuildConfig.groovy doesn't exist. Ignoring..
Resolving dependencies...
Dependencies resolved in 804ms.
Running script /apps/grails-1.3.4/scripts/RunApp.groovy
Environment set to development
Plugin [release-2.2.1] not installed. ...
Plugin [release-1.0.0] not installed. ...
Plugin [rest-client-builder-1.0.3] not installed. ...
Resolving new plugins. Please wait... ...
Installing zip /Users/bilalshah/.ivy2/cache/org.grails.plugins/release/zips/release-2.2.1.zip... ...
[mkdir] Created dir: /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
[unzip] Expanding: /Users/bilalshah/.ivy2/cache/org.grails.plugins/release/zips/release-2.2.1.zip into /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
Installed plugin release-2.2.1 to location /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1. ...
Plugin release-2.2.1 requires version [2.0 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails.
[delete] Deleting directory /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
Process finished with exit code 1
I haven't mentioned any plugin named above in my application.properties file. Here it is:
#Grails Metadata file
#Wed Jun 15 19:34:11 PKT 2016
app.grails.version=1.3.4
app.name=jbilling
app.servlet.version=2.4
app.version=community-3.1.0
plugins.cookie=0.2
plugins.cxf=0.5.1
plugins.hibernate=1.3.4
plugins.include=0.3
plugins.jquery=1.11.1
plugins.jquery-ui=1.8.7
plugins.log4j-xml=0.2
plugins.remote-pagination=0.2.4
plugins.remoting=1.1
plugins.spring-security-core=1.0.1
plugins.tomcat=1.3.4
plugins.webflow=1.3.8
Can anyone let me know why it is happening and its solution.
When I try to add the package 'Breeze.Server.WebApi2' thru my package.json:
"dependencies": {
...
"System.Threading": "4.0.11-beta-23516",
"AutoMapper": "4.2.0",
"Breeze.Server.WebApi2": "1.5.4"
},
I get the error:
Restoring packages for D:\VSProjects\(...)\project.json
Unable to locate Dependency WebActivator
Writing lock file D:\VSProjects\(...)\project.lock.json
Restore complete, 354ms elapsed
Restoring packages for D:\VSProjects\(...)\project.json
Unable to locate Dependency WebActivator
Writing lock file D:\VSProjects\(...)\project.lock.json
Restore complete, 562ms elapsed
The nuget page of 'WebActivator' says it is deprecated...
I've already tried installing the package 'WebActivatorEx' but that didn't help.
How can I get the package installed? Is there another version?
Get the latest version, 1.5.5, just released yesterday. The dependency is changed to WebActivatorEx.
I am using Bamboo and MSBuild and enabled restore packages.
When I run it it does not restore all pacakges when I see logs it restore some pacakges but does not all projects pacakges in solution... is there anything I need to fix in MS Build script?
Full Error Log:
http://justpaste.it/oq2p
Error Log:
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).
So if your repositories.config file contains something like this:
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path=".\MyCsProj\packages.config" />
</repositories>
And your MyCsProj\packages.config file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SuperCoolPackage" version="4.3.2.1" targetFramework="net452" />
</packages>
Nuget is going to look for a directory like:
.\packages\SuperCoolPackage.4.3.2.1\
Regardless of whether or not there are the actual binaries in the ".\packages\SuperCoolPackage.4.3.2.1\" directory, Nuget ~thinks~/assumes they are there by the name of the folder.
So sometimes, while the folder ".\packages\SuperCoolPackage.4.3.2.1\" exists, it may not have any child-files that are the actual binaries you need.
You need to re-read the latest suggestions for storing files in source control.
https://docs.nuget.org/consume/package-restore
To promote a cleaner developer environment while also reducing
repository size, NuGet offers a Package Restore feature that will
install all referenced packages before a project is built, thereby
ensuring that all dependencies are available to a project without
requiring them to be stored in source control.
So here's what you want in source control.
.\packages\repositories.config
and NO subfolders under this ".\packages\"
Then you will run
nuget.exe restore MySolution.sln during the build process.
Because there are NO subfolders under this ".\packages\", it will download them. (and cache them locally so only the first time is really painful)
The biggest tripping point (IMHO) is having
.\packages\SuperCoolPackage.4.3.2.1\
in source control. I recommend NOT having any of these subfolders in source control, as per the nuget url I mention above.
If you have .\packages\SuperCoolPackage.4.3.2.1\ ... either remove it from source control..........or write msbuild code to delete all subfolders before running the nuget.exe restore command.
"C:\Program Files (x86)\NuGet\nuget.exe" restore ${bamboo.build.working.directory}\MySolution.sln"
I hope this will resolve issue
I recently added a test project to an ASP.NET 5.0 project. The tfs build server is unable to find assemblies for my test project. project.json file below
{
"version": "1.0.0-*",
"description": "ConfigTests test project",
"authors": [ "" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-beta6",
"xunit": "2.1.0-beta4-build3109",
"xunit.runner.dnx": "2.1.0-beta4-build134",
"Moq": "4.2.1507.118",
"ConfigSvc": "3.0.0-*",
"FluentAssertions": "3.5.0"
},
"commands": {
"test": "xunit.runner.dnx"
},
"frameworks": {
"dnx451": { }
}
}
The build outputs errors as such.
Unable to resolve dependency Microsoft.AspNet.Mvc 6.0.0-beta6
Unable to resolve dependency xunit 2.1.0-beta4-build3109
Unable to resolve dependency xunit.runner.dnx 2.1.0-beta4-build134
Unable to resolve dependency Moq 4.2.1507.118
Unable to resolve dependency FluentAssertions 3.5.0
Unable to resolve dependency Microsoft.AspNet.Server.IIS 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Server.WebListener 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.StaticFiles 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Diagnostics 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.DataProtection 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication.Cookies 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication.OpenIdConnect 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Authentication.OAuthBearer 1.0.0-beta6
Unable to resolve dependency Microsoft.AspNet.Cors 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Configuration 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Configuration.Json 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.DependencyInjection 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.OptionsModel 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Runtime 1.0.0-beta6
Unable to resolve dependency Microsoft.Framework.Logging 1.0.0-beta6
Unable to resolve dependency Newtonsoft.Json 7.0.1
Using Assembly dependency framework/fx/mscorlib 4.0.0.0
Source: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll
Using Assembly dependency framework/fx/System 4.0.0.0
Source: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll
Using Assembly dependency framework/fx/System.Core 4.0.0.0
Source: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll
Using Assembly dependency framework/fx/Microsoft.CSharp 4.0.0.0
The build command is as follows:
C:\Users\build.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5\bin\dnx.exe --appbase "C:\Builds\2\A\CI_Config\src\Config\ConfigSvc\ConfigSvcTests" "C:\Users\build.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5\bin\lib\Microsoft.Framework.PackageManager\Microsoft.Framework.PackageManager.dll" pack "C:\Builds\2\A\CI_Config\src\Config\ConfigSvc\ConfigSvcTests" --configuration Release --out "C:\Builds\2\A\CI_Config\bin"
my project doesnt reference most of these assemblies. I'm curious as to where the tfs build agent is looking for the assemblies. Maybe I am missing something crucial here about dependencies with the project.json file
With regard to the dependencies, those mostly look like dependencies
of Microsoft . AspNet . Mvc which is in your dependency list. As I
understand it you only reference the top level dependencies in your
project.json and the lower level dependencies are worked out. I think that is what you are seeing. InVS 2015 you can drill down on
the dependencies.
To the error: I have not tested it but it seems likely you are running into issues because you are referencing beta6 but are using beta5 dnx in your
build command.
Some useful links:
http://jameschambers.com/2015/07/asp-net-5-beta-6-is-in-the-wild/
http://www.joshgraham.com/upgrading-from-asp-net-beta-5-to-beta-6/
http://davidfowl.com/diagnosing-dependency-issues-with-asp-net-5/