Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

debugging class errors in ashx files vs2012

$
0
0

Hi All:

Please forgive me as I've come to rely on VS handling all my classing and namespacing, without ever really understanding the relationship between classes and namespaces. Embarassed

I have a VS2012 web project which I'm allowing to automatically control the namespacing and classing...in other words, I'm not manually adding namespace directives in my class files.

I ran into the problem of inadvertently naming a class with the same name as the "Root namespace" of the project, which VS allows me to do, but then throws a compilation error when you run the project.

After much googling, I stumbled across the suggestion to change the root namespace name in the project properties "application" settings, and VS does a nice job of renaming any automatically prepended class names in the aspx files (VS correctly updates the"inherits" classname when you change it in the application settings).

The only problem I ran into is in my generic webhandler ashx files. It seems only in those files, the class name is not updated:

<%@ WebHandler Language="VB" CodeBehind="myfeed.ashx.vb" Class="oldClassName.myfeed" %>

I stumbled upon that after rebuilding and publishing my project. This class-mismatch doesn't show up when I "build", "rebuild" or "clean" the project, and it doesn't show up when I run code-analysis on the project.

I'm just wondering why the generic handler is not getting updated, when all the other files in the project are, and if there's any way to catch this class-mismatch when debugging in VS2012?


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>