Hi everyone,
I've run into a bit of a challenge with the stylecop.json file in the new automation script template. When I create a fresh "Data Miner Automation Script Project," I encounter this error right away:
Source file 'C:\Users\EnisAB\source\repos\OrangeOceaneTicketingSystem\..\Internal\Code Analysis\stylecop.json' could not be found.
Here is my view from the solution explorer, where you can see the location of the "stylecop.json" file:
The part of the error that I bolded out ("..\") clearly causes the issue. So in the "Directory.Build.props" file I removed the "..\" that is causing the issue:
<Additional Files Include="..\Internal\Code Analysis\stylecop.json">
<Link>Properties\stylecop.json</Link>
</AdditionalFiles>
To this:
<Additional Files Include="Internal Code Analysis\stylecop.json">
<Link>Properties\stylecop.json</Link>
</AdditionalFiles>
This works for now, but the fix doesn't stick, because whenever I restart my PC or close Visual Studio, the Directory.Build.props file gets regenerated, and my StyleCop rules disappear. I'm using DIS version 3.1.7.
I'm wondering if I might be missing something here. Is this a known issue with the new automation script template, or could it be a bug? Has anyone found a permanent workaround for this?


Hi Edib,
I reinstalled the DIS extension (version 3.1.8) as you suggested, but unfortunately, the error still persists.
Hi Enis
When creating a new solution, you see the checkbox for 'Place solution and project in the same directory'. This needs to be unchecked for DIS to work properly with the new templates. Unfortunately this is currently not possible to disable with the project templates.

The easiest to fix your scenario is to remove the solution and recreate it with the checkbox off.

Thank you Michiel for your response, it works when I uncheck the mentioned checkbox.
Hi Enis,
Can you try reinstalling the DIS extension and when you do install the latest version 3.1.8?
Cheers