-1

This CS0030 error occurred after switching from a Windows 10 pc to a new Windows 11 machine.

The solution (and all the code) is located on my onedrive, used both on W10 and on W11. Both systems use thus exactly the same physical solution, project and source files, both systems use VS2022.

The solution compiles without problems on W10. It consists of two projects, a single page site hosted to the public and a private 30 pages site using the Gata namespace where each page uses a GataMaster.master file.

On W11 the single page project compiles and runs without errors.

But all Gata pages fail to run because VS2022 tries to use an ASP namespace instead of the Gata namespace. This causes the following CS0030 error: Compilation Error CS0030

This error occurs for whatever page happens to be defined as startup page at compile time (Default.aspx in this case).

I've searched the whole solution for the word ASP and found only 2 occurrences, i.e. in the generated comment in the two Web.config files, e.g: First lines of a Web.config file So I didn't define the ASP namespace by accident. Not a single solution file was changed when switching to the new W11 machine.

I've got no clue where this ASP comes from, nor how I can avoid this problem.

Any comments and/or suggestions would be most welcome, I really have to switch to the W11 machine but that'd be really painfull without being able to continue development on my Gata pages...

4
  • Please stop using OneDrive folders for your source code. You should switch to a normal folder and use Git to sync among machines. Commented Jun 12 at 16:19
  • This is a purely personal one-developer one-machine environment, and yes I'm using git for source control. I don't have to sync between machines, but unfortunately I did have to move from a Windows 10 to a Windows 11 machine :( Commented Jul 21 at 10:55
  • I updated Visual Studio to version 17.14, the July 2025 Update. I vainly hoped that this would get rid of the CS0030 problem, quod non... Commented Jul 21 at 11:00
  • The mechanism of OneDrive is known to cause many issues (if you search around) with developer tools like VS. So, whatever you do personally or commercially you shouldn't go that way. Commented Jul 22 at 16:17

1 Answer 1

0

Looks like you're getting the error on a cached page. A solution here

What is the "Temporary ASP.NET Files" folder for?

suggests emptying the Temporary ASP.NET files folder.

Sign up to request clarification or add additional context in comments.

1 Comment

I deleted the "Temporary ASP.NET Files" folder, and deleted the bin and obj folders of the failing solution project. To no avail. Still get tne CS0030 error at the first run...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.