Remco wrote:Hi Kaleb,
Thanks for sharing this issue in such detail.
NCrunch should normally detect the project.assets.json file (along with its related 'obj' files) and copy this into the workspace with some minor manipulation. How are your projects structured in regards to project.assets.json? Is the file present?
It is present in the foreground build but not in the NCrunch copy. Out of curiosity, I added the project.assets.json file as an additional Include file for the first project in my solution after which point the build for that project completed. The output is below, which should give you an idea of the structure:
From the Windows Subsystem for Linux:
Code:
$ cd /mnt/c/users/me/AppData/local/NCrunch/20148/3/
$ tree
.
├── Directory.Build.props
├── Directory.Build.targets
├── Solution1
│ ├── Couchbase.AspNet
│ │ ├── ... snip my *.cs files ...
│ │ └── app.config
│ ├── Directory.Build.props
│ └── Analyzer.ruleset
├── Output
│ ├── bin
│ │ └── AnyCPU.Debug
│ │ └── Solution1
│ │ ├── Couchbase.AspNet.dll
│ │ ├── Couchbase.AspNet.dll.config
│ │ └── Couchbase.AspNet.pdb
│ └── obj
│ └── Solution1
│ └── Couchbase.AspNet
│ ├── AnyCPU.Debug
│ │ ├── Couchbase.AspNet.csproj.FileListAbsolute.txt
│ │ ├── Couchbase.AspNet.csprojAssemblyReference.cache
│ │ ├── Couchbase.AspNet.dll
│ │ └── Couchbase.AspNet.pdb
│ └── project.assets.json # manually included through an Include directive
├── Tools
│ └── Build
│ ├── Build.Common.targets
│ └── Build.props
├── _ncrunchreferences
└── build.root
Remco wrote:
Given your description of this solution, I'm wondering if perhaps there is a customisation of some kind in place that is putting the project.assets.json file in a place where NCrunch isn't able to detect it. Are you able to find the file inside your foreground solution? If not, how is it that your foreground build is able to work without the file present? This may involve some kind of build feature that I don't yet have knowledge of.
I'm currently including a number of additional files using the Include directive. They are as follows:
- Solution1/Directory.Build.props
- Tools/Build/Build.Common.targets
- Tools/Build/Build.props
- build.root
Here's the set of properties that control the various output paths, one of which is likely the culprit:
Code:
<PropertyGroup>
<RootBinDir>$(__RootBinDir)\</RootBinDir>
<RootBinDir Condition="'$(__RootBinDir)'==''">$(BuildRoot)Output\</RootBinDir>
<!-- This property is used in the various projects to reference built assemblies -->
<OutBin>$(__OutBin)\</OutBin>
<OutBin Condition="'$(__OutBin)'==''">$(RootBinDir)bin\$(BuildArch).$(BuildType)\</OutBin>
<BinDir>$(__BinDir)\</BinDir>
<BinDir Condition="'$(__BinDir)'==''">$(OutBin)$(Component)\</BinDir>
<BinDir Condition="'$(IsolateComponents)'=='true'">$(BinDir.TrimEnd('\'))\$(MSBuildProjectName)</BinDir>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(RootBinDir)obj\$(Component)\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<__IntermediatesDir Condition="'$(__IntermediatesDir)'==''">$(BaseIntermediateOutputPath)\$(BuildArch).$(BuildType)\</__IntermediatesDir>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)'==''">$(__IntermediatesDir)\</IntermediateOutputPath>
<IntDir>$(IntermediateOutputPath)</IntDir>
<OutputPath>$(BinDir)</OutputPath>
<OutDir>$(OutputPath)</OutDir>
<OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
</PropertyGroup>
Please let me know what other information I can provide, and thank you for your help troubleshooting this!