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

Notification

Icon
Error

Ncrunch does not copy empty folder to it's workspace.
danius
#1 Posted : Wednesday, June 6, 2018 8:13:46 AM(UTC)
Rank: Member

Groups: Registered
Joined: 7/17/2013(UTC)
Posts: 15
Location: Ireland

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
we use prebuild event that copies files to a folder.
Folder exists in project and source control.
Project type is .netCore 2

Getting the below if folder is empty. If I add empty txt file, ncrunch builds fine.

C:\Users\daniel_simonavicius\AppData\Local\NCrunch\18332\23\Web\OGC.OCM.Web>xcopy C:\Users\daniel_simonavicius\AppData\Local\NCrunch\18332\23\Web\OGC.OCM.Web\App C:\Users\daniel_simonavicius\AppData\Local\NCrunch\18332\23\Web\OGC.OCM.Web\wwwroot /i /s /r /y /c /exclude:C:\Users\daniel_simonavicius\AppData\Local\NCrunch\18332\23\Web\OGC.OCM.Web\excludedfileslist.txt
File not found - App
0 File(s) copied

File not found - App
0 File(s) copied

Thanks, Daniel
Remco
#2 Posted : Wednesday, June 6, 2018 11:57:02 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 700 times
Was thanked: 866 time(s) in 824 post(s)
Hi Daniel,

Thanks for sharing this problem. Could you clarify the purpose of this pre-build event? Is this trying to copy files from another project in your solution? If so, this may break NCrunch's project atomicity constraints.
danius
#3 Posted : Wednesday, June 6, 2018 12:25:26 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/17/2013(UTC)
Posts: 15
Location: Ireland

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Yes, it copies angular app into web project, but Ncrnch is only testing c# MVC side so it should build project as normal. Especially because it executes prebuild task fine once the folder exist...

Thanks.
Remco
#4 Posted : Wednesday, June 6, 2018 7:55:44 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 700 times
Was thanked: 866 time(s) in 824 post(s)
Ahh, sorry I just realised I missed that the folder was empty. Yes, this would be a known constraint. NCrunch identifies file dependencies using MSBuild, so if there is no file in the folder, it won't be represented when the project is loaded.

The easiest way to work around this is to just add a step to the pre-build event that will create the missing folder if it doesn't exist, or otherwise make the step conditional on the folder existing.
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.028 seconds.