Skip to content

Commit 799f6de

Browse files
committed
Code cleanup
1 parent fe87161 commit 799f6de

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

removeartifacts.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rmdir artifacts /s /q

src/Tasks/Microsoft.NET.Build.Tasks/ResolvePackageAssets.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ namespace Microsoft.NET.Build.Tasks
2727
/// </summary>
2828
public sealed class ResolvePackageAssets : TaskBase
2929
{
30+
#region Input Items
31+
3032
/// <summary>
3133
/// Path to assets.json.
3234
/// </summary>
@@ -160,6 +162,9 @@ public sealed class ResolvePackageAssets : TaskBase
160162
/// </summary>
161163
public bool DesignTimeBuild { get; set; }
162164

165+
#endregion
166+
167+
#region Output Items
163168
/// <summary>
164169
/// Full paths to assemblies from packages to pass to compiler as analyzers.
165170
/// </summary>
@@ -251,6 +256,8 @@ public sealed class ResolvePackageAssets : TaskBase
251256
[Output]
252257
public ITaskItem[] ReferenceDocumentationFiles { get; private set; }
253258

259+
#endregion
260+
254261
/// <summary>
255262
/// Messages from the assets file.
256263
/// These are logged directly and therefore not returned to the targets (note private here).
@@ -1157,17 +1164,13 @@ private void WriteDebugItems(
11571164

11581165
foreach (string fileExtension in relatedExtensions.Split(RelatedPropertySeparator))
11591166
{
1160-
if (fileExtension.ToLower() == extension)
1167+
if (fileExtension.ToLowerInvariant() == extension)
11611168
{
11621169
string xmlFilePath = Path.ChangeExtension(itemSpec, fileExtension);
11631170
if (File.Exists(xmlFilePath))
11641171
{
11651172
WriteItem(xmlFilePath, library);
11661173
}
1167-
else
1168-
{
1169-
_task.Log.LogWarning(Strings.AssetsFileNotFound, xmlFilePath);
1170-
}
11711174
}
11721175
}
11731176
}

0 commit comments

Comments
 (0)