I started adding comments to the code while i am developing the app (objective-c). The bad thing which i am noticing is the breakpoints and warning or error reporting, it is actually showing a wrong line number or pointing to incorrect line number, is there a solution for this problem. Thanks.
This is usually a problem with your Derived Data, the build products that are cached after each build so they don't have to be rebuilt if they aren't changed. The problem is, sometimes Xcode doesn't recognize a change, and what you see in the editor no longer matches the build product. Clean your product with Shift Command K to do a full rebuild. This should fix the inconsistencies you're seeing.
Related
New to VisualStudio 2015, but not to programming. Have searched both Google and here for a lead on this, but considering the available search terms, I might not immediately uncover them.
I was looking into porting an old VB6 (200k+ LoC) to VB.Net in VS2015. Mostly just poking around to determine viability. Using a project converter, and have resolved most of the initial errors, and am familiar with how the Error List works.
However, it is throwing a new one at me. It now only has two lines of error, both showing the same thing. They both say:
" & ErrorName
That's a Quote, Ampersand, and ErrorName. That's all that show up on the error list line. No file. No line number. Double click on them does nothing.
I thought perhaps the project was corrupted, so I completely re-created it, adding all the modules, forms, classes, etc again, and it found a lot more errors to fix, which I fixed, and now these two lines show up again.
Does anyone have any indication where this is coming from, or, better yet, how to fix?
I've seen VB programmers report this misbehavior before, never with a good lead to explain the problem. It is specific to VS2015, the Roslyn integration caused many issues. In general a very buggy release, be sure to apply all available Updates, currently up to Update 3. If you have a license that includes an MSDN subscription then I recommend you install VS2012, the last "good" version of VS that was not yet affected by Microsoft's new focus on agile development.
I think the underlying issue is caused by the IDE simply not parsing the compiler error message correctly. Probably having to do with the statement with the error getting quoted in the message. Getting only part of the statement text and it fumbling quotes is a pretty good hint that this is where it went wrong.
So look at the actual output of the compiler, decent odds you'll now see the full error text. Use Tools > Options > Project and Solutions > Build and Run. Change the "MSBuild output build output verbosity" setting to Normal. After the failed build, use View > Output to see the compiler output. You'll probably have a lot of messages, consider copy/pasting the content.
I've got serious issues with XCode right now and i cant really figure out what to do, or even whats wrong.
The project i'm working on was working perfectly yesterday, but today when i started it i got like 20 "Redefinition of enumerator" errors, and to the point where "Too many errors emitted. Stopping now".
The wierd part is that ALL my backups of the project does this aswell. Even the ones from 2,3 or 4 days ago which hasnt been altered.
No other project seems to be affected by this.
I've tried Cleaning the build, removing Derived data, checking for duplicate files somehow (even though that shouldnt be possible), all linker seems to be in order. Anyone got any tips for me?
Thank you!
you should import
#import "Facebook.h"
instead
#import <FacebookSDK/FacebookSDK.h>
I just had this exact problem about "Redefinition of enumerator" errors coming out of nowhere.
The problem was that accidentally (maybe some unintended drag with the mouse) I had copied one of the project directories into some other, thus duplicating it.
On the other hand I use git and generally was using 'git status -uno' which hides untracked files.
So I was not seeing the untracked duplicated directory that was duplicating enums in the project, from my perspective I had a clean HEAD with weird errors :S
Lesson learned: use .gitignore rather than '-uno' option
This issue still happens in 2019 smh.
If you get this go check File->Workspace Settings and set build system to Legacy Build System. This should fix the issue.
I had the same error and was really stuck. But found that the project folder nam had white spaces. I changed that and the error went off!
Eg: Changed folder name My Project to MyProject
For anyone has the same problem, who pulled out hair for hours/days.
Let's double check and remove redundant Header Search Paths, delete Derived Data if needed.
After that, the issue will be resolved.
I'm seeing a strange build bug a lot. Sometimes after typing some code we receive the following build error.
Class 'clsX' must implement 'Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs)' for interface System.ComponentModel.INotifyPropertyChanged'.
And
'PropertyChanged' cannot implement 'PropertyChanged' because there is no matching event on interface 'System.ComponentModel.INotifyPropertyChanged'.
Those error should never go together! Usually we can just ignore the exception and build the solution but often enough this bug stops our build. (this happens a lot using Edit and Continue which is annoying)
We're using Vb.net and c# mixed in one big solution.
Removing the PropertyChanged event and retyping the same code! sometimes fixes this.
Question:
Has anyone else seen this problem and has some suggestions how to prevent his?
We're using a code generator that causes this error to surface but just editing some files manually triggers this exception too. This error occur's on multiple machines using various setups.
Someone had the same exact issue discussed here. It sounds like there is an issue with this build picking up an old version of a binary. I would try the following in order:
Verify all assembly references use project references where possible within the Visual Studio solution.
Disable build parallelization in case there is some weird file locking issue with concurrent project builds. Go to Tools -> Options, Projects and Solutions -> Build and Run, then set "maximum number of parrellel project builds" to 1. Not the best solution but it may help narrow down the problem.
Disable the Hosting Process in case it's locking some file causing an assembly to not get rebuilt correctly. For C# project go to Project Properties, Debug tab, and uncheck "Enable the Visual Studio hosting process". For VB.NET project you'll need to Unload Project, Edit the project file, and add <UseVSHostingProcess>false</UseVSHostingProcess> to the PropertyGroup of each configuration. Again, not the best solution but you probably won't notice a difference.
Lastly, try doing a Clean + Build to try and resolve the issue when it occurs (I know this is not a fix but it's easy enough to do), also Rebuild may be slightly different than Clean + Build so try the latter if the former doesn't work.
As I can not comment due to lack of appropriate points.
But I would like to share one of my experience:
In an aspx.cs page I was working, used to compile fine and some time gave mysterious error of a variable not defined or function not defined or sometime variable or the function defined two times. I changed possibly each and every variable and function name but there seemed no effect , but after entering a simple space or a new line at any place in the file used to solve the compile error. At one time I tried to save the file (in a different encoding as i am used to experiments) and found that the file was not saving in the correct encoding (i.e. the ansi encoding because the file had a unicode character ), I removed the unicode character and that compile error didn't bothered me again.
This unicode character problem could be (not a hard and fast rule) there so you could check it.
Nuke & restore using source control (TFS instructions here):
Make sure you have everything checked in
Exit Visual Studio
Rename the project directory to .Bak (effectively deleting it)
Reopen Visual Studio and in source control:
Get Specific Version
check 'Overwrite... not checked out' and 'Overwrite ... even if local version matches'
Re-open project
Another problem: Make sure some source files are not newer than the current date (or your date is set back). Often this happens in apps where you are doing logic that requires certain things to happen differently on certain dates. You change your clock to test it, make a revision to the source with the date advanced, set the date back, and viola, rebuild does not rebuild that file.
You say 'typing it in again' - can you try just saving? After 40 years since MULTIX the .net build still decides what has changed by checking the file timestamp.
good luck!
When you get the error, is it always on the VB calling C# side, or vice-versa, or does it work both ways?
If the answer is either of the first two situations, try building the "callee" project within the solution before building the "caller" project to see if it stops the situation.
Also, just in case it may jog something for you to think about, does this error crop up when you change a VB file or a C# file, or is there no correllation?
Oh, and sorry this looks like an answer instead of a comment, I cannot post comments yet (need 50 rep).
I inherited a VB.Net solution (VS2005) that I've just cleaned up.
I've gotten a clean build except for this warning:
Warning 1 Maximum number of warnings has been exceeded.
I could understand the first error if I actually had 100 warnings, but I don't. I'm a stickler for clean builds. Any ideas why I'd still be getting this message?
Maybe You Have Unloaded file in your Project
if you work in team and use source control like TFS make sure other developer checking in all file like entity model and etc..
if your problem does not solve after this step remove all file in "Temporary ASP.NET files" and close your visual studio
last way for resolve this error is changing target framework in solution and then Return it to previous state
I hope your problem will be resolved after this steps :)
I am having a CI setup with incremental build. As part of the static checking, I am planning to configure a incremental PC Lint report - This report ignoring all other previous Lint report should provide the errors induced in the new code only. Is there any tool which would do this?
Any hint on the relative area to explore would help us.
I tried report diff'ing. But since the line number would vary from last check-in, would not get the actual incremental error introduced.
I am using Linux for my project build, and using Windows for PC Lint report generation.
Regards,
Wouldn't it be easier to just fix all the reported errors, and have a strict policy against creating new ones? That way you don't need to worry about diffs which by the nature of the problem is going to be hard to impossible.
You could write a script that takes the warnings from lint, removes the line numbers and adds a few lines from the source code around where the warning occurs. Diffing this would show all new lint warnings. One flaw in this, is that it would also show any warnings where source was modified near an existing warning without fixing the warning. On the other hand, this might actually be useful.
Years ago, I saw a utility on BDS Unix that would take your compiler errors and stuff them into your source code as comments. Which might be useful for this exercise. Unfortunately I can't remember what it was called.