Hi,
I have downloaded the newest version of nCrunch today and I'm using it with VS 2017. I have solution with 98 projects and few of them are failing because of this error:
NCrunch: This error is commonly caused by projects that are relying on the selected build configuration provided by Visual Studio in order to set the $(Platform) and $(Configuration) MSBuild properties during a build. Unless configured otherwise, NCrunch will normally use the default $(Configuration) and $(Platform) properties that are specified in a .proj file - thus in order for your project to build with NCrunch it must be possible to build the project using command line MSBuild without needing to manually inject build properties. You will most likely need to edit your .proj file to align its default $(Configuration) and $(Platform) properties with the property groups provided in the file. For more information about this problem please refer to
http://www.ncrunch.net/d...tform-and-configuration
I have checked linked workaround and checked my .csproj file and my .csproj file look fine (like the one described in article)
I can post just few bits from this file, but I think that it will be enough.
Code:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>false</Optimize>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ProjectName.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>ProjectName.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<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>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{62812A0A-352D-4D2C-91C5-F5F058F171D4}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProjectName</RootNamespace>
<AssemblyName>ProjectName</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<OldToolsVersion>4.0</OldToolsVersion>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
What can I do to fix this issue?