forked from dotnet/sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCheckForTargetInAssetsFile.cs
More file actions
32 lines (23 loc) · 981 Bytes
/
Copy pathCheckForTargetInAssetsFile.cs
File metadata and controls
32 lines (23 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#nullable disable
using Microsoft.Build.Framework;
using NuGet.ProjectModel;
namespace Microsoft.NET.Build.Tasks
{
[MSBuildMultiThreadableTask]
public class CheckForTargetInAssetsFile : TaskBase, IMultiThreadableTask
{
public TaskEnvironment TaskEnvironment { get; set; } = TaskEnvironment.Fallback;
public string AssetsFilePath { get; set; }
[Required]
public string TargetFramework { get; set; }
public string RuntimeIdentifier { get; set; }
protected override void ExecuteCore()
{
AbsolutePath assetsFilePath = TaskEnvironment.GetAbsolutePath(AssetsFilePath);
LockFile lockFile = new LockFileCache(this).GetLockFile(assetsFilePath);
lockFile.GetTargetAndThrowIfNotFound(TargetFramework, RuntimeIdentifier);
}
}
}