1

This is a long shot, but I'm stressed out of my mind trying to figure this out. I can't provide significant amounts of source due to my NDA, but I'll try to give as much as I can.

I've been asked to make changes to one of our web applications. I'm at an international company and I've never worked on anything this large-scale before (I'm relatively fresh out of college), so it's a little overwhelming by nature, but what makes it ten times worse is that I can't debug the application!

When I click my friendly green arrow, I'm greeted with several errors (circular references and missing references, typically in .master files).

The part that doesn't make sense to me is that our contractors continue to modify and debug our application every single day. There must be something I'm doing wrong. When I asked them to show me how to begin the debugging process, they adamantly refused, essentially claiming it was a trade secret. This seems at best a case of dubious ethics and at worst a potential lawsuit and violation of our contract with them, but that's for another story.

I have a feeling it's a very quick solution, but my searches have turned up nothing.

We also have a second web application that was touched by a different company, and I can't compile that project either, though with different errors. The professionals appear to know some trick that I do not.

What's also frustrating is that this situation has made me look like a totally incompetent CS grad to my non-programming manager. I know how to use the Debugger, and I know C#/.NET, but I'm at a roadblock, and I'm the only programmer at my company (so internal help is out of the question).

Can anyone help me out? I'll provide limited source if needed.

Edit 1 - A brief list of unique errors is below. I've replaced sensitive information with wildcards.


'*tools_master' does not contain a definition for 'btnSave_onClick' and no extension method 'btnSave_onClick' accepting a first argument of type '*tools_master' could be found (are you missing a using directive or an assembly reference?) | *tools.master

Circular file references are not allowed. | *\App_Master\Account.Master

Could not load type '*AddressDisplay'. | *AddressDisplay.ascx

Unknown server tag '*:LeftNav'. | *App_Master*Home*.Master


Edit 2 - In addition, the site builds and deploys just fine. It's only debugging that errors show up.

Edit 3 - I've managed to fix the circular reference errors thanks to Kash's response. The rest will have to wait until at least tomorrow.

wmaynard
  • 238
  • 1
  • 3
  • 12

5 Answers5

2

Have you tried rebuilding the entire solution in Debug mode? You should see these errors there.

Each of these errors have multiple causes. My advice would be to take each one separately and research. One solution would usually fix the others.


The first error:

'*tools_master' does not contain a definition for 'btnSave_onClick' and no extension method 'btnSave_onClick' accepting a first argument of type '*tools_master' could be found (are you missing a using directive or an assembly reference?) | *tools.master

Master pages can be tricky. Try removing the button and adding it again. Also try checking the Codebehind and the MasterPageFile attributes of the Page directive. E.g.,

<%@ Page Title="" Language="C#" MasterPageFile="~/PageTemplate.Master" 
AutoEventWireup="true" CodeBehind="NewTransport.aspx.cs" 
Inherits="ASPDU1.NewTransport" %>

The 2nd and the 3rd errors:

Circular file references are not allowed. | *\App_Master\Account.Master Could not load type '*AddressDisplay'. | *AddressDisplay.ascx

This usually happens when you have a usercontrol on a master page. Numerous suggestions on StackOverflow itself.


The 4th error:

Unknown server tag '*:LeftNav'. | App_MasterHome*.Master

This usually means that you do not have a .NET component or a 3rd party .NET library installed. Are you using Sharepoint or Telerik controls?

Community
  • 1
  • 1
Kash
  • 8,799
  • 4
  • 29
  • 48
  • I'll start looking into these now. As for the fourth error - our original developers (with whom we do not have a good relationship) created our application with proprietary libraries, so that's where the 3rd party libraries are. One of my tasks is actually to rewrite as much of their functions as I can to reduce reliance on source we can't access. – wmaynard Jun 27 '13 at 20:27
1

Are you able to successfully build this application? It doesn't sounds like you are. That would be my first priority because I wouldn't know how to debug if the program doesn't compile or build.

Recommend you try a "hello world" console application or likewise and see if your debug works with that.

More specifics would be appreciated if you'd like to get to the bottom of this. Could you include some of the steps you've taken so far?

joynoele
  • 393
  • 4
  • 16
  • Yes, it builds just fine, which is the strange part to me. I can't debug it, though, and making significant changes without being able to do so is not a good way to do anything. I've added the errors in an edit. I've tried setting batch="false" to fix the 'circular reference' issues, as per some Google suggestions, and that didn't help. – wmaynard Jun 27 '13 at 20:05
  • Agreed on the not making significant changes before stabilizing your workspace. Might be rudimentary, but how much can you comment out so you are able to "bypass" these errors? or does that make a difference? (and is this by chance SharePoint?) – joynoele Jun 27 '13 at 20:14
  • I've probably commented out about 35 lines trying to get this all to work and different errors then continue to pop up - it actually seems to make it worse to comment out most of the offending lines. The strangest part to me was that one line, in particular, continued to throw an error despite being commented out. – wmaynard Jun 27 '13 at 20:18
  • Your solution might be building fine on Release mode. Can you check and change it to Debug mode and see if it builds? – Kash Jun 27 '13 at 20:27
  • Since this is in our development server, it's always been set to debug, but yes, it still builds in debug mode. Thank you for your time and suggestions, by the way. – wmaynard Jun 27 '13 at 20:37
0

It seems that your project is having lots of references to organizational defined DLLs etc. If it is saying ***are you missing a using directive or an assembly reference? then it looks like your machine's GAC or your project might be missing some references (may be organizations standards) that by default are there on everybody else's machine who have installed those components.

Guanxi
  • 3,103
  • 21
  • 38
  • Our contractors are using remote desktop for all of their development as far as I know - we only allow access to our databases from within the network, so I don't think it's possible for them to have a different environment setup. I could be wrong, so I'll look into it. – wmaynard Jun 27 '13 at 20:13
  • I too used to work using remote desktop or Citrix. we had some organizational components that comes installed if I am getting somebody's used machine, but If I am provided with a freshly build machine, then I'll have to go with process of installing those components – Guanxi Jun 27 '13 at 20:16
  • I just confirmed that yes, our contractors are only using remote desktop to access our development environment. If that's the case, there shouldn't be anything I need to install. When I remote in, I'm getting the same exact setup they do, but I'm still unable to do anything. – wmaynard Jun 27 '13 at 20:22
  • Even though you are using the same development environment, you might be building on a different code base. Are you using source control like TFS? – Kash Jun 27 '13 at 20:25
  • While I did set up SVN, our contractors have never used it. They create a physical backup in a separate directory every time they're going to make any changes and leave the working source in the same location. – wmaynard Jun 27 '13 at 20:35
0

sflancer06 -

If I understand correctly, you can Start Without Debugging ... but you cannot Debug ... is that correct?

Is it possible you have extra files?

I've experienced tremendous grief myself when people re-name a file (default.aspx.cs becomes default.aspx.old) but don't actually remove it or exclude it from the project.

(i.e. Sometimes you have two files with the same class name.)

Are you using a Web Site or Web Application?

Are you sure you have a 'clean' project/solution?

Regards,

Glen J Fergo

Glen J Fergo
  • 134
  • 1
  • 1
  • 9
  • I am able to build just fine - but I cannot debug. The solution consists of a website and several projects, and I'm not seeing any lazily-named backups (default.aspx.old, for example), as we do have SVN set up. – wmaynard Jun 27 '13 at 20:33
0

You are coming in at a disadvantage if you cannot get your project to build.. Having been in this situation before, I would recommend you work with your consultants to get you into a situation where your project builds successfully. They will be familiar with the nuances in the project to get it to build.

Remarking out lines is a red herring, because the root of your problem (my educated guess) is that either you are missing assembly references in your project, or you don't have the latest version of the source. Working with your co-workers/consultants is the best way to resolve that.

Only once you have complete knowledge of how the application works are you then at a position to start replacing functionality. Although this isn't a solution per se, it may be the best answer you could hear, since it will get you moving forward.

Good Luck!

Snives
  • 1,226
  • 11
  • 21