C# compiler in Visual Studio compiles but not change in output

Posted on 2013-10-28
Last Modified: 2013-10-29

I have checked in a code from TFS and compiled it however, I don't see the change I am expecting in output.

I did compare my local file (where I can see changes are applied) line by line with the one on TFS  and even removed Bin/Debug/*.* files.

How can I fix this?

Question by:akohan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39607285
Do any dialog boxes appear during compilation?
LVL 25

Expert Comment

ID: 39607301
If your project is part of a solution then the output will be in the solution's Bin folder. Check it on your PC

Author Comment

ID: 39607407
@ kaufmed,

That is what did ... so I added a MessageBox.Show("some messages") in the block and it worked fine but when I take it off, same thing happens. Currently I am tracing. Any comments?

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39607457
I'm not looking for ones you created, rather I am looking for a specific one:

If you got this dialog, and you clicked "Yes", then Visual Studio ran the last build that compiled successfully.

That said, the fact that adding in a MessageBox of your own seems to work, but without it it does not suggests that the dialog I referenced above is probably not at play here.

Can you retrace your steps here for us so that we can see what the process you performed was, start to finish?
LVL 34

Expert Comment

ID: 39608869
so I added a MessageBox.Show("some messages") in the block and it worked
you should put a breakpoint at the same place where the message box was.

but when I take it off, same thing happens.

can you post the change you made and tell what expected and what happened?

LVL 34

Accepted Solution

sarabande earned 340 total points
ID: 39608900
note, when the messagebox appears the code obviously was in the build. it is not very likely that it is a different case when you commented the message box.

if you accept this to be true, you might think of another reason for the strange behavior. for example, the change was made in an if block but the condition never was true. or, you were fooled by a similar named variable. or, a baseclass and a derived class have a member variable with same name. or, there is an exception raised which was handled but not shown. or the function you call is not overloaded in the derived class. there are a lot of possible reasons, but the first thing is, that you look for your own faults rather than assuming that vc compiler or tfs have a bug (what is possible but not very likely).


Author Comment

ID: 39609298
Yes of course. The part of code which was being ignored was supposed to show several cells on a canvas and found when I insert a message box it works because canvas is losing the focus so I had to move the code to a place such it gets executed before canvas loses its focus.

Thank you

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity AddWithValue when using IN condition 7 45
How to force output to ascii 2 62
Create a Dropdown list with sub group 10 43
Visual Studio 2015 auto inserted code 12 88
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question