New Error when Opening Projects

RogerSchlueter-7899 1,756 Reputation points
2025-01-10T17:34:33.53+00:00

As of today, when I open any solution that has this code snippet:

Windows.Application.  .....

I get this error:

'Application' is not a member of 'Windows'.

This did not occur when I shut down my PC last night and nothing has changed to my system over night. I am at a loss regarding how to proceed.

Developer technologies | Visual Studio | Setup
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

Answer accepted by question author

Tianyu Sun-MSFT 34,836 Reputation points Microsoft External Staff
2025-01-13T06:43:00.8466667+00:00

Hello @RogerSchlueter-7899,

Could these solutions be built correctly before this issue appeared?

Is this issue replicated in a newly created VB project? If so, could you kindly share us the complete steps?

Currently, please try following(clean cache, repair VS and restore NuGet packages):

  1. Rename/Remove the hidden .vs folder in your solution folder, rebuild your solution/project.
  2. Repair VS from VS Installer => More => Repair(this takes some time).
  3. Open VS, click Tools => NuGet Package Manager => Package Manager Settings => check "Allow NuGet to download missing packages" and "Automatically check for missing packages during build in Visual Studio" options => click "Clear All NuGet Storage" => Right-click your solution => Restore NuGet Packages.
  4. In case the issue is caused by the namespace conflict, try to use the complete namespace, see if the error disappears(Windows.Application => System.Windows.Application).

Best Regards,

Tianyu


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.