You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reverted loop methods back to `AggressiveOptimization`.
Added `NoInlining` to `__Overhead` to match weaved benchmark method.
Updated ExpectedBenchmarkResultsTests.
/// The Task used by MSBuild to weave the assemblies.
22
+
/// </summary>
23
+
publicsealedclassWeaveAssembliesTask:Task
24
+
{
25
+
/// <summary>
26
+
/// The directory of the output.
27
+
/// </summary>
28
+
[Required]
29
+
publicstringTargetDir{get;set;}
30
+
31
+
/// <summary>
32
+
/// The path of the target assemblies.
33
+
/// </summary>
34
+
[Required]
35
+
publicstringTargetAssembly{get;set;}
36
+
37
+
privatereadonlyList<string>_warningMessages=[$"Benchmark methods were found in 1 or more assemblies that require NoInlining, and assembly weaving failed."];
38
+
39
+
/// <summary>
40
+
/// Runs the weave assemblies task.
41
+
/// </summary>
42
+
/// <returns><see langword="true"/> if successful; <see langword="false"/> otherwise.</returns>
43
+
publicoverrideboolExecute()
44
+
{
45
+
if(!File.Exists(TargetAssembly))
46
+
{
47
+
Log.LogError($"Assembly not found: {TargetAssembly}");
48
+
returnfalse;
49
+
}
50
+
51
+
varresolver=newCustomAssemblyResolver();
52
+
resolver.AddSearchDirectory(TargetDir);
53
+
54
+
// ReaderParameters { ReadWrite = true } is necessary to later write the file.
// Assembly resolution can fail for library projects that contain references if the project does not have <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>.
74
+
// Because the library project could be built as a dependency of the executable, we only log the warning if the target assembly is executable.
0 commit comments