Skip to content

Commit

Permalink
Add msbuild task UserAgent strings for netcore vs desktop
Browse files Browse the repository at this point in the history
Desktop framework will use: NuGet Desktop MSBuild Task
NETStandard will use: NuGet .NET Core MSBuild Task

Fixes NuGet/Home#5709
  • Loading branch information
emgarten committed Aug 8, 2017
1 parent 1e1fe75 commit 953b7d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/NuGet.Core/NuGet.Build.Tasks/RestoreTask.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Expand All @@ -23,7 +23,12 @@ namespace NuGet.Build.Tasks
/// </summary>
public class RestoreTask : Microsoft.Build.Utilities.Task, ICancelableTask, IDisposable
{
private const string HttpUserAgent = "NuGet MSBuild Task";
#if IS_DESKTOP
private const string HttpUserAgent = "NuGet Desktop MSBuild Task";
#else
private const string HttpUserAgent = "NuGet .NET Core MSBuild Task";
#endif

private readonly CancellationTokenSource _cts = new CancellationTokenSource();

/// <summary>
Expand Down

0 comments on commit 953b7d0

Please sign in to comment.