简体   繁体   English

为什么在“奥尔良谷物分类收集”项目中不认可奥尔良?

[英]Why is Orleans not recognized in 'Orleans Grains Class Collection' project?

I'm trying to write a simple Orleans demo solution: 我正在尝试编写一个简单的Orleans演示解决方案:

  1. I've installed Orleans v1.0.0 via the .msi from github . 我已经从github通过.msi安装了Orleans v1.0.0。
  2. I've created a new Visual Studio 2013 solution. 我创建了一个新的Visual Studio 2013解决方案。
  3. I've created a new Orleans Grains Interface Collection type project. 我创建了一个新的Orleans Grains Interface Collection类型的项目。
  4. I've created a new Orleans Grains Class Collection type project 我创建了一个新的Orleans Grains Class Collection类型的项目

In the interface collection project, I can type Orleans and VS2013 Intellisense recognizes the namespace and its contents: 接口集合项目中,我可以键入Orleans,VS2013 Intellisense可以识别名称空间及其内容:

在此处输入图片说明

In the class collection project I can't: 班级收集项目中,我不能:

在此处输入图片说明

Why is this happening and how can I fix it? 为什么会发生这种情况,我该如何解决?

I've been able to resolve my issue with generous help from Sergey Bikov from the Microsoft Orleans team. 在Microsoft Orleans团队的Sergey Bikov的慷慨帮助下,我已经能够解决我的问题。

What I did was: 我所做的是:

  1. I add the missing reference from my grain project to my interface project, and added using MyGrainInterfaces1; 我将谷物项目中缺少的引用添加到接口项目中,并using MyGrainInterfaces1;添加using MyGrainInterfaces1; to Grain1.cs . Grain1.cs (Just so my solution would build without errors) (因此我的解决方案将不会出错而构建)

  2. I removed the references to the Orleans.dll from both my projects and then re-added them manually. 我从两个项目中删除了对Orleans.dll的引用,然后手动重新添加了它们。 (Path to Orleans.dll for me is C:\\Microsoft Project Orleans SDK v1.0\\SDK\\Binaries\\OrleansClient\\Orleans.dll (对我来说,Orleans.dll的路径是C:\\ Microsoft Project Orleans SDK v1.0 \\ SDK \\ Binaries \\ OrleansClient \\ Orleans.dll

Now the Orleans namespace is recognized in both projects correctly. 现在,两个项目中都可以正确识别Orleans名称空间。

Side note: Not sure why this did not work for me when I tried it several days ago. 旁注:不知道为什么几天前尝试这种方法对我不起作用。

  1. Add reference from grain project to interface project, add using MyGrainInterfaces1; 从谷物项目向接口项目添加引用, using MyGrainInterfaces1;添加using MyGrainInterfaces1; to Grain1.cs and build. 到Grain1.cs并构建。
  2. Unload/reload grain project. 卸载/重新加载谷物项目。 - This seems to be an IntelliSense "feature". -这似乎是IntelliSense的“功能”。

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

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