Cannot Find File .deps.json
Steps to reproduce
Using a non-trivial STANDALONE aspnet application with many project dependencies publish to win7-x64 runtime and ensure output directory is not the default. run the resultant exe that is produced
Expected behavior
Kestrel should start and run normally
Actual behavior
An exception is produced saying that .deps.json is not found. (It doesn't exist in the directory) Copy the .deps.json from the intermediate folder and the application runs as expected.
Environment data
.NET Command Line Tools (1.0.0-rc2-002543)
Product Information: Version: 1.0.0-rc2-002543 Commit Sha: 38d0c28a1e
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64
Additional Information
Exception

deps.json
Just downloaded the latest bit and the same it true here....
.NET Command Line Tools (1.0.0-rc2-002586)
Product Information: Version: 1.0.0-rc2-002586 Commit Sha: ac5432bff2
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64
@jamesgibbs100
Could you quickly provide a project.json and the command line you are using to publish (there are multiple options to redirect the output directory)
Moving this to rtm for now as we have tests covering Kestrel usage, and it's not clear what the issue is here yet.
Hi there,
The command line is this
dotnet publish D:\VNM\Targets\Acct_1.0.0.rc2-20221_2016_04_19\src\Eze.Ims.Accounting.Ibor.ServicesHost\project.json --configuration Debug --runtime win7-x64 --output D:\VNM\Targets\Acct_1.0.0.rc2-2022
1_2016_04_19\artifacts\publish\Eze.Ims.Accounting.Ibor.ServicesHost\win7-x64
As part of my build script I manually copy the deps.json file into the --output directory specified above. If not there then the exception occurs
project.json attached project.json.zip
+1 also experiencing same issue. Happening after creating a new ASP.NET core application via Visual Studio 2015 Update 2.
OK just to add something more RE this issue:
If you have spacing in the name of your project, the .deps.json file appears to take the last word of your project, which is fine, however, if you copy out the file in the intermediate folder as suggested by @jamesgibbs100 you receive a lot of errors stating "CS1022 Type or namespace definition, or end-of-file expected". If you rename your project to be just one word, and perform the same operation, it compiles fine
I noticed this when the containing folder name for my project contained spaces. I removed all spaces from the project name and files, but I could not compile until I also removed a white space in the folder that the project was located in.
Is the issue here that white space in the project name causes an incorrectly named deps.json file?
Is the same true for the .dll produced in the output folder?
Hi @brthor
For myself, the deps.json file wasn't created in my project folder, and I had to copy it from the obj folder into my project folder or otherwise I received errors that it was missing.
Can you confirm whether this is expected of us, or is the dotnet tooling looking for the deps.json file in the wrong place?
Once copied, when I tried building I got the CS1022 errors. However, after changing the project name to be a single word, the build succeeded.
Just checked regarding the .dll - no dll's have been created at this point when the build fails and the bin\Debug\netcoreapp1.0 directory is empty.
The issues as I see them are:
- Dotnet tooling looking for deps.json file in project folder and should look in
objdirectory. - deps.json file causes build error due to CS1022 if project name has multiple words separated by whitespace.
Thanks,
Ian
I had this error as well, and renaming the project to just one word solved it (although I needed to manually go into files and change paths based on the project name (I use Visual Studio)).
Same error on scaffolding, renamed project without spaces and worked
Also had the same issue. Simply removing the space on Project directory & internal name fixed it.
Same issue.
I had the same issue and it turned out to be a space in the name or description found in the project.json file: { name: "Project Name" -> changing this to ProjectName corrected it. ...
I have it with a project name like: Project.Name.WebService
@NPadrutt I also have a project with a similar name but when I updated the project.json file as above it corrected the problem for me.
@erslater I don't have any name or description tage in my project.json as far as I can see.
@NPadrutt can you post your project.json file.
@erslater sure:
{
"dependencies": {
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
"Microsoft.NETCore.App": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
"Microsoft.AspNetCore.AzureAppServicesIntegration": "1.0.0",
"Microsoft.EntityFrameworkCore.Design": "1.1.0"
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"runtimes": {
"win10-x64": {},
"win81-x64": {},
"win8-x64": {},
"win7-x64": {}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"userSecretsId": "aspnet-FriendsAppDate.WebService-20161122034507"
}
I solved it for now with copying the .deps file one folder hierarchy up. to the folder it looks for it. that solved it so far.
You issue is with "frameworks": { "netcoreapp1.0": {. I had this issue as well. This is used in the folder structure. It took a while for me to find it and it also can make a difference if you use 1.1.0. Just make sure it matches your folder structure.
There is also a newer version of the tools: "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final"
On Fri, Nov 25, 2016 at 9:45 AM, Nino Padrutt [email protected] wrote:
@erslater https://github.com/erslater sure:
{ "dependencies": { "Microsoft.AspNetCore.Mvc": "1.1.0", "Microsoft.AspNetCore.Routing": "1.1.0", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", "Microsoft.Extensions.Configuration.Json": "1.1.0", "Microsoft.Extensions.Logging": "1.1.0", "Microsoft.Extensions.Logging.Console": "1.1.0", "Microsoft.Extensions.Logging.Debug": "1.1.0", "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0", "Microsoft.NETCore.App": "1.1.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final", "Microsoft.AspNetCore.AzureAppServicesIntegration": "1.0.0", "Microsoft.EntityFrameworkCore.Design": "1.1.0" },
"tools": { "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final" }, "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } }, "runtimes": { "win10-x64": {}, "win81-x64": {}, "win8-x64": {}, "win7-x64": {} }, "buildOptions": { "emitEntryPoint": true, "preserveCompilationContext": true }, "runtimeOptions": { "configProperties": { "System.GC.Server": true } }, "publishOptions": { "include": [ "wwwroot", "**/*.cshtml", "appsettings.json", "web.config" ] }, "scripts": { "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] }, "userSecretsId": "aspnet-FriendsAppDate.WebService-20161122034507"}
I solved it for now with copying the .deps file one folder hierarchy up. to the folder it looks for it. that solved it so far.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dotnet/cli/issues/2802#issuecomment-262970359, or mute the thread https://github.com/notifications/unsubscribe-auth/ADP8zJkjiCMgvVw6DoO7Y-_VlbhqyeDnks5rBvScgaJpZM4IVB0M .
ah, I see. I will try it out :)