Cake.IIS icon indicating copy to clipboard operation
Cake.IIS copied to clipboard

Broken references for Microsoft.Win32.Registry

Open miguelmcorreia opened this issue 7 years ago • 3 comments

  • Cake version = 0.27.1
  • Cake.IIS version = 0.4.0 (and previous)

When adding a site I get: System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Adding NuGet package Microsfoft.Win32.Registry, returns: System.IO.FileNotFoundException: Could not load file or assembly 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

problem seems fixed when adding System.Reflection.TypeExtensions Nuget package as addin. This seems gimmicky... Add dependencies to project or update documentation maybe?

miguelmcorreia avatar May 11 '18 16:05 miguelmcorreia

@miguelmcorreia your comment helped me. I would like to point out that the first error message should be Could not load file or assembly 'Microsoft.Win32.Registry, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I would also like to point out that I also got similar issue related to System.ServiceProcess.ServiceController which was also resolved by adding Nuget package with the same name as addin.

sunilshahi avatar Jul 09 '18 05:07 sunilshahi

I'm seeing the same issue, however in my case I additionally had to physically copy the TypeExtensions dll over to the Cake.IIS addin, similar to what was mentioned on this issue.

#addin "Cake.IIS"
#addin "Microsoft.Win32.Registry&version=4.0.0.0"
#addin "System.Reflection.TypeExtensions&version=4.1.0.0"

philosowaffle avatar Aug 21 '18 17:08 philosowaffle

Problem for Microsoft.Win32.Registry fixed using addin, but System.Reflection.TypeExtensions wont work even with 'addin' for me. But on 0.3.1 works perfectly. Guess will have to stay with that. Could not load file or assembly 'System.Reflection.TypeExtensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

iamdeveloperidevelop avatar Nov 03 '19 13:11 iamdeveloperidevelop