I have a nlog config file in directory A, then I include it "as link" in my test project, and set it to be copied to output if newer, resulting in something like below
When I build this with vstudio I see the nlog.config ending up in output directory, but when NCrunch is building it is not placed in the NCrunch workspace directory and the tests fail.
If I include the file "normally" (without as link) it all works well.
I'm personally unfamiliar with this mechanism (link). Historically, MSBuild has had support for specifying a 'link' file using an XML tag, but this is the first time I've seen it done as an attribute. So probably the reason NCrunch doesn't handle it would be because it's an edge case that has seen no testing or support.
How is it that you've come across this structure? Was this done using a tool or project template?
Remco wrote:How is it that you've come across this structure? Was this done using a tool or project template?
I usually do like this when sharing same AssemblyInfo.cs files in multiple projects (which I guess works fine since that file is included in compile process), and now I had duplicated config files I wanted to share in the same way
I.e. no tooling or template, Add->existing item-> select "Add as link" instead of "Add"
[img=https://i.imgur.com/dIzfBGN.png]Add as link[/img]
GreenMoose wrote:
I usually do like this when sharing same AssemblyInfo.cs files in multiple projects (which I guess works fine since that file is included in compile process), and now I had duplicated config files I wanted to share in the same way
I.e. no tooling or template, Add->existing item-> select "Add as link" instead of "Add"
[img=https://i.imgur.com/dIzfBGN.png]Add as link[/img]
Hi, I've had a look at reproducing this issue. I've created a new ClassLibrary and created a Linked item which shows up in the the project file like this:
michaelkroes wrote:However in my test project the file is also copied to the work space and a similar test case also passes.
Hrm yeah it works here as well now when I retry the setup. I guess it might have been related to some other NCrunch internal errors I was having (bug reports submitted) related to projects not reloaded properly.