dotnet-cli

dotnet ef command no longer works after upgrading to Visual Studio 16.3.0

折月煮酒 提交于 2019-12-11 00:39:39
问题 This happened at home first, so I thought maybe it was an issue with my desktop PC at home. But now that I am back at work, I tried the upgrade and got the same thing. Screenshot before upgrade Screenshot after upgrading Visual Studio The error I get is: Could not execute because the specified command or file was not found. Possible reasons for this include: You misspelled a built-in dotnet command. You intended to execute a .NET Core program, but dotnet-ef does not exist. You intended to run

Having a sln file, possible to list all files from all projects under that sln?

梦想的初衷 提交于 2019-12-10 05:33:56
问题 Is there a way or an extension that does the following: Having a *.sln file, can I list all files from all projects or all solution folders under that sln? So if I do dotnet sln list then I get the list of the projects from that solution file, but what I need is to get all files. My real need is to copy all those files into a different folder. 回答1: Here's an msbuild-based solution which is actually fairly simple and also non-intrusive. Create a file CopySource.targets in the solution

ASP.NET Core RC2 Can't Find Html Encoder Implementation

那年仲夏 提交于 2019-12-10 02:58:35
问题 Can anyone show me an example of how to HTML encode text with the HtmlEncoder class in the System.Text.Encodings.Web namespace? I'm converting an ASP.NET Core RC1 project to RC2. In the RC1 project I'm using the HtmlEncoder class in the Microsoft.Extensions.WebEncoders namespace. But there is no RC2 update for that. According to this GitHub post Microsoft.Extensions.WebEncoders has been moved to System.Text.Encodings.Web . But the HtmlEncoder class in this new namespace is an abstract class

Updating Microsoft.NETCore.App to v1.1.0 causes -2147450749 (0x80008083)

余生长醉 提交于 2019-12-10 02:54:31
问题 I created a new .NET Core project in Visual Studio 2015 by following the instructions at: https://www.microsoft.com/net/core#windowsvs2015 It works OK, and I can add breakpoints etc. no problem. Then I ran Tools->NuGet Package Manager->Manage NuGet Packages for Solution... I got the option to update Microsoft.NETCore.App to the latest stable release v1.1.0. The first issue I got was the error: Can not find runtime target for framework '.NETCoreApp,Version=v1.0' compatible with one of the

Can I build ASP.NET Core web application using Microsoft Dotnet CLI?

喜你入骨 提交于 2019-12-09 13:42:20
问题 I have gone through some websites and found that .NET Core is using .NET CLI (.NET Command Line Interface). I have create a console application using .NET CLI and it is working fine But when I am creating an ASP.NET Core web application using Yeoman and running the command “dotnet restore” then I am getting the following error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0. I also tried dotnet restore -s https://api.nuget.org/v3/index.json But

“dotnet restore” fails with “SSL peer certificate or SSH remote key was not OK”

微笑、不失礼 提交于 2019-12-08 11:39:33
问题 I've just followed the procedure here: https://www.microsoft.com/net/core#ubuntu and that's the output of dotnet restore log : Restoring packages for /home/test/project.json... error: Unable to load the service index for source https://api.nuget.org/v3/index.json. error: An error occurred while sending the request. error: SSL peer certificate or SSH remote key was not OK I've added the relevant certificates to the trusted ones in order to make curl work but the error remains for dotnet

Unable to deploy ASP.NET Core app to IIS - Bad Gateway

不想你离开。 提交于 2019-12-08 05:44:16
问题 Have been struggling to get this to work, I have a standard .NET Core API that I want to host on a remote IIS server, the issue is most of the tutorials are for ASP.NET 5/vNext and don't explain what happens once you run your dotnet publish . My bindings are correct but I'm not sure if i'm pointing at the right folder. In my output folder I have publish and wwwroot as well as config.json and some other json files. When I point IIS to the wwwroot folder I get: 502 - Web server received an

dotnet run web site with specific url

心已入冬 提交于 2019-12-07 04:45:06
问题 How can I specify using dotnet cli to run my web app using specific configurations. I know hosting.json can be used but I did not find any documentation how to do this and how this relates to the dotnet cli. 回答1: Look at this sample: https://github.com/aspnet/Security/blob/dev/samples/CookieSample/Program.cs#L11 Tweaked for command line: public static void Main(string[] args) { var config = new ConfigurationBuilder().AddCommandLine(args).Build(); var host = new WebHostBuilder() .UseKestrel()

How to open dotnet-core CLI project in Visual Studio 2017

眉间皱痕 提交于 2019-12-07 01:12:18
问题 I have been developing a simple application using dotnet Core (for an API) and Angular2 for the purpose of learning both. I created the project using Yeoman on the command line and have been happily coding away in Visual Studio Code (on Windows). All seems to hang together well and it's been an enjoyable experience. I thought I might try out Visual Studio 2017 and see what the experience of developing a dotnet Core project in VS is like for a while. However, having installed VS2017 and cloned

dotnet is not recognized as the name of a cmdlet

我的梦境 提交于 2019-12-06 22:08:27
问题 We have downloaded and run DotNetCore.1.0.1-SDK.1.0.0.Preview2-003133-x64.exe . After having closed and reopened our command prompt, running dotnet gives the following output. The term 'dotnet' is not recognized as the name of a cmdlet, function, script file, or operable program. We have tried the following: Uninstall all versions of Visual Studio. Uninstall all versions of .NET Core. Repair C++ Redistributable 2015 x86 & x64 Restart the computer. Then reinstall the .NET Core SDK. This is the