2013-10-14 89 views
2

好,我一直在寻找剃刀Rockstars的,但我创建了一个布局描述Physical Project StructureServiceStack剃刀访问量编译错误

我有我的serviceInterface等DLL一个视图,并把它设置为CopyIfNewer但每次我浏览到本地主机: 5000 \你好\名字,我得到下面的错误:

HttpCompileException 

它说:

c:\Users\tyler.w.reid\AppData\Local\Temp\ayyw2jf2.0.cs(28): error CS0246: The type or namespace name 'ServiceModel' could not be found (are you missing a using directive or an assembly reference?) 

我已经确定了主要的exe和丝氨酸viceInterface dll都有该项目的参考。我也将它添加到app.config

<pages pageBaseType="ServiceStack.Razor.ViewPage"> 
     <namespaces> 
      <add namespace="ServiceStack.Html" /> 
      <add namespace="ServiceStack.Razor" /> 
      <add namespace="ServiceStack.Text" /> 
      <add namespace="ServiceStack.OrmLite" /> 
      <add namespace="StudentTeachingManager" /> 
      <add namespace="StudentTeachingManager.ServiceModel" /> 
      <add namespace="StudentTeachingManager.ServiceModel.Types" /> 
     </namespaces> 
    </pages> 

任何人都可以提供一些建议,接下来该做什么?

+0

是否有一个“StudentTeachingManager.ServiceModel.dll”与注册的“StudentTeachingManager.ServiceModel”命名空间一起使用?为什么要寻找“ServiceInterface”? – mythz

回答

2

我有类似于这个问题最近我在想:

Razor “The type or namespace name 'x' could not be found” Error. Compile Only

我必须确保该dll被加载不只是在那剃刀编译时参考。

尝试在全局应用程序启动函数中调用任何东西(静态方法调用ping什么也不做是我用的)从引发错误的dll。

+0

修复它。一旦我打电话来强迫它加载,错误消失了。谢谢。 – twreid

+0

Wooo回答了我的第一个问题:D! – Spaceman