net11.0
namespace Microsoft.Build.Tasks
{
    public sealed class RoslynCodeTaskFactory : ITaskFactory
    {
        [UnconditionalSuppressMessage("TrimAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "RoslynCodeTaskFactory compiles and loads a task assembly at runtime and reflects over its exported types; this is inherently incompatible with trimming.")]
        [UnconditionalSuppressMessage("TrimAnalysis", "IL2075:UnrecognizedReflectionPattern", Justification = "The task type comes from an assembly compiled at runtime from user-supplied source, so its properties cannot be statically preserved.")]
        public bool Initialize(string taskName, IDictionary<string, TaskPropertyInfo> parameterGroup, string taskBody, IBuildEngine taskFactoryLoggingHost);
    }
}
.NET
10.011.0
.NET Framework
4.7.24.84.8.1
Information specific to net11.0
Assembly

Microsoft.Build.Tasks.Core , Version=15.1.0.0, PublicKeyToken=b03f5f7f11d50a3a

Referencing

Your project needs a package reference to Microsoft.Build.Tasks.Core.

Package Microsoft.Build.Tasks.Core (18.9.6) net10.0
Platform Restrictions

This API is supported on all platforms.

  • Built-in API
  • Package-provided API