MikeWard;8994 wrote:OK, I see the problem. I need to include the bundle.js and bundle.js.map files in my project so the Visual Studio Publish Profile will use them. It feels like I need a, "consider these files as not part of the solution" option.
There is a way we can do this :)
Where the files are declared inside your Build XML, for example:
<ItemGroup>
<None Include="bundle.js" />
<None Include="bundle.js.map" />
</ItemGroup>
You can exclude them for NCrunch with a condition:
<ItemGroup>
<None Include="bundle.js" Condition="'$(NCrunch)' != '1'" />
<None Include="bundle.js.map" Condition="'$(NCrunch)' != '1'" />
</ItemGroup>
Or alternatively:
<ItemGroup Condition="'$(NCrunch)' != '1'">
<None Include="bundle.js" />
<None Include="bundle.js.map" />
</ItemGroup>
The files will then be detected by the IDE and VS publish, but excluded from NCrunch.