magic-chunks-dotnetcore: Could not load file or assembly 'System.IO.FileSystem'

Hey Sergey,

looks like the new version doesn’t work well.

  • Agent is running on Windows Server 2016
  • The Task was running well before today’s update

Please let me know if you need more info.

2017-12-16T17:27:56.0021636Z ============================================================================== 2017-12-16T17:27:56.0021853Z Task : Config transformation 2017-12-16T17:27:56.0022091Z Description : Transform config file with Magic Chunks 2017-12-16T17:27:56.0022254Z Version : 1.3.1 2017-12-16T17:27:56.0022437Z Author : Sergey Zwezdin 2017-12-16T17:27:56.0022609Z Help : More Information 2017-12-16T17:27:56.0022797Z ============================================================================== 2017-12-16T17:27:56.4835847Z Preparing task execution handler. 2017-12-16T17:27:57.1161849Z Executing the powershell script: C:\VSTSAgents\Agent01_work_tasks\MagicChunks_985284e0-a7d2-4e4d-802c-0a516bffaadf\1.3.1\transform.ps1 2017-12-16T17:27:57.1260313Z “version”: “1.0.830” 2017-12-16T17:27:57.1260539Z }) 2017-12-16T17:27:57.1313342Z ##[error]System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. 2017-12-16T17:27:57.8024964Z at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) 2017-12-16T17:27:57.8113769Z at System.Reflection.Assembly.GetTypes() 2017-12-16T17:27:57.8114233Z at Microsoft.PowerShell.Commands.AddTypeCommand.LoadAssemblyFromPathOrName(List1 generatedTypes) 2017-12-16T17:27:57.8114760Z at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing() 2017-12-16T17:27:57.8115031Z at System.Management.Automation.CommandProcessorBase.Complete() 2017-12-16T17:27:57.8115269Z Transformation found: version: 1.0.830 2017-12-16T17:27:57.8115437Z 2017-12-16T17:27:57.8115577Z 2017-12-16T17:27:57.8115796Z Transforming file C:\VSTSAgents\Agent01\_work\1\s\vss-extension.json 2017-12-16T17:27:57.8115985Z 2017-12-16T17:27:57.8116120Z 2017-12-16T17:27:57.8117825Z ##[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. 2017-12-16T17:27:57.8118521Z at MagicChunks.TransformTask.Transform(String type, String sourcePath, String targetPath, TransformationCollection transformation) 2017-12-16T17:27:57.8118881Z at CallSite.Target(Closure , CallSite , Type , Object , Object , Object , Object ) 2017-12-16T17:27:57.8119172Z --- End of inner exception stack trace --- 2017-12-16T17:27:57.8119478Z at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) 2017-12-16T17:27:57.8121074Z at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) 2017-12-16T17:27:57.8121468Z at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2017-12-16T17:27:57.8121808Z at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) 2017-12-16T17:27:57.8126586Z ##[error]PowerShell script completed with 2 errors.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 32 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@schwaizi , I install the .NET Framework 4.7 and it worked! Thank you for your help on this!

@sevaa can you please post your VSTS configuration. You mentioned TFS 2017 is working fine. I’m trying to understand where is your problem as i think the issue has been solved by installing .net framework 4.7

@sergeyzwezdin i would suggest “Install Instruction” on wiki page. To add the .net framework 4.7 as requirements for on-premise and in cloud availability on “Hosted 2017” only.

I can confirm after installing .Net Framework 4.7.2 DevPack the Extension worked as expected.

choco install netfx-4.7.2-devpack

I’m also seeing the reported issue with Version : 2.0.3 with an on-premise build server - could this just be some pre-requisites missing in the package?