我使用Node.js已经有一段时间了。我在很大程度上了解它的内部工作原理(事件循环和其他东西),但是ASP.NET Core看起来非常类似于Node.js。
ASP.NET Core - Uses Kestrel (basically a fork of libuv)
Node.js - Uses libuv
ASP.NET Core - Tasks (though present in previous ASP.NET versions too)
Node.js - Promises
ASP.NET Core - Async/Await (though present in previo
我在Azure DevOps存储库中有一个DevOps核心项目,它可以使用DevOps构建管道构建。但是,构建的版本总是失败,出现了以下错误:
没有找到带有指定模式的包.
检查任务中提到的包是否已作为构件发布在构建阶段或之前阶段,并在当前作业中下载。
更多详情:
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://learn.mi
我遵循了通过设置池的文档,并将其设置为pool: Default。这将引导管道使用默认池:
但是,我一直收到这样的错误:
找不到默认名称的池。池不存在或未被授权使用。有关授权的详细信息,请参阅。
据我所知,这应该是授权的。
我也试过:
pool:
name: Default
全天蓝-管道. Full
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish sy
我在配置Azure DevOps Dotnet核心构建过程时遇到了问题。
我有一个简单的dotnet核心项目,我正试图在Azure DevOps环境中构建它。
该项目位于我的存储库中的一个子文件夹中,但是我不知道如何指定Pipeline如何找到我的csproj文件。建议您可以指定它,但没有示例,我的所有尝试都会遇到错误。
使用标准dotnet CLI模板构建管道时,创建的YAML为:
# ASP.NET Core
# Build and test ASP.NET Core web applications targeting .NET Core.
# Add steps that run te
需要帮助的是蔚蓝的管道。只是对其进行测试,并考虑从TeamCity迁移到Azure,并且想知道:
我有:
1. Asp.Net Core Web Api (Web1)
2. Asp.Net Core Web Api (Web2)
3. WPF App
4. Several infrastructure class libraries that are shared libs between the above 3 solutions (Web1, Web2, WPF).
我是否创建了4个天蓝色项目?
1 project that includes the repository of Web1
我想知道,如果我们考虑这段YAML代码,如果这已经被认为是一个构建和发布pipeline...or,我们需要定义阶段来表征它。下面的代码可以工作,但当您运行此代码时,您看不到各个阶段。然而,在这种情况下,它会构建并部署到Azure。所以这就是我问的原因。我正在寻找正确的术语。这是一个构建和发布管道吗?或者你不能这么说,只有我定义了构建和发布的阶段,它才是一个管道。
希望这一点是清楚的。
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framewor
我使用的是Visual Studio2019 RC和ASPWebCore2.2。默认情况下,这是使用InProcess托管模型。稍微读了一下,我发现了这个官方文档: For in-process, CreateDefaultBuilder calls UseIIS to:
[...]
Configure the port and base path the server should
listen on when running behind the ASP.NET Core Module. 来自https://docs.microsoft.com/en-us/aspnet/core/ho
我开始使用Azure管道(您将很快从问题中了解),我有一个v.basic构建管道,其中包含步骤Nuget =>构建解决方案=>运行测试。整个yaml是..。
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/
我第一次尝试使用Azure管道,并最终成功地配置了azure-管线. for文件,以便它运行测试,并在测试通过后自动部署。但是,我收到了这个错误:
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/dotnet-core
刚刚被介绍到Azure管线。我的项目是一个.NET项目,并与Azure连接,但在集成之前不运行我的单元测试(因此,即使测试失败,也要集成所有内容)
我的.yaml文件是:
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-
我正在尝试将ASP.NET核心Web发布到来自Azure的前提服务器上。
我已经成功地在目标机器上安装了代理。我成功地创建了构建管道。
以下是yaml文件:
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/pipeli
我在一家小公司工作,我们刚刚开始安装DevOps管道。代码库是Visual解决方案中的大约20个项目。其中一些项目的框架是.Net 5,另一些是.Net框架4.8。我们目前正在更新,但目前我们需要使用我们所拥有的。下面是我在构建管道方面的尝试。它运行,我认为它有效。但我想获得更多的专业意见,我可以做得更好,因为我觉得这是相当新的。
这是我的yml文件:
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that
关于如何正确登录Asp.NET核心V2的问题。我使用的是ASP.NET身份。
下面是我的OnPostAsync()方法。我的代码成功地获取了用户名和pwd,调用了signin管理器,并成功地返回了一个true。我认为正确的登录方式是调用SigninPasswordAsync。成功的结果回来了。
public async Task<IActionResult> OnPostAsync()
{
if (!ModelState.IsValid)
{
return Page();
}
v
我创建了一个.netcore 2.1API项目,并设置了Azure DevOps,以便使用Windows将其部署到On计算机上。
文件夹agent_work\r1\a是在运行代理的机器上创建的,但是其中没有文件。
我可以看到,确实发生了一个构建,并且在我的版本中有一个工件。
我错过了什么?
更新
我可以在代理作业中看到,有一个关于下载工件的部分。
它有错误消息
There is no build available or the source is not accessible. You can select all artifacts or specify the lis
我重复使用这个项目的源代码,在下载项目。
这是ASP.NET Core 3.x版本,它有
文件Startup.cs
using JWTTokenPOC.Helper;
using JWTTokenPOC.Service;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace JWTTokenPOC
我有两个单元测试项目(在我学习单元测试时创建的)。
当我在azure管道中运行我的build (yaml)时,我的.NET Core2.2项目运行它的测试,但是我似乎无法让我的其他项目运行它的测试。
我的yaml可能有点肮脏试图解决这个问题。如果你看到不对劲的事,请告诉我。
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifa
我有一个GitHub存储库,其中包含一个.NET Core3.0网站解决方案。在Azure DevOps中,我使用向导的配置步骤上的ASP.NET核心模板创建了一个链接到该存储库的新管道。我的YAML就是这样的:
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipel
如何在ParentActionViewContext内核中访问Asp.Net,我使用了以下命令,但在Core中它们是不可用的。ControllerContext.ParentActionViewContext.RouteData.Values["controller"].ToString();,ControllerContext.ParentActionViewContext.ViewBag.Model as MyViewModel
由于缺乏.Net核心上的信息,我无法找到有关这些信息的任何信息。
提前谢谢。