-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest unstable version (v0.9.12) doesn't launch #375
Comments
Can you share your workspacer.config.csx file? I believe this is an issue with the configuration and not the release I have a feeling it's because of your references to the plugin dll files ensure all of the referenced file path's are correct because i'm using the latest version and it's running perfectly okay |
@Zinvoke I'm using latest stable version and it's ok. With the unstable version I get this error. My config is pretty simple: #r "C:\apps\workspacer\workspacer.Shared.dll"
#r "C:\apps\workspacer\plugins\workspacer.Bar\workspacer.Bar.dll"
#r "C:\apps\workspacer\plugins\workspacer.ActionMenu\workspacer.ActionMenu.dll"
#r "C:\apps\workspacer\plugins\workspacer.FocusIndicator\workspacer.FocusIndicator.dll"
#r "C:\apps\workspacer\plugins\workspacer.TitleBar\workspacer.TitleBar.dll"
#r "C:\apps\workspacer\plugins\workspacer.Gap\workspacer.Gap.dll"
using System;
using workspacer;
using workspacer.Bar;
using workspacer.Bar.Widgets;
using workspacer.ActionMenu;
using workspacer.FocusIndicator;
using workspacer.Gap;
Action<IConfigContext> doConfig = (context) =>
{
// Uncomment to switch update branch (or to disable updates)
//context.Branch = Branch.None;
context.AddBar(new BarPluginConfig() {
BarTitle = "workspacer.Bar",
FontSize = 14,
FontName = "Segoe UI",
RightWidgets = () => new IBarWidget[] {
new TaskWdiget(),
new TimeWidget(1000, "HH:mm"),
new ActiveLayoutWidget()
}
});
context.AddFocusIndicator();
var actionMenu = context.AddActionMenu();
actionMenu.DefaultMenu.AddFreeForm("hello", (s) => Console.WriteLine(s));
context.AddGap(
new GapPluginConfig()
{
InnerGap = 10,
OuterGap = 5,
Delta = 5
}
);
context.DefaultLayouts = () => new ILayoutEngine[] {
new DwindleLayoutEngine(),
new TallLayoutEngine()
};
context.WorkspaceContainer.CreateWorkspaces("1", "2", "3", "4", "5", "6", "7");
context.WorkspaceContainer.CreateWorkspaces("Zoom", "Music", "IM");
context.Keybinds.Subscribe(KeyModifiers.Alt, Keys.D0, () => {
context.Workspaces.SwitchToWorkspace(9);
});
context.CanMinimizeWindows = true; // false by default
context.WindowRouter.AddRoute(WindowRouter(context, WindowToDesktopMapping));
context.WindowRouter.AddFilter(ShouldTileWindow);
context.Keybinds.Subscribe(KeyModifiers.Alt, Keys.Z, () => {
context.ToggleConsoleWindow();
});
context.Keybinds.Subscribe(KeyModifiers.Alt, Keys.F11, () => {
var window = context.Workspaces.FocusedWorkspace.FocusedWindow;
if (window.IsMaximized) {
window.ShowNormal();
} else {
window.ShowMaximized();
}
});
context.Keybinds.Unsubscribe(KeyModifiers.Alt, Keys.Enter);
};
return doConfig;
public Func<IWindow, IWorkspace> WindowRouter(
IConfigContext context,
Func<IWindow, string> mappings
) {
return (window) => {
var workspaceName = mappings(window);
if (workspaceName == null) {
return null;
} else {
return context.WorkspaceContainer[workspaceName];
}
};
}
public string WindowToDesktopMapping(IWindow window) {
/**/ if (window.Title.Contains("Zoom")) return "Zoom";
else if (window.Title.Contains("YouTube Music")) return "Music";
else if (window.Title.Contains("WhatsApp")) return "IM";
else if (window.Title.Contains("Messenger")) return "IM";
else if (window.Title.Contains("MTGA")) return "5";
else return null;
}
public Boolean ShouldTileWindow(IWindow window) {
return !ShouldSkipWindow(window);
}
public Boolean ShouldSkipWindow(IWindow window) {
return window.Class.Contains("SunAwtWindow")
|| window.Title.Contains("Window Spy")
|| window.Class.Contains("GlassWndClass-GlassWindowClass");
}
public class TaskWdiget : workspacer.Bar.BarWidgetBase
{
private int index = 0;
private string[] msgs = {
"hello",
"world"
};
public TaskWdiget() {
}
public override workspacer.Bar.IBarWidgetPart[] GetParts() {
return Parts(Part(msgs[index], partClicked: () => {
index = (index+1) % msgs.Length;
MarkDirty();
}));
}
public override void Initialize() {
}
} |
DLLs are all in correct places. I don't think it's config related. Maybe it's environment related? Maybe you have something installed that I don't and the DLLs try to use that? The error in english would be something like this:
In my config I have not used any global name |
If you are using function-valued parameters anywhere, you are implicitly creating var x = "123"; // System.String
var y = () =>
{
Console.WriteLine("Hey there!");
}; // System.Action That said, I'd consider it weird if System-references are not implicit or working. |
To me it's really surprising that it works with one version and not the other. |
@Zinvoke totally unrelated question to this issue. But, are you Windows 11? If so, what task bar and icon theme are those? |
Okay, I've done some tests and this must be related to my build environment.
I'm not C#-native so I have no idea how to even debug this further. Do you have any ideas? Are there any instructions on how to setup build environment for developing Workspacer (or any C# project for that matter :D)? |
CC: @tlsomers Do you think this could be related to your F# changes? |
Seeing as plugins don't do anything until they're activated, it's not likely to be the case. I'm guessing it might be using a different .net SDK or runtime somehow. Will investigate later today or tomorrow |
Hi, I'm having the exact same issue on windows 10 after updating from stable to latest unstable from 3 days ago (tagged 0.9.12) Microsoft.CodeAnalysis.Scripting.CompilationErrorException: error CS0400: The type or namespace name 'System.Action`1[[workspacer.IConfigContext, workspacer.Shared, Version=0.9.11.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be found in the global namespace (are you missing an assembly reference?)
at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.ThrowIfAnyCompilationErrors(DiagnosticBag diagnostics, DiagnosticFormatter formatter)
at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.CreateExecutor[T](ScriptCompiler compiler, Compilation compilation, Boolean emitDebugInformation, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script`1.GetExecutor(CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script`1.RunAsync(Object globals, Func`2 catchException, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Scripting.Script`1.RunAsync(Object globals, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.RunAsync[T](String code, ScriptOptions options, Object globals, Type globalsType, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.Scripting.CSharpScript.EvaluateAsync[T](String code, ScriptOptions options, Object globals, Type globalsType, CancellationToken cancellationToken)
at workspacer.ConfigHelper.DoConfig(IConfigContext context) in D:\a\workspacer\workspacer\src\workspacer\Config\ConfigHelper.cs:line 70
at workspacer.workspacer.Start() in D:\a\workspacer\workspacer\src\workspacer\Workspacer.cs:line 52
at workspacer.Program.Run() in D:\a\workspacer\workspacer\src\workspacer\Program.cs:line 148
at workspacer.Program.Main(String[] args) in D:\a\workspacer\workspacer\src\workspacer\Program.cs:line 73 |
I found the issue!! scoop uninstall workspacer |
It shows this error message:
The text was updated successfully, but these errors were encountered: