System.IO.DirectoryNotFoundException: Could not find a part of the path after upgrading framework version
After upgrading to any version >= 3.8, the build fails with a Directory not found exception on the SelfRegisteredExtensionsSourcePath task:
SelfRegisteredExtensionsSourcePath: '[Path to project redacted]\objd\A
MD64\'
Language: 'C#'
TestingPlatformExtensionFullTypeNames:
Hook UID: '98058041-B5B6-4A75-9834-58E6DF796A22' DisplayName: 'Microsoft.Testing.Extensions.Telemetry' TypeFu
llName: 'Microsoft.Testing.Extensions.Telemetry.TestingPlatformBuilderHook'
Hook UID: '8214564B-6107-422D-8A82-462F97602287' DisplayName: 'Microsoft.Testing.Platform.MSBuild' TypeFullNa
me: 'Microsoft.Testing.Platform.MSBuild.TestingPlatformBuilderHook'
SelfRegisteredExtensions source:
'//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Microsoft.Testing.Platform.MSBuild
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.PrivilegeManagement.Test.CloudTestCommon
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal static class SelfRegisteredExtensions
{
public static void AddSelfRegisteredExtensions(this global::Microsoft.Testing.Platform.Builder.ITestAp
plicationBuilder builder, string[] args)
{
Microsoft.Testing.Extensions.Telemetry.TestingPlatformBuilderHook.AddExtensions(builder, args);
Microsoft.Testing.Platform.MSBuild.TestingPlatformBuilderHook.AddExtensions(builder, args);
}
}
}'
Impacts version >= 3.8
Steps To Reproduce
Expected behavior
Build Succeeds
Actual behavior
Build fails with directory not found exception.
The "TestingPlatformSelfRegisteredExtensions" task failed unexpectedly. [Path to project readacted]\CloudTestCommon.csproj]
C:\CxCache\Microsoft.Testing.Platform.MSBuild.1.6.0\buildMultiTargeting\Microsoft.Testing.Platform.MSBuild.targe
ts(201,5): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path '[Path to project redacted]\objd\AMD64\'. [Path To project redacted]\CloudTestCommon.csproj]
Additional context
My csproj file contains a reference to both the framework and adapter targets.
<Import Project="$(SRCROOT)\Targets\Generated\MSTest.TestFramework.targets" />
<Import Project="$(SRCROOT)\Targets\Generated\MSTest.TestAdapter.targets" />
System.IO.DirectoryNotFoundException: Could not find a part of the path after upgrading framework version
After upgrading to any version >= 3.8, the build fails with a Directory not found exception on the SelfRegisteredExtensionsSourcePath task:
Impacts version >= 3.8
Steps To Reproduce
Expected behavior
Build Succeeds
Actual behavior
Build fails with directory not found exception.
Additional context
My csproj file contains a reference to both the framework and adapter targets.