Getting erroneous "Maximum number of warnings has been exceeded" - vb.net

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 :)

Related

VB.Net Website project returning errors which are not errors when I try to build it in vs2019

I made some changes to a VB.Net website project in Visual Studio 2019, and then I merged them into the UAT project in TFS, so that they can be published to our UAT site. When I try to build the project the Error List contains one item stating:
Maximum number of errors has been exceeded.
When I look at the Output tab I can see a long list of errors, but when I investigate them they are not errors at all. Some of the messages indicate syntax errors, but when I view the code nothing is highlighted and it all looks fine. Some of them say that a variable has not been declared, but it has. I also get Character is not valid errors - but again nothing is highlighted.
I should say that none of these errors is in any of the files I have been working on so they should be the same as the code which works fine on the UAT site. I already tried deleting the .vs folder and removing related folders from the Temporary ASP.Net Files folder, which fixed some issues I was having earlier, but not these errors.
I don't want to rant, but I feel like if Microsoft had a better testing regime there would be less of these sorts of issues and developers wouldn't need to waste so much time trying to work around their mistakes. I'm completely stuck at the moment so any suggestions would be gratefully received.
I wish I could say I know how to fix this but I don't. All I know is after a mixture of visual studio restarts, failed publishes, and a couple of fixed references the project now compiles and even publishes.
That would've been a lot easier and less stressful if visual studio provided more accurate error messages

Xamarin: Any universal fix for ContentPage/StackLayout/AnyControl was not found

Sometimes I get an error that Nothing in the Xaml-file is not found. This sometimes is fixed by restarting VS, Restore NuGetPackages, re-installing xamarin.forms nuget in combination with clean and removing obj-folders. But this is getting rather tiresome, and non of that works now.
The type 'StackLayout' was not found. Verify that you are not missing
an assembly reference and that all referenced assemblies have been
built.
Is there any universal fix on this or perhaps get a more accurate error message?
As I understand, this has been a problem for a long time with Xamarin forms
Seems to work reasonably well if you make sure the xaml-file´s Build Action is "Embedded resource" and not for example "Page". You can at least build, but you still get Intellisense-errors when you look at the pages
Many thanks in advance

How to find specific implicit conversion in VS2013? [duplicate]

When building an application in Visual Studio. It shows the following error when exceeding the error count
fatal error C1003: error count exceeds 100; stopping compilation
Is there a way to increase the error limit?
This limitation is hardcoded. Here is the post from the MSFT employee in the microsoft.public.vsnet.general group dated 2006 (look for 'Fatal Error C1003'):
Hi,
Unfortunately this 100 limitation is
hard coded and cannot be changed. It's
just inpractical to keep all errors
information around since one error may
cause other several errors.
I hope you understand the rational
behind this design by our product
team. However, if you still have
concerns about this, please feel free
to submit your feedback at
http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220
which is monitored by our product
team. Thank you for your
understanding.
Sincerely, Walter Wang
(waw...#online.microsoft.com, remove
'online.') Microsoft Online Community
Support"
I don't think so. VS basically reports all errors it encounters during compilations. There might be some erroneous parts of the code that make the compiler getting caught in an infinite "error" loop.
The limit was implemented to avoid that. In most cases the 100 errors you get are just the same error reported over and over again. What would be the sense in increasing the number of repetitions?
Maybe you can post the code snippet where the error occurs first, so we can help you fix it.
I believe that it is a hard-coded limit, so no.
As others have commented, it's difficult to understand what you want to achieve by this.
At the end of the day, you'll have to fix them all, so get stuck in and start fixing them. Eventually, you'll get below 100, and you can start counting them.
It is not normally valuable to report the actual number of errors when this occurs. Most of the time, when you get C1003, it's actually only a few real errors, leading to a massive chain of other errors.
(e.g.)
If there is an error in a .h file, that error will be reported in every .cpp file that #includes it.
If there is an error that prevents any kind of identifier being defined (e.g. a class, variable, method name), then every time you try to use it later on, an error will be reported.
Workaround to reduce number of reported errors:
rename cl.exe to cl-orig.exe
roll your own cl.exe that launches cl-orig.exe, capturing its stdout / stderr
parse stderr, looking for error messages and counting them
breaks after first n errors
See http://msdn.microsoft.com/en-us/library/ms682499(v=vs.85).aspx for some hints.
I also have a project like this: sometimes Visual Studio decides there is a lot to do, emits 100 really irrelevant messages about other parts of the solution and aborts the build because it reached the message limit without working on the project I'm interested on.
The workaround we have found is to use msbuild to build the solution from a command prompt: the Use MSBuild walkthrough outlines the steps. msbuild outputs all messages to the console and once the build completes we can work and debug again in Visual Studio. Not ideal, but it lets us complete the task at hand.

Only Shows Error List For One vb File

I'm kind of new to Visual Studio. I've built a few simple programs in it, but now I'm in the process of rewriting a huge system I wrote in VBA. What is frustrating me is the Error List in VS is only listing errors for one .vb File in my project, lets call that VBFile1. Now, when I work on another vb File, VBFile2, which is in the same project as VBFile1 no red squiggles or errors are listed for VBFile2. I don't understand how this could happen. This is what I've tried/checked:
Filter is set to 'Current Project' and I played around with the other Filter settings but no change.
Checked the Text Editor under Options and according to the research that I've already done it is fine. Plus, I have never changed any of these settings anyway.
Closed and re-opened Visual Studio.
Closed all open files in the Project and still displays the same error list
Close all files except the VBFile2 but still shows the same error list of VBFile1.
I have Visual Studio 2012 Ultimate. I feel like this should be an easy fix...I just am really confused what's going on.
Hope this makes sense!
UPDATE: Excluded from project, VBFile1 and finally errors are listed for VBFile2...why would this be?
I am not sure if it has been fixed in Visual Studio 2012, but there is a Connect Request for Visual Studio 2010 with a resolution of won't fix because of performance issues. The effect your are seeing is because you have exceeded the maximum number of errors for that project (what I am used to seeing is 102 as the threshold), it will not show you anymore till you fix the ones that it has already shown you.
According to this MSDN article, which I found through this SO question the limitation is still there for the IDE but has been removed for the command line compiler.
From above MSDN Link:
Limitless (Command-line) Errors!
This is actually a good thing, let me explain. For performance reasons, the Visual Basic IDE maxes out at 101 errors (with error #102 being “Maximum number of errors exceeded.”) This can make it difficult to estimate the amount of work remaining in certain situations, particularly in upgrade scenarios. We have removed this limit from the command-line compiler in this release, though it still there in the IDE. What this means is if you want to know exactly how many errors there are for a project, just invoke the compiler through msbuild.exe or vbc.exe and you’ll get your answer.

INotifyPropertyChanged.PropertyChanged implemented and not implemented; Visual Studio build error

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).