VS Code intellisence not working after migrating project to another Repo - c#

I've started programming on a c# compiler a while ago, and since then switched from azure devops to github in my normal programming routine.
So when I picked up work again, I started committing to azure again, and found it really inconvenient to just have one project to another devops soulution so I decided to import this repo to github as well.
This was a day ago.
The previous days I've worked a lot in code and intellisense was working nicely, just until I imported the program to github, deleted the project folder on my pc and pulled the repo off of Github. I now this probably is not the most convenient way of doing this, but that's what I did.
Now intellisense completely stopped working.
Normaly ctrl+. should give me a huge list of things I could do, but it always says that there are no code actions available. Even the red squiggles don't appear until I try to run the project which makes it very hard to write code effectively as I often have loose ands I thought I fixed already.
So far I have tried reinstalling intellisense, the C# language extension and "re-pulling" the entire project, if that is an adequate term.
Of course I tried turning on and off my computer as well, but this mysteriously did not solve my problem.
My question now is how I can fix this, if there is a way to reset intellisense in a way or if it's even possible to "destroy Intellisense for a project" as this seems pretty dumb. The solution probaly is easy and right in front of my eyes but I'm not able to see it.
Of course I looked at similar questions on Stack overflow but the suggested tips did not work either.

Related

Referenced component "System.Runtime" could not be found

I just randomly got that warning. That file exists on my hard drive, but VS refuses to understand it. I have no idea how to fix it, there are no solutions available online.
In the worst case scenario I will create project from scratch, but that will require moving a lot of code.
Edit
I have cloned older repository, now all references are missing. I thought that only Java has so many issues, but it appears C# is not better.
Edit 2
Rebuilding fixed all errors beside System.Runtime.

Unable to load "lpsolve55.dll" in VS2015 on 64-bits OS

For a project I am working on, I need to solve a mathematical model. I chose to do this using Microsoft.Solver.Foundation and the SolverFoundation.Plugin.LpSolve plugin. Both associated .dll files for these extension seem to work fine, as VS2015 recognizes and references them without a problem and compiles and runs my program without errors.
This is however up untill I try to actually solve my optimization, which needs "lpsolve55.dll" to work. I have downloaded this dll and put it in my project's bin/Debug folder, but for some kind of reason VS2015 just doesn't recognize it. I.e.
I can't reference it by simply browsing to it from my "Add Reference" tab.
It's impossible to (un-)register it via the regsvr32 cmd-prompt application, as it doesn't have any DLL (Un-)registry entry points.
The TlbImp.exe cmd-prompt application can't handle it.
So basically, after discovering the above (after trying the most-common internet solutions), I still feel quite dissatisfied to get the error message while I try to solve the optimization -
Unable to load DLL 'lpsolve55.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
The wierd part is also that I have another project in which I solve a similar problem, where there are absolutely no problems at all using lpsolve55.dll....
Some quick facts:
I reference .NET framwork 4.5.2. I have changed it to 4.5 as well as 4.0, but this didn't change anyting.
For as far as I can tell, the bin/debug folder of my projects are identical.
I am working on a fully updated windows 10 OS, 64 bits, while using visual studio 2015.
My question would thus be whether or not some of you have encountered a similar problem and if you were able to solve it in some way.
Highly appreciated!
After some careful analysis, I have found the answer to the problem. To be honest, as most things are, it was quite simple in the end. The lpsolve55.dll wasn't recognized because I didn't have my new bin-folder in the Path, which I did have with my old project. I simply forgot.
On a further note however, after the lpsolve55.dll directory was added to the path, I still got an error telling me there was no model to be found that could solve my directive. Since the error occured when I was calling the LPSolverDirective(), some research landed me on the following page:
http://lpsolve.sourceforge.net/5.5/MSF.htm
Above page gives a complete and stable way of how to acces lpsolve55.dll using the LPSolverPlugin straight out of Microsoft.Solver.Foundation.dll. After following the method in the link that involves editing my projects' bin/Debug and bin/Release folders, I got the LP model up and running within no-time.
Morale of the story - read the documentation. I am a bit of a beginner in programming entire multi-project solutions and using customly-added dlls, but hopefully this helps someone else experiencing the same. In the end, I learned a lot by simply trying different methods of getting it to work, so no time was wasted.

How to add code snippets to VSIX MEF editor extension without language service

I am trying to implement code snippets with a MEF editor extension with VS2012, I followed the walkthrough "Implementing Code Snippets" from the link: http://msdn.microsoft.com/en-us/library/ff926100(v=vs.110).aspx
The implementation is based on the walkthrough Displaying Statement Completion. This feature works fine.
The first section of "Implementing Code Snippets" is "Creating and Registering Code Snippets" which does not work. At the end of the section is the step 8:
Build and run the project. In the experimental instance of Visual Studio that starts when the project is run, the snippet you just registered should be displayed in the Code Snippets Manager under the TestSnippets language.
There are no errors, but the Code Snippets Manager does not display the TestSnippets language, and as a consequence the snippets are not there. I have been stuck for a few weeks now with this, and could not find resources to understand the issue.
Any idea on how to solve this issue will be much appreciated.
Thanks
I realize it's not that easy, but I've been messing with VSIX for quite a while now. If you want to fix such problems, you need to do hardcore debugging, using reflector or dotPeek.
By debugging, I mean, you need to debug line by line the code of the actual implementation of all the MEF plumbing, and what uses MEF.
Basically, just find out where the "Code Snippets Manager" is doing its work, then see why your language is not pulled in.
Basically, you need to ask a question:
1) Why doesn't Code Snippets Manager display TestSnippets language?
And then, you just need to answer it by debugging, find where the Code Snippets Manager does the decision of displaying languages, and see why it doesn't appear there.
I've fixed quite a lot of problems this way, and I am grateful that most of the code is C#, which means it's easy to step through code and see where the execution is going.

SOME Breakpoints not hitting in VS2012 / C#

I have somewhat a bizarre problem here. I have a Solution developed with VS2012 in C#. I have 6 Projects in the solution. My problem is, with some of the projects in the solution, no code change has any affect on Solution Build. It's not just new code, not even Breakpoints are getting hit!!
I have done a thorough research in the net, couldn't find anything helpful.
And of course, I have tried
re-compiling
deleting all the binaries and compiling again
checked solution properties numerous times
etc...So, I think I have tried all the basics, but couldn't find a way out.
I gathered some screenshots, but I noticed I need at least 10 reps so I can't post them yet :(.
Any help at all will be greatly appreciated
Cihan Esen
EDIT: After the responses, I see that I have add, two other guys in my team is working on the same code, same build environment. They are not having this problem. I cross-checked every single configuration in their system which could remotely relate with this, we definitely have the same settings in VS.
And yes, I build the solution in DEBUG mode, not RELEASE.
I have tried seperate clean + build for the problematic projects -> no difference.
EDIT 2: I have to add; I have modified the code in the problematic project, so that I would see completely different output, but it didn't work. I mean that project/class of the solution, is still producing the same result, as if the code has not been changed at all. And yes, I have deleted all the binaries, saw them being built again.
This sounds really stupid to me but VS is acting as if it has a version of my source code of this problematic Project/Class, and it always compiles that version.
Make sure you are running in dubug mode and try this:
Go to your solution folder.
Show hidden files
Close your solution Delete .sou file for solution.
Add your break points, build your soltion and try.
throw away the obj and bin folders
throw away your .suo files
perform IIS reset for webapplications
rebuild everything.
should do the trick :)

References not working on my computer but fine on colleagues with same solution

I'm currently developing an app on our companies portal and yesterday started noticing that I wasn't able to reference external classes or methods from references.
My colleague put the solution on his computer and committed his code with all the references working fine, and I opened up his code and the references have stopped working and still can't be found.
I have deleted the website cache and other user options but had no luck so far.
One reference file is an external VB class file and the other was simply calling "request" from Web.UI.UserControls. (I got around this by using HttpContext.Current.Request.QueryString , even though "Request" worked on my colleagues computer)
Is there any options on my Visual Studio that would make the same code break compared to his? I contemplated a reinstall but it's a lot of time wasted and the problem may surface again.
Edit. I'm on Visual Studio 2013 Ultimate
You can enable assembly binding log, and use fuslogvw.exe to see what is going on behind the scenes. It will allow you to know more details on the error and think in possible solutions.
http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx

Categories