diff --git a/src/Xamarin.iOSProviders/iOSDesignerProvider.fs b/src/Xamarin.iOSProviders/iOSDesignerProvider.fs index 8a2fc6d..5de0cc9 100644 --- a/src/Xamarin.iOSProviders/iOSDesignerProvider.fs +++ b/src/Xamarin.iOSProviders/iOSDesignerProvider.fs @@ -271,10 +271,7 @@ type iOSDesignerProvider(config: TypeProviderConfig) as this = do rootType.DefineStaticParameters([ProvidedStaticParameter ("DesignerFile", typeof) ProvidedStaticParameter ("Register", typeof)], buildTypes) this.AddNamespace(ns, [rootType]) - - interface IDisposable with - member x.Dispose() = - if !watchedFile <> null then (!watchedFile).Dispose() + this.Disposing.Add (fun _ -> if !watchedFile <> null then (!watchedFile).Dispose()) [] do() \ No newline at end of file