© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
2 replies
Furinaxi

Cannot find method although defined and used?

I'm currently creating a WPF project and have this static class:

namespace KupoFinder.AppConfigHandler;

public static class AppConfigHandler
{
    private const string ConfigFileName = "KupoFinder.settings.json";

    public static void CheckConfigFile(){}

    // ...
}
namespace KupoFinder.AppConfigHandler;

public static class AppConfigHandler
{
    private const string ConfigFileName = "KupoFinder.settings.json";

    public static void CheckConfigFile(){}

    // ...
}


And I use it in my ViewModel like this:
using CommunityToolkit.Mvvm.ComponentModel;
using KupoFinder.AppConfigHandler;

namespace KupoFinder.MVVM;

public partial class MainWindowVM : ObservableObject
{
    public MainWindowVM()
    {
        AppConfigHandler.CheckConfigFile();
    }
}
using CommunityToolkit.Mvvm.ComponentModel;
using KupoFinder.AppConfigHandler;

namespace KupoFinder.MVVM;

public partial class MainWindowVM : ObservableObject
{
    public MainWindowVM()
    {
        AppConfigHandler.CheckConfigFile();
    }
}


But I get the error:
Cannot resolve symbol 'CheckConfigFile'

It should find it tho cuz my VM has a dependency on it. Does anyone see the error?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Non-invocable member cannot be used like a method
C#CC# / help
3y ago
Non-invocable member cannot be used like a method?
C#CC# / help
4y ago
Cannot Resolve Method
C#CC# / help
8mo ago
Non-invocable member 'NotFound' cannot be used like a method.
C#CC# / help
3y ago