An angular project deployed through Azure DevOps pipeline would throw this error in the release pipeline:
The error was thrown in a 'Config transformation' task. I tried to install file system package using
in a Powershell task and also tried to install dot net framework 4.6 using
in a custom Nuget task, but both these methods didn't solve the issue.
Finally after going through the task history realized that the task was auto updated to latest version which has caused this issue.
So simply changing this task's version from 2.* to 1.* solved this problem. This behavior is kind of expected since a major version includes some breaking changes by convention.
##[error]System.Management.Automation.MethodInvocationException: Exception calling "Transform" with "4" argument(s): "Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified." ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
The error was thrown in a 'Config transformation' task. I tried to install file system package using
Install
System.IO.FileSystem -Version 4.0.1
Install
DotNetFramework.Runtime -Version 4.6.1
No comments:
Post a Comment