Visual Studio 2017 - Option Strict will not turn off - visual-studio

After a recent update on VS2017. I'm seeing lots of Late binding errors on all projects.
The errors are showing because Option Script of set to on somewhere, but all my projects have the option Option Strict set to Off.
On some projects even if I set Option Strict to Off in the page code behind, I still get the error.
Sometimes if I try to reference Microsoft Visual Basic in the project, the errors go away, sometimes not.
Anyone else experiencing this problem? Any ideas how to fix?

seems to be fixed in Rel. 15.5.2!

pLease have a look at
https://developercommunity.visualstudio.com/content/problem/160609/vb-option-strict-on-warnings-are-shown-on-existing.html
So MS is already aware of the bug and proposes another workaround.

I'm facing the same problem. The workaround I found is:
1. Turn option strict ON
2. Compile your project (will not succeed due to option strict on)
3. Turn option strict OFF
4. Compile your project (compilation success and no more errors)

This problem has now been Fixed in release 15.5.2.
You might have to save a project with Option Strict On then save with Option Strict Off. I didn't have to do that.
Source :https://developercommunity.visualstudio.com/content/problem/160609/vb-option-strict-on-warnings-are-shown-on-existing.html

Related

cannot open visual basic 6.0 project due to component 'msconctl.ocx' not registered error

I have a project in visual basic 6.0 with an error message that,
'msconctl.ocx' or one of its dependencies not correctly registered:
a file is missing or invalid.
Can't figure out what is the problem,
i am also getting an error:- object or with block variable.
please help?
thanks
First, I'm pretty sure that you are talking about mscomctl.ocx (not msconctl.ocx), the Microsoft Common Control library, which is where you get all the common controls (text box, label, etc.) used in VB6. If you don't have this registered properly, VB6 won't run.
You haven't told us if you're using a 64-bit version of Windows or not. This makes a difference. In any case, you should be able to work out a solution by reading This.
MSComCtl.OCX was in 2012 modified in such a way that it became in-compatibable with legacy VB6 applications. MSComCtl.OCX prior to that was working fine. I ran into this and the only alternative left to me was to remove the control from the project ( in my case a Status Bar ) and use a Label field to cover the duties of the Status Bar. Once I was upgraded to a .Net Codebase I re-introduced the .Net Status Bar and things were back to normal. You probably didn't do anything wrong...its just a change to MSCOMCTL.OCX that once applied to your machine will break old VB6 projects that use that control. If you run or attempt to compile the app, VB6 should point you to the line(s) of code encountering the error. That will tell you which control is being victimized. Consider removing the control, and also the reference to MSComCtl, and creating workarounds. Sorry...just another nail in the VB6 coffin. I hate it but can't prevent it. Hope this helps.

Code Definition Window not working in VS2015

Just upgraded to Visual Studio 2015 and the Code Definition Window is not working.It just says "No definition selected" no matter what I select. Project is Windows Forms written in C#.
Go to Definition and Peek Definition are working fine
Went back to VS2013 to try it out and it's still working there
Tried to make a brand new project in VS2015 to see if it was project related, but it was not
Checked with a couple of colleagues and it wasn't working for them either
I have a feeling this is either a bug in VS2015 or some sort of configuration change.
Anyone found a way to configure it, or any sort of work around to get it up and running again?
I got a reply from Microsoft on my Bug report. Turns out it's not implemented and possibly never will be:
Hi,
Based on the fact that Peek Definition was introduced in VS2013,
combined with telemetry data that shows that only a tiny percentage of
users ever display the Code Definition Window, we decided not to
implement support for it as part of Roslyn. I've filed an issue on our
GitHub project to consider resurrecting it.
Thanks for the report!
-- Kevin Pilch-Bisson Visual Studio Managed Languages
HereĀ“s the github issue Kevin created in response to my bug report in July: https://github.com/dotnet/roslyn/issues/4224
Looks like they just merged a fix for this into Roslyn:
https://github.com/dotnet/roslyn/pull/56102

Visual Studio 2010 intellisense stopped working completely

I've had this problem for a long time. At some point IntelliSense just stopped working on my laptop, completely. Whenever I type in a ., -> or (, it says
IntelliSense: 'No additional information available' (See 'Troubleshooting IntelliSense in C++ Projects' for further help.)
It doesn't work in any projects, even if I make a new blank one. Hovering over identifiers doesn't show any information either. Furthermore, some actions such as go to definition used to completely freeze the studio, until I did a full settings reset and that problem was resolved. But intellisense is still not working. Is there anything I can do, short of full reinstall? (If that would even help.. besides I doubt I can find the CD now.)
Update: this question describes the exact issue I was having: VS2010 Intellisense problems
Since I already tried installing service packs and something didn't go right, I went with a rather hacky solution - I replaced my ole32.dll with an older version, which seems to have fixed the issue. This is obviously not recommended if you care about your system's stability, but if you're still running WinXP, chances are that you don't ;)

Cleanup Code within JetBrains Resharper

I have two solutions within VS2012, one a branch of the other.
I have installed the latest version of resharper (8.0.2).
I open the same .cs file from both solutions.
On the one I get the warning triangle saying that I have unused directives, (which I do). On the other I get no warnings or errors. I have also noticed that the cleanup code feature within the one solution is disabled.
How can I enable this feature?
Try resetting your Resharper options back to their defaults.
Resharper -> Manage Options -> Reset all settings
If that fixes the problem then I guess you've turned something off along the way.

Unknown build error, 'Exception of type 'System.OutOfMemoryException' was thrown

We have VS.Net solution with 20 projects in it.
Occasionaly, in VS.NET, when we try to build/debug our solution, we get following error:
Unknown build error, 'Exception of type 'System.OutOfMemoryException' was thrown
Only way to "fix" this issue is to reopen Visual Studio and then solution build goes well, but again after some time OutOfMemory exception occur again. It's really annoying to reopen Visual Studio couple times a day, so do you know some workaround for this issue ?
JetBrains is aware of this issue, and they provide some fix for it, using this fix solved my problems for now:
http://www.jetbrains.net/confluence/display/ReSharper/OutOfMemoryException+Fix
Edit:
However, OutOfMemory exception is occuring again, but it's not as often as it is when I dont use this JetBrains fix.
According to what Microsoft recommends, it is not a good idea to have lots of projects within a single solution.
Check out this link http://support.microsoft.com/kb/949755 .
But the solution suggested in the article is not something that be straight away used, because of the code refactoring costs involved.
Have you tried building the solution from outside the IDE. (Something like MSBUILD). That might help.
I have the same Issue if I use ReSharper and run several UnitTests (with enabled CodeCoverage).
I also assume this is a ReSharper problem. And since I disble it while I'm running Unittest the Exception never appears again.
BTW - Disabling it when the exception throws (as mentioned in the comments above) doesn't help, because of disabling it while VS is running will not unload it from memory. The only way to force the unload is to tear down all AppDomains which have loaded the DLL. In a VS Package scenario this means you have to tear down the entire VS process :(
Or you can just minimize Visual Studio for about 10 seconds (see in task manager how the memory usage of devenv.exe drops when minimized). This works for me in most cases.I rarely have to close VS to get rid of this error.
VS reinstallation is temporary solution. Jus increase your machine Virtual memory size. this resolves this issue.
ref below link -
http://windows.microsoft.com/en-in/windows/change-virtual-memory-size#1TC=windows-7

Resources