简体   繁体   English

VS2012 Intellisense无法用于工作流项目

[英]VS2012 Intellisense broken for Workflow projects

I am currently working on a Workflow dll in VS2012 c#. 我目前正在VS2012 c#中使用Workflow dll。 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. 我对其他DLL的引用,解决方案中包含workflow.xamls的文件夹,usings等。

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. 我决定在一个新的干净项目中对其进行测试,它工作了一段时间,然后突然其中的3个工作流程做了同样的事情。 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 删除sln文件

  • Refreshing cache (crtl shift r if i recall correctly) 刷新缓存(如果我没记错的话,则返回crtl shift r)

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

  • Resetting settings to default 将设置重设为默认

  • Checking if its enabled (intellisense) 检查其是否启用(智能)

  • Restart VS 重启VS

  • Restart laptop 重新启动笔记本电脑

Any ideas? 有任何想法吗? I really need some help on this. 我真的需要一些帮助。

EDIT Tested the project on another pc and it does the same. 编辑在另一台PC上测试了项目,并且执行了相同的操作。 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. 再次查看并调试了进一步的错误(干净的项目,一次添加dll的问题,等等)之后,我发现将Microsoft.Net.Http dll添加到WorkFlow项目中会破坏智能。

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. 原因是System.Net.Http.Primitives.dll引用了System.Runtime.dll和System.Runtime.InteropServices.dll,但是在项目中未引用这两个dll。

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. 从引用中删除System.Net.Http.Primitives.dll或向引用System.Runtime.dll和System.Runtime.InteropServices.dll添加引用将带回IntelliSense。

For reference, I resolved this by adding the following references to my project (Windows Workflow Foundation 4.5 on .NET 4.5): 作为参考,我通过将以下参考添加到我的项目(.NET 4.5中的Windows Workflow Foundation 4.5)来解决此问题:

  • System.Runtime.dll (from C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\System.Runtime.dll) System.Runtime.dll(来自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.Resources.ResourceManager.dll(来自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) System.Runtime.InteropServices.dll(来自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. 我们只有新的Prism dll有确切的问题。 Shauns answer helped us find the fix. Shauns的回答帮助我们找到了解决方法。 So if someone encounters the problem and finds the following dlls in his project - he could attempt removing them: 因此,如果有人遇到问题并在项目中找到以下dll,则可以尝试将其删除:

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

These are OK and can be left in the solution: 这些都可以,可以保留在解决方案中:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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