Guten Morgen allerseits,
ich scheitere gerade daran, eine
Diese ist im MSBuild/XML-Format:
Spoiler anzeigen
Ich wollte den Wert von
Folgendes habe ich bereits probiert:
Allerdings ist die Variable z immer
Was mache ich falsch?
Danke für Eure Hilfe!
ich scheitere gerade daran, eine
csproj
-Datei einzulesen.Diese ist im MSBuild/XML-Format:
XML-Quellcode
- <?xml version="1.0" encoding="utf-8"?>
- <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{86E2A821-E789-42E4-8676-CC47936D0D77}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <RootNamespace>VS_READER</RootNamespace>
- <AssemblyName>VS Reader</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <Deterministic>true</Deterministic>
- <TargetFrameworkProfile />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Build" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Core\Solution.cs" />
- <Compile Include="Core\Utilities.cs" />
- <Compile Include="Ui\Controls\DialogPanel.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="Ui\Controls\MasterLabel.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="Ui\Controls\TreeViewEx.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="Ui\Dialogs\frmMain.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Ui\Dialogs\frmMain.Designer.cs">
- <DependentUpon>frmMain.cs</DependentUpon>
- </Compile>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <EmbeddedResource Include="Ui\Dialogs\frmMain.resx">
- <DependentUpon>frmMain.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Resources.resx</DependentUpon>
- <DesignTime>True</DesignTime>
- </Compile>
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- </ItemGroup>
- <ItemGroup />
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- </Project>
Ich wollte den Wert von
RootNamespace
abfragen, weiß aber leider nicht, wie.Folgendes habe ich bereits probiert:
Allerdings ist die Variable z immer
null
...Was mache ich falsch?
Danke für Eure Hilfe!