C
C#16mo ago
int

✅ InitializeComponent not being found, but `dotnet run` works?

Do I need something for the .NET/Omnisharp/whatever to recognize WPF stuff?
7 Replies
TheRanger
TheRanger16mo ago
can you show the class?
int
intOP16mo ago
using System.Windows;

namespace McPlug;

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
using System.Windows;

namespace McPlug;

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
quite simple
TheRanger
TheRanger16mo ago
are you on VS or VSCode?
int
intOP16mo ago
vsc vs is heavy , on my pc
TheRanger
TheRanger16mo ago
since you have the red Squiggly Line and the error message next to it, you probably already have Omnisharp
jcotton42
jcotton4216mo ago
I'm not sure if the C# ext for VSCode understands XAML codegen probably doesn't, so even though the WPF SDK emits that method at compile time, the IDE tooling doesn't know that
int
intOP16mo ago
aaaaaaaaahhhhhh i'll have to use VS then update: moved to avalonia, no more error 🦅🦅🦅🦅
Want results from more Discord servers?
Add your server