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

Notification

Icon
Error

NServiceBus-related build issue
richev
#1 Posted : Monday, July 8, 2019 6:11:26 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/6/2013(UTC)
Posts: 2
Location: United Kingdom

Thanks: 3 times
We're seeing the following error in our projects that contain a reference to the NServiceBus.Persistence.Sql.MsBuild NuGet package:

Code:
SqlPersistenceTask: SolutionDirectory 'C:\src\NCrunch\workspace\32880\119\path\to\project\' does not exist.


This package generates SQL scripts at build time that are used at runtime by NServiceBus to create persistence tables in the database.

We have a number of solutions, and this is only happening in one solution, which contains projects that are in folders that are not child folders of the solution file.

For example:

Code:
Project("{guid}") = "Project.Name.NServiceBus", "..\..\Some\Other\Folder\Project.Name.NServiceBus\Project.Name.NServiceBus.csproj", "{guid}"
EndProject


This is preventing us from using NCrunch with this solution.
Remco
#2 Posted : Monday, July 8, 2019 11:48:08 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,758

Thanks: 745 times
Was thanked: 956 time(s) in 911 post(s)
Hi, thanks for sharing this issue.

Could you try the following?

1. Create an empty text file inside the solution directory in your solution (not in the NCrunch workspace)
2. Go to the 'Additional files to include' NCrunch solution-level setting
3. Add the empty text file
4. Wait for the engine to reset

Does this resolve the problem? I think that because NCrunch couldn't find any files in the directory that needed to be in the workspace, it simply hasn't constructed it in its relative position. By placing a file in there, the workspace builder should ensure that it exists.
richev
#4 Posted : Friday, August 2, 2019 3:27:31 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/6/2013(UTC)
Posts: 2
Location: United Kingdom

Thanks: 3 times
Thanks for the rapid response - apologies for my delay in replying.

This worked for us, so the problem is solved!

Is this something we will just need to do from now on, or is it a workaround for an issue in NCrunch that will be fixed in an upcoming release?
Remco
#5 Posted : Friday, August 2, 2019 3:33:57 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,758

Thanks: 745 times
Was thanked: 956 time(s) in 911 post(s)
richev;13689 wrote:
Thanks for the rapid response - apologies for my delay in replying.

This worked for us, so the problem is solved!


Awesome! Thanks for confirming this :)

richev;13689 wrote:

Is this something we will just need to do from now on, or is it a workaround for an issue in NCrunch that will be fixed in an upcoming release?


This is kind of what we would call a structural limitation. We copy files from your source directory into a sandbox workspace that we use to run builds and tests. For this purpose, we've only really been interested in copying files rather than entire directory structures. It IS technically possible for us to expand this to include directories too, but there would be a trade-of in terms of complexity and possibly performance, because it was never really a use case that was considered.

There are other ways you could work around this, for example, you could include a custom build step that ensured the directory would always exist when your project is built.
1 user thanked Remco for this useful post.
richev on 8/2/2019(UTC)
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.034 seconds.