Questions tagged [project.json]

project.json is the project definition file used by .NET Core in version 1.0 and earlier.

project.json will be deprecated in Visual Studio "15" and beyond. See: Changes to project.json

Additional Reading

183 questions
13
votes
2 answers

Solving error "Microsoft.NETCore.App 1.0.0 does not support framework .NETFramework,Version=v4.6.1"

I have an ASP.NET Core 1.0 complete application running using net461 references. Now I am trying to add another framework - netcoreapp1.0. For this, I have updated my project.json like this: { "userSecretsId":"", "version":"2.4.0-*", …
Sachin411
  • 155
  • 1
  • 3
  • 12
13
votes
4 answers

'prebuild' scripts in project.json doesn't run

I have a .NET 5 web application using the DNX framework, and I want to run 'npm install', 'bower install' and others, whenever I build the project. Right now I'm able to do so on publish, using 'prepublish', but it doesn't seem to work with…
user265732
  • 585
  • 4
  • 14
12
votes
2 answers

Unable to build default ASP.Net Core Web Application (.NET Core) on Visual Studio Team Services using Hosted Agent

Having created a new ASP.Net Core Web Application (.Net Core) project in Visual Studio 2015 Update 3 and checked this in to a Visual Studio Team Services git repository. I am using the release version of .Net Core and ASP.Net Core. I am now trying…
TomRay74
  • 513
  • 6
  • 17
12
votes
1 answer

Do I need Microsoft.NETCore.Platforms and Microsoft.NETCore.Runtime?

In a new ASP.NET Core RC2 class library, I have the following project.json file, where I have tried to follow the docs on How to trim your package dependencies. { "dependencies": { "Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0-rc2-final", …
Muhammad Rehan Saeed
  • 35,627
  • 39
  • 202
  • 311
12
votes
4 answers

Copy content files to output directory of DNX Console app via project.json

I've just started working with DNX 1.0.0-rc1-update1 in VS2015. My first app is a 'Console Application (package)' project. Everything works, except NLog logging. I suspect it's because the NLog.config doesn't get copied to the output folder. How can…
Alex G.
  • 2,113
  • 6
  • 25
  • 33
10
votes
2 answers

.NET Core BitBucket Pipeline Builds Fail - Wants project.json when I have .csproj

I was searching before posting but it seems that VS2017 stops using project.json and instead uses .csproj file so when I try to run builds on either TFS or BitBucket, I get fails because the builds are looking for a project.json. Specifically a…
10
votes
1 answer

Frameworks and imports sections in project.json: what are they?

What exactly are the frameworks and imports sections of the project.json file of a ASP.NET Core 1.0 project and what do they do? I've been trying to find "official" documentation to understand it better. Here's a boilerplate example from a recent…
robbpriestley
  • 3,050
  • 2
  • 24
  • 36
9
votes
5 answers

Unable to restore a ASP.NET Core 1.0 RTM solution

I just converted a working RC2 web application to RTM and I have some issues publishing on IIS. All the samples I have found are based on a NetCoreApp1.0 application. Due to some requirements, we are restricted to "net46". Here is the…
Kralizek
  • 1,999
  • 1
  • 28
  • 47
9
votes
3 answers

Run ASP.NET Core application in "Development" environment

I am using ASP.NET Core RC2 and when I run dotnet run my application always runs in "Production". I am not able to change it to "Development". I have the following launchSettings.json file: { "iisSettings": { "windowsAuthentication": false, …
Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
9
votes
3 answers

EF 6 with a dnx project

I have a new ASP.net 5 dnx class library I am using for entity framework. I need to target EF 6 because some features I need are not in EF 7. First the EF tools (like enable-migration) were not there. I added an old style class library and…
Don Chambers
  • 3,798
  • 9
  • 33
  • 74
9
votes
2 answers

Reference a class library from UWP and ASP.NET 5

I am trying to create a class library that'll contain common objects (mainly DTOs) of a WebAPI (using ASP.NET 5) and a consuming UWP App. However, I have not yet figured out how to create the class library such that it can be referenced from both…
Henrik Ilgen
  • 1,879
  • 1
  • 17
  • 35
9
votes
2 answers

Asp.Net 5: How to load assembly version from project.json file?

I've the project.json file with a version specified as { "version": "1.0.0-*" } How can I read it in code?
tmm360
  • 404
  • 4
  • 13
8
votes
1 answer

How to let a Visual Studio 2015 xproject (project.json) reference the highest framework of a depending project

I'm creating a reusable library that targets several platforms (.NET 4.0, .NET 4.5, .NETStandard 1.0 and .NETStandard 1.3). The .NET 4.5 version of this project contains some features that are not available under the .NET 4.0 version. The unit test…
Steven
  • 166,672
  • 24
  • 332
  • 435
8
votes
4 answers

Dependency specified was X but ended up with Y

I've updated a class library's project.json to target netstandard1.3 and net64. With that change: $ dotnet restore log : Restoring packages warn : Dependency specified was NETStandard.Library (>= 1.3.0) but ended up with NETStandard.Library…
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
8
votes
1 answer

Why can't I use embedded resources (resx) when targeting .netstandard 1.3?

(Question subtitle: Are resources not supported in .netstandard 1.3 or is my project file just messed up?) I just created an example portable class library in Visual Studio 2015 Update 3 and added a sample resource file. Initially, the file…
ventiseis
  • 3,029
  • 11
  • 32
  • 49
1
2
3
12 13