Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

SDK-Style SQL Project Support Query
mweller
#1 Posted : Monday, September 8, 2025 8:50:59 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/15/2021(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Good morning,

Please could you advise whether NCrunch supports building the SQL Project files when using the SDK-style project definitions (the tooling is currently in preview).

Our initial attempts seem to generate the following error:

Scripts\Script.PreDeployment.sql (0, 0): A fatal parser error occurred: Could not find a part of the path 'C:\Users\...\AppData\Local\NCrunch\16940\5\...\Scripts\Script.PreDeployment.sql'..

Looking at the folder, it appears that it doesn't contain any files that are discovered by the folder tree structure. Specifically, referenced files do seem to end up in the folder.

Visual Studio builds the project fine and generates the similar output as the MSBuild version of the SQL project.

Environment:
Visual Studio 2022 (Version 17.14.13)
NCrunch 5.17.0.3

Example project file:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build">
<Sdk Name="Microsoft.Build.Sql" Version="2.0.0-preview.4" />
<PropertyGroup>
<Name>DnaPayments.Authentication.Sql</Name>
<DSP>Microsoft.Data.Tools.Schema.Sql.Sql160DatabaseSchemaProvider</DSP>
<ModelCollation>1033, CI</ModelCollation>
<RootNamespace>MyProject.Sql</RootNamespace>
<AssemblyName>MyProject.Sql</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PreDeploy Include="Scripts\Script.PreDeployment.sql" />
</ItemGroup>
<ItemGroup>
<PostDeploy Include="Scripts\Script.PostDeployment.sql" />
</ItemGroup>
<ItemGroup>
<RefactorLog Include="MyProject.Sql.refactorlog" />
</ItemGroup>
<ItemGroup>
<None Include="MyProject.Sql.publish.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="MyProject.Sql.refactorlog" />
</ItemGroup>
</Project>
Remco
#2 Posted : Monday, September 8, 2025 8:54:29 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,360

Thanks: 996 times
Was thanked: 1340 time(s) in 1243 post(s)
Hi, thanks for posting.

Currently we have no specific support for this project type. However, it might still be possible to get it working.

The project type seems to have its own build item type 'PreDeploy'. NCrunch won't recognise this on its own, but you can probably work around the problem by adding these files to NCrunch's internal list by specifying them using the 'Additional files to include' configuration setting.
mweller
#3 Posted : Monday, September 8, 2025 9:29:46 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/15/2021(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Remco;18302 wrote:
Hi, thanks for posting.

Currently we have no specific support for this project type. However, it might still be possible to get it working.

The project type seems to have its own build item type 'PreDeploy'. NCrunch won't recognise this on its own, but you can probably work around the problem by adding these files to NCrunch's internal list by specifying them using the 'Additional files to include' configuration setting.


Thanks, so using the additional files approach does get it past that point. We end up with other build issues, but that is where it is trying to find the DLL output which doesn't seem to get generated by the build process compared to the MSBuild approach.

I think our best bet at the moment is to disable building that project for now until the Microsoft tooling becomes a bit more refined.

Thanks for the information and your guidance.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download