-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Copy link
Labels
Area: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.Issues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.
Description
Issue Description
when building MSBuild in -mt mode there is this inline task definition in MSBuild.csproj
<UsingTask TaskName="ValidateMSBuildPackageDependencyVersions" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<Task>
<Code Source="ValidateMSBuildPackageDependencyVersions.cs" Language="cs" />
</Task>
</UsingTask>
<Target Name="ValidateMSBuildPackageDependencyVersions" BeforeTargets="AfterBuild" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<ValidateMSBuildPackageDependencyVersions AppConfig="@(AppConfigWithTargetPath)" AssemblyPath="$(OutputPath)" />
</Target>it does not work because the taskfactory resolves the Code file ValidateMSBuildPackageDependencyVersions.cs relatively to -mt process instead of relatively to the project file which defines it.
Steps to Reproduce
build with -mt mode in MSBuild AR-May@16b9c4d
Expected Behavior
it compiles the file resolved relatively to the project file where it's used
Actual Behavior
it resolves the file with cwd of multithreaded process, which is different than the file path
crash in the taskfactory initialization when it does not find the file
Analysis
No response
Versions & Configurations
No response
Metadata
Metadata
Assignees
Labels
Area: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.Issues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.