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
2
votes
0 answers

Intellisense for C# Not Working For Visual Studio Code

I am using OSX and when I first create the project using dotnet Intellisense works fine, it's when I close the application is when it never works again with the same message coming up: When I open up the output this is what it shows: Any help…
2
votes
2 answers

Enabling StyleCop.Analyzers on ASP.NET Core projects

According to the docs I've read online all you need to do is add the following to the dependencies in project.json: "version": "1.0.0-*", "dependencies": { "DependencyA": "1.0.0-*", "DependencyB": "1.0.0-*", "StyleCop.Analyzers": { …
Tudor
  • 61,523
  • 12
  • 102
  • 142
2
votes
1 answer

AspNetCore namespace doesnt exist

I'm following this course to learn ASP.NET Core. I did exactly as they did, I can type dotnet new and dotnet restore. I also installed the dotnetcore 1.0.1 SDK preview. All seems fine, and I should be able to type using…
Peter
  • 2,043
  • 1
  • 21
  • 45
2
votes
0 answers

How to handle project.json when creating multiple versions of a .NET class library

I have a .NET class library project that targets UWP applications. I wish to re-purpose it to also support Xamarin.Forms applications. Initially, I imagined that I could achieve this by creating a new .csproj file, in the same directory as the…
Tim Coulter
  • 8,705
  • 11
  • 64
  • 95
2
votes
1 answer

project.json "version" autoincrement

I need to automatically update product version of the dll into which my app is compiled every time. In project.json: "version": "1.0.0-*", It doesn't work and if fact I doubt whether I'm doing right. Also I tried to use Automatic Versions extension…
Slip
  • 593
  • 1
  • 7
  • 21
2
votes
1 answer

Referencing a .NET 4.5.2 class library in .Net Standard 1.6 project

This scenario might be weird. But i want to reference an existing .NET 4.5.2 class library into a new .Net Standard 1.6 class library using Nuget. I cannot see the .Net 4.5.2 class library in Nuget package store at all. I don't want to migrate any…
Venkata Dorisala
  • 4,783
  • 7
  • 49
  • 90
2
votes
1 answer

Why do VS 2015 .Net Core apps specify the NetStandardLibrary and not the Core 1.0 library?

Visual Studio 2015 (with the support for .NET Core added on) gives you the option of creating a .NET Core library, or a .NET Core console app. If you do so, and look at the project's .json file, it looks like it's "limiting" you to the api defined…
Michael Ray Lovett
  • 6,668
  • 7
  • 27
  • 36
2
votes
1 answer

Reference a .NET 3.5 DLL from ASP.NET Core project

I have a DLL compiled under .NET 3.5 which represents a POCO data model. The client application is limited to .NET 3.5 and the DLL must be shared by both the client and server, so recompiling the DLL isn't an option. I am attempting to rewrite the…
McGuireV10
  • 9,572
  • 5
  • 48
  • 64
2
votes
1 answer

Dev dependency with dotnet core

My library (NetMQ) have a dependency on JetBrains.Annotations, however I want it to be only a dev dependency and don't want it to appear on the nuspec file generated with "dotnet pack". How can I set a dependency a dev dependency with project.json?
somdoron
  • 4,653
  • 2
  • 16
  • 24
2
votes
2 answers

.NET Core project.json commands - Set ASPNETCORE_ENVIRONMENT

From command line, if I run set ASPNETCORE_ENVIRONMENT=Development && dotnet watch run, my Hosting environment is set to Development. However, if I add the same line as a command to my project.json file, the hosting environment for the watcher is…
Tyson Nero
  • 2,048
  • 5
  • 26
  • 36
2
votes
2 answers

How to get the output path of a .NET Core app via MSBuild?

I have a .NET Core project that targets the .NET Framework as per my project.json file; "frameworks": { "net461": { "dependencies": { } } } I am trying to find a way to copy some (native) dependencies to my output build directory but…
Robula
  • 649
  • 1
  • 12
  • 29
2
votes
1 answer

Targeting Multiple Runtimes When Publishing a .NET Core App

I want to create a self contained web application using .NET Core. I want to target any version of Windows and have this in my project.json: "runtimes": { "win10-x64": { }, "win8-x64": { }, "win7-x64": { } } When I run dotnet publish…
Muhammad Rehan Saeed
  • 35,627
  • 39
  • 202
  • 311
2
votes
1 answer

Error that reference is missing when it seems to be added to project

I am poking around ASP.Net MVC 5/ASP.Net Core and am getting errors when trying to build the project. The error is simple enough on its own: Error CS0234 The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing…
glosrob
  • 6,631
  • 4
  • 43
  • 73
2
votes
1 answer

Project.json AutoMoq cannot resolve Moq 4.1

I am trying to use AutoFixture.AutoMoq 3.40.0 with Moq 4.2.1510.2205 in an ASP.Net 5.0 project but I'm hitting the problem that; The dependency moq >= 4.1.1308.2120 could not be resolved. This is weird because AutoFixture.AutoMoq depends on moq…
flytzen
  • 7,348
  • 5
  • 38
  • 54
2
votes
1 answer

Does the project.json file support using environment variables in paths?

We are using ODP.NET and we need to refer to the Oracle.DataAccess.dll in our project.json. Unfortunately, not all developers on our team have ODP.NET installed to the same path, but we do have an environment variable which tells the location of the…
Damian
  • 2,709
  • 2
  • 29
  • 40