Search code examples
wpfxaml

Auto generated view.g.cs page keeps including old using statements?


I'm having a pretty difficult time with my resources within the view pages.

The auto generated view.g.cs page keeps including old using statements and I can't get it to stop. I have about 12 views and it will only do it on the first one, but then I delete that file completely and it then adds them to the next view. I've tried recreating the views and but the first one with the generated file still fails. I then set the build option to none, cleaned, rebuilt, and back to page, and it still happens!

I've tried deleting the actual generated files in the obj folder but they just get created again and the first view in my list then screws up again.

Any way around this? I think I've exhausted my options other then recreating the project but I'd prefer not to do this. Any other way to fix the generated files?

Cheers.


Solution

  • Figured out the issue, I had two warnings that said the new namespace was declared twice in the same file... builds successfully.

    Cheers.