dotnet-cli

How do I build a native binary on .NET Core using the current preview?

女生的网名这么多〃 提交于 2019-12-03 22:59:34
Using the current .NET Core preview, how do I compile (Publish ?) a native binary for a console application. I am on Mac OS 10.11. I did the following: dotnet new dotnet restore dotnet publish I kind of expected "publish" to build a native binary for me, but it did not. It places a .dll, along with some JSON, in the publish folder ? I should mention the application runs fine when using dotnet run . So, how do I get a native binary for my simple console application ? According to an MS dev on the Slack channel, native compilation was removed/disabled in RC2 since it wasn't deemed ready yet.

EF Core Error - No project was found. Change the current working directory or use the --project option

允我心安 提交于 2019-12-03 19:11:16
问题 I am using Visual Studio 2015 and dotnet core and trying to develop an EF Core Code First project using Sqlite and this documentation / tutorial, which also uses Sqlite => NET Core - New Database When I try to add an initial migration from the command line ( I am CD-ed into the folder that my data model project is located in) by issuing the following command dotnet ef migrations add InitialMigration ...I get the following Error. No project was found. Change the current working directory or

Is there a .NET Core CLI pre before build task?

回眸只為那壹抹淺笑 提交于 2019-12-03 10:10:49
问题 The question I assume when msbuild is about to compile source code files, it produces a list of files to build, based on Include and Exclude rules of the project. Is there a way to execute a task before the list of files to compile is evaluated ? This is to be able to generate a source code file and get it to be taken in the build. Current research and trials I'm making a .NET Core CLI tool that has to be run before the build of the project that is using it, because it (the CLI tool)

dotnet run OR dotnet watch with development environment from command line?

那年仲夏 提交于 2019-12-03 01:09:43
问题 I am using dotnet watch command to run asp.net core project. However, by default, it is picking up the Production as an environment. I have tried both options using: 1) > dotnet watch ASPNETCORE_ENVIRONMENT=Development 2) > dotnet run ASPNETCORE_ENVIRONMENT=Development But it still picks up production as an environment. Note: In visual studio environment variable is set in project properties as Development by default and running from visual studio picks that variable. Question is: How to run

Is there a .NET Core CLI pre before build task?

喜夏-厌秋 提交于 2019-12-02 23:35:02
The question I assume when msbuild is about to compile source code files, it produces a list of files to build, based on Include and Exclude rules of the project. Is there a way to execute a task before the list of files to compile is evaluated ? This is to be able to generate a source code file and get it to be taken in the build. Current research and trials I'm making a .NET Core CLI tool that has to be run before the build of the project that is using it, because it (the CLI tool) generates a file that has to be included in the build. The project is created with the new .csproj system, not

dotnet run OR dotnet watch with development environment from command line?

本小妞迷上赌 提交于 2019-12-02 14:27:06
I am using dotnet watch command to run asp.net core project. However, by default, it is picking up the Production as an environment. I have tried both options using: 1) > dotnet watch ASPNETCORE_ENVIRONMENT=Development 2) > dotnet run ASPNETCORE_ENVIRONMENT=Development But it still picks up production as an environment. Note: In visual studio environment variable is set in project properties as Development by default and running from visual studio picks that variable. Question is: How to run dotnet core project in development from command line using either?: 1) dotnet run 2) dotnet watch

Build Error with pre-compiled Azure Function Library

∥☆過路亽.° 提交于 2019-12-01 20:13:38
Recently, I converted an Azure Function that used a C# script ( *.csx ) to a pre-complied class library using the Visual Studio Studio Tools for Azure Functions . It builds successfully in Visual Studio 2017 (as well as running and debugging too). I'd like to build this AF library via our CI process. However, when I run the command dotnet build locally it fails with the following error: C:\Users\ray\.nuget\packages\microsoft.net.sdk.functions\1.0.2\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(31,5): error : Could not load file or assembly 'Microsoft.Azure.WebJobs.Host,

.NET Core 1.0 - How to run “All tests in Solution” with xUnit command line

走远了吗. 提交于 2019-12-01 13:58:54
问题 The Getting started with xUnit.net (.NET Core / ASP.NET Core) page describes how to run tests with dotnet test command line. It states that it requires a specific project.json , where we add xunit dependencies and test runner: "testRunner": "xunit", "dependencies": { "xunit": "2.1.0", "dotnet-test-xunit": "1.0.0-rc2-build10015" } If I try calling it from the parent directory: C:\git\Project\test [master ≡]> dotnet test dotnet-test Error: 0 : System.InvalidOperationException: C:\git\Project

EF Core Error - No project was found. Change the current working directory or use the --project option

馋奶兔 提交于 2019-11-30 06:22:49
I am using Visual Studio 2015 and dotnet core and trying to develop an EF Core Code First project using Sqlite and this documentation / tutorial, which also uses Sqlite => NET Core - New Database When I try to add an initial migration from the command line ( I am CD-ed into the folder that my data model project is located in) by issuing the following command dotnet ef migrations add InitialMigration ...I get the following Error. No project was found. Change the current working directory or use the --project option. I even tried using the --project option like so. > dotnet --project "C:\Shiva

Is .NET Core ready to run on Raspberry PI 3?

一笑奈何 提交于 2019-11-29 23:58:44
I can find a lot of obsolete threads but a lot have been changed the last months. Is there currently any possibility to run .NET Core and/or ASP.NET Core on Raspberry with Raspbian (currently Jessie) without Mono? Or what do I need? I can find some dnvm samples, but I cannot find one tutorial which is up to date and uses the dotnet cli. I know Windows 10 IoT is planned for v1.1.0 but I can find nothing for ARM based CPUs. Also there is no Docker sample for ASP.NET Core on Raspbian... Even http://dot.net shows only a Homebrew install command but how to install .NET Core 1.0.1 on Raspbian /