Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.deps.json could not be found

Tags:

.net

Follow this menu sequence:

File -> New -> Project -> ASP>NET Core Web Application (.Net Framework)

Build -> Build Solution

Get this error:

Error C:\Users\Sam\Documents\Visual Studio 2015\Projects\RC2 Test\src\RC2 Test\error CS2001: Source file 'C:\Users\Sam\Documents\Visual Studio 2015\Projects\RC2 Test\src\RC2 Test\Test.deps.json' could not be found. RC2 Test C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets 241

Searching for test.deps finds nothing.

Is "test" a hardcoded name for a unit test project?
dotnet --version says 1.0.0.0-preview1-002702

Edit:

I repeated the above steps but this time I selected Core Web Application (.Net Core). I get the same error.

Looks like we cant use spaces in project names.


2 Answers

I have the same issue, but I created a project with name "MyprojectWithoutSpaces" and the issue is gone. I suppose is a problem in the RC version

like image 138
Juan_Chanclas Avatar answered Sep 08 '25 19:09

Juan_Chanclas


If you end up here after having similar problems running unit tests in a devops pipeline, you can fix the problem by ignoring the /ref directory in your test pipeline using the following pattern under Test files:

!**\ref\**

This ensures the pipeline ignores the extra test dll in the ref directory.

like image 44
James Blake Avatar answered Sep 08 '25 20:09

James Blake