melenaos / FileSystemSafeWatcher

Extends the FileSystemWatcher to trigger the events only when the file is ready for read
Apache License 2.0
34 stars 13 forks source link

How can I use it in Windows Powershell script? #8

Open marseaplage opened 1 month ago

marseaplage commented 1 month ago

How Can I compile it? I tried like this: csc "C:\Users\usrtbest\Documents\scripts\tests\FileSystemSafeWatcher.cs" /r:AsaLib.dll but I got this error: error CS0006: Metadata file 'AsaLib.dll' could not be found and when I tried without the dll I got thousands of errors. Thank you in advance for your help. I am using windows server 2019, Microsoft (R) Visual C# Compiler version 4.7.3190.0 for C# 5. Other tries: csc C:\Users\usrtbest\Documents\scripts\tests\FileSystemSafeWatcher.cs /r:System.IO.FileSystem.Watcher.dll I got this error: error CS0246: The type or namespace name 'FileSystemEventArgs' could not be found (are you missing a using directive or an assembly reference?)

melenaos commented 1 month ago

I have no idea how to use that in PowerScript. I am sorry I can help you with that.

If I made that a Nuget package would that be easier?