-
1 votesanswersviews
使用dotnet CLI构建和运行ASP.NET Core WebAPI
我正在尝试使用dotnet CLI编译和运行干净的ASP.NET Core WebAPI,同时使用Windows和OS X. 我试过的...... 创建了新的ASP.NET 5 WebAPI使用(Yeoman with generator-aspnet,或Visual Studio - 我试过两个) dotnet restore,dotnet build(构建失败......) Pr... -
0 votesanswersviews
dotnet build看不到引用的项目
重现的步骤 创建 net461 核心webproject引用VS2017中相同4.6.1的ClassLibrary . 在lib中定义 public class X { [Required] // using System.ComponentModel.DataAnnotations; public bool Q { get; set; } } 在webapp中使用它: new ... -
7 votesanswersviews
.NET Core迁移解决方案中的WebHostBuilder.Build()MissingMethodException
我正在迁移使用.NET Core SDK 1.0.0-preview2-1-003177构建的解决方案,因为我想在Visual Studio 2017中使用它 . 我使用.NET Core SDK 1.0.1中的dotnet migrate命令,它运行良好,它汇编 . 当我使用IIS Express运行Web部件时,包含的经典Program.cs var host = new WebHostBui... -
3 votesanswersviews
我可以使用Microsoft Dotnet CLI构建ASP.NET Core Web应用程序吗?
我浏览了一些网站,发现.NET Core正在使用 .NET CLI (.NET命令行界面) . 我使用.NET CLI创建了一个控制台应用程序,它运行正常 但是当我使用Yeoman创建一个ASP.NET Core Web应用程序并运行命令“dotnet restore”时,我收到以下错误: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01与DN... -
4 votesanswersviews
在带有dotnet cli的mac上使用f#
我试图按照https://github.com/enricosada/fsharp-dotnet-cli-samples/wiki/Getting-Started#hello-world来开始使用我的mac上的f#和dotnet核心 . % mkdir helloworld % cd helloworld % dotnet new --lang "f#" Created new... -
3 votesanswersviews
dotnetcore Nuget启用预发布
我开始使用dotnetcore作为业余爱好项目 . 我在尝试安装NLog时遇到问题 . Visual Studio代码编辑器似乎认可了beta版本,因为intelisense在project.json文件中建议它 . 然而,nuget似乎没有恢复它 . 有没有办法在新的dotnet核心平台上启用Nuget包的预发布? -
0 votesanswersviews
在dotnet构建或发布期间无法找到包含目录的存储库
我在我的ASP.NET Core 2.2应用程序上添加了对Docker的支持,并在测试本地docker的命令时发现 dotnet publish -f netcoreapp2.2 -c Release -o out 错误了 . ./IdentityServer.sln Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = &qu... -
1 votesanswersviews
将dotnetcore项目迁移到1.0.4后出现'dotnet build'错误
我一直在尝试在迁移的.net核心项目上运行dotnet build命令(从1.0.0-preview2-003131到1.0.4) . 我按照迁移提到的项目here的步骤,使用Visual Studio 2017构建解决方案 . 但是,使用dotnet CLI命令'dotnet build'给出了以下错误: C:\ Program Files \ dotnet \ sdk \ 1.0.4 \ M... -
12 votesanswersviews
无法使用Hosted Agent在Visual Studio Team Services上构建默认的ASP.Net核心Web应用程序(.NET Core)
在Visual Studio 2015 Update 3中创建了一个新的ASP.Net核心Web应用程序(.Net Core)项目,并将其签入Visual Studio Team Services git存储库 . 我正在使用.Net Core和ASP.Net Core的发布版本 . 我现在正在尝试使用VSTS Build系统使用基于本指南的构建定义来构建它:https://www.visuals... -
14 votesanswersviews
不使用Visual Studio将project.json转换为csproj
从preview3开始 dotnet new 生成一个csproj,并且 dotnet restore 和 dotnet build 对project.json和/或xproj都失败了 . 例如,对同时具有project.json和xproj的目录运行 dotnet restore 会出现此错误 . ... xproj(7,3):错误MSB4019:导入的项目“C:\ Program Files... -
3 votesanswersviews
如何构建一个面向.NET Core的类库?
我知道使用Visual Studio有一个模板来创建一个面向.NET Core的类库,但我正在寻找一种从命令行执行此操作的方法 . 我知道使用 dotnet new 你可以创建一个新的.NET核心项目,但它是一个控制台应用程序,它比Visual Studio创建的类库有更多的依赖项 . 是否有命令或方法从命令行创建类库项目? 例如: -
1 votesanswersviews
发布web api时,Dotnet发布不会创建文件夹
我一直在尝试关注如何将asp.net Web API放到docker镜像上的 multiple (example)教程 . 几乎所有这些都使用docker文件,其中完成以下命令 dotnet [csproj name] -c Release -o out ,然后最终将信息从此复制到另一个文件夹 . 但是,我一直遇到没有找到文件夹的问题 . 所以我决定在本地使用这个命令,令我惊讶的是,没有生成任何文...