oleg-shilo / cs-script.npp

CS-Script (C# Intellisense) plugin for Notepad++ (x86/x64)
MIT License
246 stars 52 forks source link

Problems with NppAutomation in c# script #43

Closed LlewellynJones closed 7 months ago

LlewellynJones commented 4 years ago

I'm having trouble creating a reference to NppAutomation.

Here's my code:

using System;
using System.Diagnostics;
using Npp=NppAutomation.Automation;

class Script
{
    [STAThread]
    static public void Main(string[] args)
    {
        Console.WriteLine("Hello World!");
    Npp.OpenFile("blah");       
        Debug.WriteLine("Hello World!");
    }
}

Error: Specified file could not be compiled.

C:\XXXXX\Documents\C# Scripts\CycleEncoding.cs(4,11): error CS0246: The type or namespace name 'NppAutomation' could not be found (are you missing a using directive or an assembly reference?)

at csscript.CSExecutor.ProcessCompilingResult(CompilerResults results, CompilerParameters compilerParams, ScriptParser parser, String scriptFileName, String assemblyFileName, String[] additionalDependencies) at csscript.CSExecutor.Compile(String scriptFileName) at csscript.CSExecutor.ExecuteImpl()

oleg-shilo commented 7 months ago

I am closing this one as we had a discussion with you in the NppAutomation repo.