Ich versuche eine sehr einfache XPath auf this xml (das gleiche wie unten), und es findet nichts. Ich versuche sowohl .NET und this website, und XPaths wie //PropertyGroup
, /PropertyGroup
und //MSBuildCommunityTasksPath
sind einfach nicht für mich arbeiten (sie kompiliert aber Null Ergebnisse zurückgeben).Was ist falsch an meinem XPath/XML?
Quelle XML:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- $Id: FxCop.proj 114 2006-03-14 06:32:46Z pwelter34 $ -->
<PropertyGroup>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\MSBuild.Community.Tasks\bin\Debug</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import
Project="$(MSBuildProjectDirectory)\MSBuild.Community.Tasks\MSBuild.Community.Tasks.Targets" />
<Target Name="DoFxCop">
<FxCop TargetAssemblies="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll"
RuleLibraries="@(FxCopRuleAssemblies)"
AnalysisReportFileName="Test.html"
DependencyDirectories="$(MSBuildCommunityTasksPath)"
FailOnError="True"
ApplyOutXsl="True"
OutputXslFileName="C:\Program Files\Microsoft FxCop 1.32\Xml\FxCopReport.xsl" />
</Target>
</Project>
Wenn Sie ein kurzes Codebeispiel von dem bereitstellen könnten, was Sie in .net versucht haben, wird es einfacher, Vorschläge zu machen, was schief gehen könnte. – morechilli