Build/Test Issues

NCrunch build fails when WPF project has a SplashScreen image.

Started by moosey on 9,876 views

When an image is added to a WPF project and its BuildAction is set to "SplashScreen", NCrunch fails to build. See steps below for how to repeat the problem. (Present in 1.35.0.16b).

1. Create a WPF application project.
2. Create a test project for it.
3. Enable NCrunch for the solution - verify that NCrunch builds and marks everything as "OK".
4. Add an image to the WPF application project and set the BuildAction to "SplashScreen".
5. NCrunch will have a build error, saying something like the following:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets (711): File 'SplashScreen.png' cannot be found.

Edited

Hi Moosey,

It looks like the image file is included in your project file implicitly or using a syntax that NCrunch isn't familiar with.

Would you be able to copy/paste the part of the .proj file that specifies the image? I'll then ensure the next NCrunch build picks it up automatically.

Meanwhile, you can solve this problem by adding the file to the AdditionalFilesToInclude configuration option. Have a look at https://www.ncrunch.net/documentation/troubleshooting_project-build-issues.
Sure, I'm away from my typewriter this weekend, but I'll give you the details when I'm back.
Hi Remco,

Here's the part from the .csproj file:

  <ItemGroup>
    <SplashScreen Include="SplashScreen.png" />
  </ItemGroup>
Adding the file to the AdditionalFilesToInclude setting has provided a good workaround.

Thanks for your help.
The fix for the above problem has now been released as part of 1.36b.

Post a reply

Log in to reply.