小编Pas*_*ger的帖子

Git clone:将stderr重定向到stdout但是将错误写入stderr

git clone它的输出写到stderr作为记录在这里.我可以使用以下命令重定向它:

git clone https://myrepo c:\repo 2>&1
Run Code Online (Sandbox Code Playgroud)

但是这会将所有输出(包括错误)重定向stderrstdout.有没有办法将进度消息重定向到stdout但仍然写入错误消息stderr.

git powershell git-clone

19
推荐指数
4
解决办法
6339
查看次数

ASP.NET在Bundling中使用嵌入式资源

我正在尝试实现一种通用方法,为我的Web解决方案中的不同程序集提供使用嵌入式资源中嵌入的JavaScript和CSS文件的可能性.此博客文章显示了使用VirtualPathProvider的技术.这很好,但VirtualPathProvider需要包含在包含嵌入资源的每个程序集中.

我试图从博客文章中增强VirtualPathProvider,以便可以将程序集传递给它并从程序集中加载资源:

public EmbeddedVirtualPathProvider(VirtualPathProvider previous, Assembly assembly)
{
    this.previous = previous;
    this.assembly = assembly;
}
Run Code Online (Sandbox Code Playgroud)

初始化时,它从传递的程序集中读取所有嵌入的资源:

protected override void Initialize()
{
    base.Initialize();

    this.assemblyResourceNames = this.assembly.GetManifestResourceNames();
    this.assemblyName = this.assembly.GetName().Name;
}
Run Code Online (Sandbox Code Playgroud)

GetFile从传递的程序集中读取内容:

public override VirtualFile GetFile(string virtualPath)
{
    if (IsEmbeddedPath(virtualPath))
    {
        if (virtualPath.StartsWith("~", System.StringComparison.OrdinalIgnoreCase))
        {
            virtualPath = virtualPath.Substring(1);
        }

        if (!virtualPath.StartsWith("/", System.StringComparison.OrdinalIgnoreCase))
        {
            virtualPath = string.Concat("/", virtualPath);
        }

        var resourceName = string.Concat(this.assembly.GetName().Name, virtualPath.Replace("/", "."));
        var stream = this.assembly.GetManifestResourceStream(resourceName);

        if (stream != null)
        {
            return new EmbeddedVirtualFile(virtualPath, stream);
        } …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc virtualpathprovider embedded-resource bundling-and-minification

15
推荐指数
1
解决办法
1762
查看次数

使用SonarQube 5.2构建Breaker插件

似乎Build Breaker插件不再与SonarQube 5.2兼容.如果Sonar门未满足或者是否计划将Build Breaker插件更新为5.2,是否有任何替代方法可以使(VSO)构建失败?

tfsbuild sonarqube azure-devops azure-pipelines

11
推荐指数
1
解决办法
4078
查看次数

NDesk.Options/Mono.Options:具有多个键/值对的参数

我需要解析以下命令行语法:

MyApplication.exe /p1 key1=value1 key2=value2 key3=value3 /p2
Run Code Online (Sandbox Code Playgroud)

key1,key2和key3属于参数p1.

我在文档中找到了示例#3,它显示了解析单个键/值对的方法.

使用NDesk.Options解析单个参数的多个键/值对

.net c# mono command-line console-application

8
推荐指数
2
解决办法
4278
查看次数

通过VSTS Rest API启动构建并传递变量

我想通过REST API启动Visual Studio Team Service构建.有一个用于排队构建API,但我找不到定义变量的方法.

azure-devops azure-pipelines azure-devops-rest-api

8
推荐指数
1
解决办法
6953
查看次数

如何在Windows上安装Git大文件存储?

根据其文档,双击应该足够了.但是当我打开git bash并运行时git lfs init,它不起作用:

$ git lfs init
git: 'lfs' is not a git command. See 'git --help'.
Run Code Online (Sandbox Code Playgroud)

git github large-file-support git-lfs

6
推荐指数
2
解决办法
5458
查看次数

将继承的过程模型用于Azure DevOps Server 2019上的现有集合

使用Azure DevOps Server 2019 RC可以在新集合上启用继承的流程模型(请参阅发行说明)。有没有办法对现有集合使用继承的流程模型,而没有对流程进行自定义

tfs-process-template azure-devops-server azure-devops-server-2019

6
推荐指数
1
解决办法
183
查看次数

SonarQube Runner和SonarQube.MSBuild.Runner之间的关系

关于SonarQube与MSBuild和Team Build集成的公告,有没有人可以建议SonarQube Runner和SonarQube.MSBuild.Runner之间的关系?我不清楚SonarQube.MSBuild.Runner是否取代 SonarQube Runner或者它是否位于它之上.

msbuild tfs sonar-runner sonarqube sonarqube-msbuild-runner

4
推荐指数
1
解决办法
977
查看次数

查看VSTF构建中的git-lfs文件

我有一个托管在VSTS上的存储库,包含一个通过git-lfs存储的文件.如果我只是让VSTS构建checkout存储库,它只需下载包含文件ID的git-lfs元数据文件.

以下是VSTS如何获取其来源的输出:

Syncing repository: MyRepo (Git)
Checking out c84ef2f2bbad4fa3dc70dbd4100534390b9c8f18 to d:\work\73\s
Checked out branch refs/heads/develop for repository MyRepo at commit c84ef2f2bbad4fa3dc70dbd4100534390b9c8f18
Run Code Online (Sandbox Code Playgroud)

我需要做什么来检查真实文件?

编辑:我假设我需要git lfs fetch在VSTS签出源后手动调用.但是在这种情况下如何处理身份验证(VSTS需要)?

git tfsbuild git-lfs azure-devops

4
推荐指数
2
解决办法
2137
查看次数

使用Sonar MSBuild Runner和/ p:IsPackaging = True

我有一个Visual Studio Team Services构建定义,其中包含由Sonar Begin Analysis和End Analysis任务包围的Visual Studio Build任务.Visual Studio Build使用/ p:IsPackaging = True属性打包SharePoint提供程序托管的加载项.如果设置了此属性,则会从Sonar Build Runner中收到以下错误:

2015-11-27T13:23:05.9534586Z WARNING: Duplicate project GUID: "31ef7995-fdbc-4307-9024-a3d640fdf987". 
Check that the project is only being built for a single platform/configuration and that that 
the project guid is unique. The project will not be analyzed by SonarQube. 
Run Code Online (Sandbox Code Playgroud)

当然,我可以首先构建没有/ p的解决方案:IsPackaging = True并在此处运行分析,然后在第二步中进行打包,但这似乎浪费了必须两次构建解决方案的资源.

知道我如何打包SharePoint提供程序托管加载项并使用相同的任务与Sonar进行代码分析?

使用的声纳版本是5.1.2.VSTS任务使用的MSBuild.SonarQube.Runner版本是1.0.1.

sonar-runner sharepoint-apps sonarqube sonarqube-msbuild-runner azure-pipelines

3
推荐指数
1
解决办法
1073
查看次数