简体   繁体   English

Fitnesse - .NET 4的标准fitSharp配置问题

[英]Fitnesse - Standard fitSharp configuration problem with .NET 4

I have been using Fitnesse.NET for some time and am now attempting to upgrade to the newer fitSharp engine. 我已经使用Fitnesse.NET一段时间了,现在我正在尝试升级到更新的fitSharp引擎。 I immediately ran into a roadblock though. 我立刻遇到了障碍。 Starting with a fresh system, I downloaded the latest fitnesse.jar and executed/installed it; 从一个新系统开始,我下载了最新的fitnesse.jar并执行/安装它; all my test pages were then displaying fine from my browser. 我的所有测试页面都在浏览器中显示正常。

The issue arises when I add configuration for fitSharp to the root page. 当我将fitSharp的配置添加到根页面时,会出现此问题。 I tried a variety of combinations of setting TEST_RUNNER and COMMAND_PATTERN; 我尝试了各种设置TEST_RUNNER和COMMAND_PATTERN的组合; the end result was always that, upon executing any test, the fitnesse server never returned a result to my browser. 最终结果始终是,在执行任何测试时,fitnesse服务器从未将结果返回给我的浏览器。 For reference here is my root content, confirming these variable definitions are present and correct, at least according to this fitSharp configuration page : 这里的参考是我的根内容,确认这些变量定义存在且正确,至少根据fitSharp 配置页面

variable defined: TEST_RUNNER=fitSharp\RunnerW.exe 
variable defined: COMMAND_PATTERN=%m -r fitnesse.fitserver.FitServer,fitSharp\fit.dll %p 

I finally found one troubleshooting note mentioning that RunnerW gives some diagnostic information so I switched to that and received this error message, indicating it is apparently an issue arising due to .NET 4: 我终于找到一个故障排除说明,提到RunnerW提供了一些诊断信息,所以我切换到它并收到此错误消息,表明它显然是由于.NET 4引起的问题:

Could not load file or assembly 'file:///C:\\fitnesse\\fitSharp\\fit.dll' or one of its dependencies. 无法加载文件或程序集'file:/// C:\\ fitnesse \\ fitSharp \\ fit.dll'或其依赖项之一。 Operation is not supported. 不支持操作。 (Exception from HRESULT: 0x80131515) File name: 'file:///c:\\fitnesse\\fitsharp\\fit.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. (来自HRESULT的异常:0x80131515)文件名:'file:/// c:\\ fitnesse \\ fitsharp \\ fit.dll'---> System.NotSupportedException:尝试从网络位置加载程序集导致程序集在以前版本的.NET Framework中被沙箱化。 This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. 此版本的.NET Framework默认情况下不启用CAS策略,因此此负载可能很危险。 If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. 如果此负载不是用于沙盒装配,请启用loadFromRemoteSources开关。 See http://go.microsoft.com/fwlink/?LinkId=155569 for more information. 有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkId=155569

The referenced MSDN page says that I need this in my config file: 引用的MSDN页面说我在配置文件中需要这个:

<configuration>
   <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>
</configuration>

So it looks like I have three possibilities. 所以看起来我有三种可能性。 Is there: 在那儿:

  1. An app.config or equivalent where I can insert that config section? app.config或等效的地方,我可以插入该配置部分?
  2. A way to stop fitnesse from thinking that my local file is on a remote path? 一种阻止fitnesse认为我的本地文件在远程路径上的方法?
  3. A way to enable CAS policy for the .NET framework? 一种为.NET框架启用CAS策略的方法?

Suggestions would be appreciated! 建议将不胜感激!

2010.01.17 Edit: I am using fit protocol rather than slim protocol in my environment. 2010.01.17编辑:我在我的环境中使用的是fit协议而不是slim协议。

I know this has been answered but, imho there is a better resolution. 我知道这已经得到了解答但是,imho有一个更好的解决方案。 If you 'unblock' fit.dll (right-click->properties->Unblock) you won't get the error. 如果你'解锁'fit.dll(右键单击 - >属性 - >取消阻止),你将不会收到错误。 Happens due to downloaded files being locked by default. 由于下载的文件默认被锁定而发生。

I've never seen that before! 我以前从未见过这个! Why does it think C: is a 'dangerous' network location? 为什么认为C:是一个“危险”的网络位置? Anyway, the executable is Runner.exe (or RunnerW.exe) so if you create a Runner.exe.config with the settings above, it should pick it up. 无论如何,可执行文件是Runner.exe(或RunnerW.exe),因此如果您使用上述设置创建Runner.exe.config,它应该将其获取。

visit this page 访问此页面

http://oweng.net/Visual-Studio-2010/Coded-UI-Fitnesse/integrating-coded-ui-and-fitnesse-fitsharp-slim-1.aspx http://oweng.net/Visual-Studio-2010/Coded-UI-Fitnesse/integrating-coded-ui-and-fitnesse-fitsharp-slim-1.aspx

i was facing a similar issue but got resolved after visiting tjis page. 我遇到了类似的问题,但在访问tjis页面后得到了解决。

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

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