|
All I've ever done is make the external .DLL's part of the project and mark them "Copy Always". If there was a problem, Clean always worked. I never had to build a special script to do any of this for me.
|
|
|
|
|
One of my colleague had same kind of issue sometime before.
So just try this:
1. Close all the VS and Sql server instances compulsorily, and also browsers and other apps/tools if possible.
2. Stop the local IIS if you are using it.
3. Now, delete the temporary files from the system wherever applicable. Usually you find in Quote: C:\Users\YourUserName\AppData\Local\Temp and Quote: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files and also delete browser temp files if possible.
4. Restart the system.
5. Once system is up, open your project solution in VS and do 'Clean solution'.
6. Build the total solution and then verify whether its fine now.
Hope this help you.
My Reading-o-Meter
Previous -> Read "CLR via C#" by Jeffrey Richter.
Current -> Exploring WCF thru Apress' "Pro WCF" by Chris Peiris and Dennis Mulder.
Next -> Need to read "The Art of Computer Programming" by Donald E. Knuth.
My blog - My recent article
|
|
|
|
|
Mohammed Hameed wrote: 2. Stop the local IIS if you are using it. Most likely it is IIS Express at fault, that you must close in the system tray. I've very often found that to me the culprit of ghost code.
|
|
|
|
|
Ugh. IIS Express. Where one has no idea about which Sites exist and where they are located. Lot's of fun removing old builds/projects...
Yeah, I know there is a config file where every site is listed as in the normal IIS.
|
|
|
|
|
Next step, Format the machine with no Backup and start all over.
Now serious.
When i have situations like that i usually hunt down and kill all of possible Bin files the project is using. Then Rebuild and my problem gets solved.
Paulo Gomes
Over and Out
|
|
|
|
|
I've had the issue where removing buttons and textboxes did not actually remove them after compiling, I eventually tracked it down to a missing
InitializeComponent(); in the form constructor.
Haven't seen the issue where everything is there after creating a new project though.
I found VS 2012 to be quite buggy so I've stuck with VS 2010 for now.
|
|
|
|
|
Mine does that ALL THE TIME.
No chnages I make show up unless I Rebuild rather than build.
And yes, that's even with it set to rebuil automatically.
Only annoying when I forget it does it, other than being annoying on general principles.
|
|
|
|
|
I have had similar issues after updating a WCF reference. I do a "clean" and then manually delete the obj subfolder. Then I rebuild. Works every time I try it.
|
|
|
|
|
MS' standard approach to everything these days seems to be to make something that sometimes works and can possibly be made to work eventually, with luck. Nobody seems to give a damn if anything is *correct*. Your particular story sounds like a corrupted build cache. Ever noticed the "clean" menu item? That is specifically for working around when VS has messed up it's caches and make sure everything gets made from scratch.
Granted, having a build cache does help a lot with build speed in many cases, as VS sometimes manages to correctly work out what has changed and must be rebuilt, and what hasn't and can be taken from the cache. I'll also grant that it may not be completely trivial to ensure the cache status is always correct, given that you may change files in all sorts of ways besides within VS, and given that build actions nowadays may encompass all sorts of things besides just compiling some code (e.g. code generators often execute immediately prior to build).
Even so, it does amaze me how VS sometimes manages to mess it up all by itself. The simplest solution consisting of a single console application project with a single Program.cs file and doing absolutely nothing outside of VS may still cause it to stubmle. But this sort of thing is perfectly in tune with how VS behaves in other respects. It can't modify a file because "another process" is using it, and it turns out it's VS blocking VS. It confidently asserts "all files are up to date" when solution explorer shows a folder with hundreds of files, and your working folder is empty. And for most of these, what do they do? Fix it, so VS behaves correctly? Oh no. They add a special menu option and name stuff so it seems as if YOU are at fault rather than VS. I chuckle whenever I need "get special version" in order to get the latest version and the dialog offers me the choice to fetch files even when the local version matches the specified version. Now what could *possibly* be the point of spending time to replace a file with an identical file? Clearly, MS knew full well about the problem, but was too embarrassed to honestly state "get file even if VS believes it already has it, as it sometimes mistakenly thinks so"....
I'm sure others could add many other examples of this general pattern of sketchy workarounds on top of semi-working base functionality. At least the glory days of VSS have passed - some people lost their entire source history due to it's tendency to occasionally corrupt it's own database files...
|
|
|
|
|
Not in VS 2012, but over the years, yes.
Browsers have cached my files and reused their cached files rather than my new ones.
Clocks have gone wacky on me, resulting in derived files (e.g. executables) with future dates.
Network file systems on machines with wildly different clocks have resulted in future date issues.
Revision control system have restored a file's date.. from a server with a skewed clock.
Precompiled headers have cached old code, which then got used in the build instead of the modified code in the source file.
I've even been the problem on occasion, doing stupid things that caused files not to be rebuilt after changes.
Clearing cached files, and cleaning all derived files and rebuilding, has fixed it for me. However, VS is historically deficient in deleting all derived files, so you may have to find and remove them by hand to truly get everything to rebuild.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
|
|
|
|
|
It sounds to me as though what happened is this: after you'd made your changes, there was a bug in the result - a syntax error or something - and when you came to run it, VS ran the previously-compiled version without telling you... so it looked as though your changes weren't taking effect when in fact, the new code was never compiled. There's something in the options to make it not do that - can't remember where - but by default, that's what it does. It's caught me by surprise a couple of times, too...
|
|
|
|
|
We call them ghosts in the machine...
|
|
|
|
|
Lmao, Ghosts is about right. This had me going for weeks. I just thought it would be something interesting to post and see what encounters other people have had. I seem to find all sorts of bugs with computers and Visual Studios though. The other day my computer told me it couldn't find an operating system, then I restarted it and it worked fine. I thought maybe a good line of work would be penetration testing, considering I'm good at finding bugs, and loopholes.
|
|
|
|
|
If you have two or more projects open, for copying, there could be a memory leak if both have been debugged.
You are probably not notified of orphaned files when recreating a project. When copying a backup project to replace a project in another location you would be asked whether to overwrite files. This would be the easiest way to remove orphaned files; by deleting the project again. These files would not be visible in explorer if the project were deleted but an explorer search for the project would probably find the orphaned file.
Unless you are certain of how to deal with dependent files such as interfaces it is best not to rename, but recreate.
|
|
|
|
|
"Has anyone else come across the bug in Visual Studios 2012 where it runs code that isn't there?"
Ok, with just that statement alone, this had to be said:
I assume you're not referring to the MS bug in general where others tend to inject hacks into your system and run code that neither you, nor any other legitimate vendor, wrote.
|
|
|
|
|
Someone sent me a screenshot of Snipping Tool containing another screenshot. I'm still trying to puzzle out the thought process that led to that.
|
|
|
|
|
How did they even manage it? I can't get it to open twice, and it hides as soon as you start selecting a region (unless they PrintScreen'd the snipping tool)
|
|
|
|
|
1. CTRL+PRINTSCREEN
2. WIN+R => "pbrush"
3. CTRL+V
4. Crop
5. CTRL+S (alternatively, CTRL+A,C if your mail client lets you paste images into mail)
|
|
|
|
|
Right...I said Print Screen was an option...
I generally see the pattern that a person usually uses one method or the other of getting screen shots, not both. So if they were using the snipping tool, I would assume they somehow used the snipping tool to get the screen shot of the snipping tool.
|
|
|
|
|
Yes. And I think someone was wide awake and wanted to create this littly mystery. AFAIK you can only run one instance of snipping tool.
One other possibility I can think of is a remote desktop session. You could pull up the tool on the remote computer and then be distracted, say by an email, and then fire up the tool on the local machine. The tool captures remote desktop output just as easily as anything else on screen, so I suppose this way you could end up with a capture of snipping tool showing it's fresh capture.
|
|
|
|
|
BotCar wrote: I'm still trying to puzzle out the thought process that led to that.
I think their brain hadn't been powered on at the time, so no thought process was active.
brisingr_aerowing@Gryphon-PC $ rake in_the_dough
Raking in the dough
brisingr_aerowing@Gryphon-PC $ make lots_of_money
Making lots_of_money
|
|
|
|
|
Can you make a screen shot of that?
The signature is in building process.. Please wait...
|
|
|
|
|
A screen shot? They are modern! We received photographs of screens taken with a digital camera.
At least they did not use an analog camera and then faxed the photo (after scanning the photo, doing some photoshop, and printing it again).
|
|
|
|
|
Bernhard Hiller wrote: We received photographs of screens taken with a digital camera
Ugh, don't remind me: I've seen those too. I've also seen documents being emailed, printed out, scanned, and then emailed again for no good reason.
Bernhard Hiller wrote: At least they did not use an analog camera and then faxed the photo (after scanning the photo, doing some photoshop, and printing it again).
I dread the day when I see that happening, and I probably will.
|
|
|
|
|
BotCar wrote: I dread the day when I see that happening, and I probably will.
Dunno - the average luser would be hard-pressed to find real film stock any more...I certainly haven't seen any for ten years or so!
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|