← Back to team overview

nunit-core team mailing list archive

[Bug 806198] Re: nunit console crashes when opening vs2010 projects. Expects a outputpath in every propertygroup

 

Portions of a Sample project file that crashes the loader. It has 3
property groups, but only one has a outputpath.(which is valid)

<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{7182B333-2A03-4D98-9DDB-0F0D462F6F36}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>System.ServiceModel</RootNamespace>
    <AssemblyName>XYZ</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <OutputPath>..\..\..\build\</OutputPath>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

Line that crashes with a null reference exception.

http://bazaar.launchpad.net/~nunit-
core/nunitv2/trunk/view/head:/src/ClientUtilities/util/VSProject.cs#L287

-- 
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/806198

Title:
  nunit console crashes when opening vs2010 projects. Expects a
  outputpath in every propertygroup

Status in NUnit V2 Test Framework:
  New

Bug description:
  in VS2010 created projects, not every PropertyGroup has a output path
  set. However the nunit LoadMSBuildProject function attempts to look
  for output path in every property group and crashes with a null
  reference exception.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/806198/+subscriptions


References