I’m working on a new project that for marketing purposes doesn’t use the .aspx extension for webpages but an alternate extension. These pages work fine but they are definitely harder to develop with in their current configuration. There is one configuration procedure I found online which allowed me to associate the file type with the appropriate page editor in VS. However, I’m still having a couple issues, and I’m hoping someone knows a workaround.
When I’m in the page, Intellisense works fine. When I’m in the code behind, Intellisense works fine. However, when I try to write something in the code behind which references the webpage (like “txtSearch.Text”) Intellisense doesn’t understand that the webpage objects are part of the partial class. The partial class name in the code behind matches the inherits attribute. The codefile attribute references the correct code behind. However, Intellisense can’t find those objects.
The @Page directive has an error message and squiggly underline which is probably related, "ASP.NET runtime error: Could not load file or assembly ‘blahblahblah’ or one of its dependencies. Failed to grant minimum permission requests. However, everything I’ve found on the internet about this relates to missing .dll files, lost assembly references, etc. So I guess it will come as no surprise that none of those techniques has worked for my custom file extension situation.
In Solution Explorer, code behind files are not nesting beneath their webpages, so we’re looking at twice as many files as you would normally expect. I would really like to clean up that behavior.