简体   繁体   中英

VS2012 Intellisense broken for Workflow projects

I am currently working on a Workflow dll in VS2012 c#. At some point my intellisense in that projected decided to stop working. It does not auto come up but it opens when I use the keyboard shortcut. NOW even when it opens with the keyboard shortcut it doesn't work. By that I mean it doesn't pick up anything thing I added aka. my references to other DLLs, folders in the solution containing workflow.xamls, usings etc.

I decided to test it in a new clean project, it worked for a bit then suddenly 3 workflows in it just did the same thing. Doesn't pick up the workflow or any of my added classes.

Screen shots; 在此处输入图片说明在此处输入图片说明

I have tried a lot of different possible fixes:

  • Deleting sln file

  • Refreshing cache (crtl shift r if i recall correctly)

  • Deleting %AppData%\\Microsoft\\VisualStudio\\11.0\\ReflectedSchemas

  • Resetting settings to default

  • Checking if its enabled (intellisense)

  • Restart VS

  • Restart laptop

Any ideas? I really need some help on this.

EDIT Tested the project on another pc and it does the same. Problem seems to be with the solution/project.

After looking at this again and debugging what was wrong further (clean projects, adding in dll's one at a time etc) I discovered that adding the Microsoft.Net.Http dll to a WorkFlow project broke the intellisense.

Microsoft report on it.

EDIT:

The reason is System.Net.Http.Primitives.dll references System.Runtime.dll and System.Runtime.InteropServices.dll, but these 2 dlls were not referenced in the project.

Removing System.Net.Http.Primitives.dll from references or add references to references System.Runtime.dll and System.Runtime.InteropServices.dll would bring back IntelliSense.

For reference, I resolved this by adding the following references to my project (Windows Workflow Foundation 4.5 on .NET 4.5):

  • System.Runtime.dll (from C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\System.Runtime.dll)
  • System.Resources.ResourceManager.dll (from C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\System.Resources.ResourceManager.dll)
  • System.Runtime.InteropServices.dll (from C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\System.Runtime.InteropServices.dll)

CTRL + ALT + SPACE在建议和完成模式之间切换Intelisense;)

We have had the exact problem-only with the new Prism dlls. Shauns answer helped us find the fix. So if someone encounters the problem and finds the following dlls in his project - he could attempt removing them:

  • Microsoft.Practices.Prism.Interactivity.dll
  • Microsoft.Practices.Prism.MefExtensions.dll
  • Microsoft.Practices.Prism.Mvvm.dll
  • Microsoft.Practices.Prism.Mvvm.Desktop.dll
  • Microsoft.Practices.Prism.SharedInterfaces.dll
  • Microsoft.Practices.ServiceLocation.dll

These are OK and can be left in the solution:

  • Microsoft.Practices.Prism.Composition.dll
  • Microsoft.Practices.Prism.PubSubEvents.dll

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM