SONAR引起:参数'directory'不是目录

时间:2013-10-22 14:40:42

标签: asp.net nullpointerexception sonarqube

我正在尝试让SONAR Quber分析在.Net 2.0中使用.aspx文件构建的ASP.NET站点。我收到一个错误:java.lang.NullPointerException(更多细节如下)。

我认为原因与我的.sln文件中的“PhysicalPath”设置有关(见下文)。我已尝试在此值中使用相对和完整物理路径。

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = ""ECommerce", "..\ECommerce", "{9155C3E9-E34B-4C39-AE8A-ABD5B44FAB8A}"
ProjectSection(WebsiteProperties) = preProject
    TargetFramework = "2.0"
    Debug.AspNetCompiler.VirtualPath = "/ECommerce"
    Debug.AspNetCompiler.PhysicalPath = "..\..\Projects\ECommerce\"
    Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\ECommerce\"
    Debug.AspNetCompiler.Updateable = "true"
    Debug.AspNetCompiler.ForceOverwrite = "true"
    Debug.AspNetCompiler.FixedNames = "false"
    Debug.AspNetCompiler.Debug = "True"
    Release.AspNetCompiler.VirtualPath = "/ECommerce"
    Release.AspNetCompiler.PhysicalPath = "..\..\Projects\ECommerce\"
    Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\ECommerce\"
    Release.AspNetCompiler.Updateable = "true"
    Release.AspNetCompiler.ForceOverwrite = "true"
    Release.AspNetCompiler.FixedNames = "false"
    Release.AspNetCompiler.Debug = "False"
    VWDPort = "3687"
EndProjectSection

EndProject

错误讯息(更多):

Caused by: java.lang.NullPointerException
    at java.io.File.<init>(Unknown Source)
    at org.sonar.plugins.dotnet.api.microsoft.ModelFactory.getWebProject(ModelFactory.java:465)
    at org.sonar.plugins.dotnet.api.microsoft.ModelFactory.getProjects(ModelFactory.java:287)
    at org.sonar.plugins.dotnet.api.microsoft.ModelFactory.getSolution(ModelFactory.java:198)
    at org.sonar.plugins.dotnet.core.VisualStudioProjectBuilder.createVisualStudioSolution(VisualStudioProjectBuilder.java:185)
    at org.sonar.plugins.dotnet.core.VisualStudioProjectBuilder.build(VisualStudioProjectBuilder.java:82)
    at org.sonar.api.batch.bootstrap.ProjectBuilder.build(ProjectBuilder.java:67)
    at org.sonar.batch.scan.ProjectReactorReady.start(ProjectReactorReady.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    ...

感谢任何帮助!

史蒂夫

1 个答案:

答案 0 :(得分:0)

您的条目是“Debug.AspNetCompiler.TargetPath”的两倍,而且您错过了“Release.AspNetCompiler.TargetPath” - 这就是您收到此错误的原因。