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
1
vote
2 answers

Unable to resolve some dependencies when install Stormpath for .net core

When I install Stormpath for .NET Core through the package console I have these errors: Unable to resolve 'Stormpath.Owin.Views.Precompiled (>= 0.4.4)' for '.NETFramework,Version=v4.5.2'. Unable to resolve 'Stormpath.Owin.Abstractions (>= 1.7.2)'…
1
vote
1 answer

Error The type or namespace name 'Networking' does not exist in the namespace 'Windows' in UWP target, how to fix project.json in multi-target project

I can't figure out how to make UWP target build in my project (class library) which defines "netstandard1.3" and "uap10.0" targets. I was successfully able to build UWP project if I create it as a separate project of UWP type in Visual Studio 2015…
Alex
  • 2,469
  • 3
  • 28
  • 61
1
vote
0 answers

Reference netstandard library from net20 app

I've got a .NET 2.0 framwork console app. How do I reference a netstandard1.0 library from this one? I'm doing project.json like so "frameworks": { "net20": {} } And getting this error Project Reproducer is not compatible with net20…
vidstige
  • 12,492
  • 9
  • 66
  • 110
1
vote
2 answers

Can two project.json files share the same codebase?

I have some codebase from which I want to build a .NET Core library and a UWP library. Initially, I wanted to build a single lib which would serve for both but I didn't find a way for this (in UWP case, the lib needs to reference UWP specific…
Alex
  • 2,469
  • 3
  • 28
  • 61
1
vote
3 answers

Output to file using GIT in .NET project.json file

I am trying to save a git command output to a file before compiling, of an asp.net-core project. In the "project.json" file I have the following, which should output the latest git tag to an output file (for versioning): "scripts": { …
David Smit
  • 829
  • 1
  • 13
  • 31
1
vote
1 answer

How to tell Visual Studio which runtime to build for

How can I tell Visual Studio to build against multiple runtimes? I've created a simple .NET Core (1.0) console application (Hello World with HTTP download). I want to build it for multiple RIDs (win7-x64, win10-x64, etc) so that I can publish it and…
Haukman
  • 3,726
  • 2
  • 21
  • 33
1
vote
1 answer

using moq with asp.net core while unit testing

I am trying to write a very simple unit test in asp.net core using moq and xunit. But I am getting a error when I run the unit test. StackTrace: at Moq.Mock1..ctor(MockBehavior behavior, Object[] args) at Moq.Mock1..ctor(MockBehavior behavior) …
maxspan
  • 13,326
  • 15
  • 75
  • 104
1
vote
1 answer

Getting Could not load file or assembly 'System.Core, Version=4.0.0.0..' While doing unit testing in asp.net core with moq

I am having a very simple unit test. when I run the test I get the exception Could not load file or assembly 'Could not load file or assembly 'System.Core, Version=4.0.0.0..' This error started appearing after I added …
maxspan
  • 13,326
  • 15
  • 75
  • 104
1
vote
1 answer

PostSharp and project.json

Is there any way to specify an absolute path in the SearchPath property of PostSharp? My solution is using project.json for our NuGet packages and it stores all of the packages in your user profile (%USERPROFILE%\.nuget\packages). I've tried…
Peter Kjaer
  • 4,316
  • 13
  • 23
1
vote
0 answers

Nancy Rendering Embedded views with .Net Core

I've jumped many hurdles, but alas I still see the default 404 iamge rendered by Nancy. I've 'mastered' project.json so I can embed my assets (including /assets/views/index.html), using the following block in the project.json file: "buildOptions":…
penderi
  • 8,673
  • 5
  • 45
  • 62
1
vote
0 answers

buildOptions in project.json: how to calculate the files to compile, embed or copy

For buildOptions in project.json, there are similar configurations to set the files to be compiled, to be embedded into assembly as resource files and to be copied to output directory. { include:"..", includeFiles: "...", exclude:…
Artech
  • 11
  • 3
1
vote
1 answer

Nuget pack 3.4.3 csproj + project.json include dependencies

I am trying to change packages.config into csproj + project.json for managing nuget packages. I've noticed one important change - when using nuget pack it's excluding all dependencies by default while with packages.config it was including them…
MistyK
  • 6,055
  • 2
  • 42
  • 76
1
vote
2 answers

Asp.net Core RC2 not detecting Reference to nuget package

Im using Clean RC2 Template for web application. after adding Reference to System.linq it gives me this : Im using 461 as framework.
Ahad Porkar
  • 1,666
  • 2
  • 33
  • 68
1
vote
1 answer

ASP.NET Core project.json frameworks

With ASP.NET Core web (and even .NET Core) applications, there is a project.json file. This JSON files schema is maintained in the schema-store where several variations exist. Additionally, this file was detailed here at one point in time but now…
David Pine
  • 23,787
  • 10
  • 79
  • 107
1
vote
0 answers

Cross compile for dotnet45 and dnxcore50

I am working on a library and I want to be able to compile it for the traditional .NET Framework, but also for .NET core. I started out with a classic VS solution that worked fine for .NET Framework 4.5. Then I added a project.json file that looked…
Ramon de Klein
  • 5,172
  • 2
  • 41
  • 64