I am trying to use nCrunch on a project we are working on to evaluate whether to purchase it. It's having some trouble building one of the projects though, and it's giving me this message:
..\..\..\..\..\..\..\..\Program Files (x86)\MSBuild\Microsoft\Expression\Blend\.NETFramework\v4.0\SubsetFontWPF.targets (10)#0: Could not find file 'Fonts\UniversLTStd-ThinUltraCn.otf'.
What makes this odd is that the solution builds fine when I build it in VS or on our build server using MSBuild. I did have to add that targets file to get it to build using MSBuild since I don't have Expression Blend on my machine.
Build/Test Issues
Build failure - SubsetFontWPF.targets: Could not find file
Started by peterwiles on 6,128 views
Remco NCrunch Developer
#3692
13 Feb 2013 20:31 UTC
Hi, thanks for posting!
My first guess would be that this looks like a file that is being referenced from your build implicitly, and NCrunch hasn't automatically detected it. You may be able to solve this by including the file using the 'Additional files to include' setting. There's some more information about this specific problem and how it can be solved in the documentation.
I hope this helps!
Cheers,
Remco
My first guess would be that this looks like a file that is being referenced from your build implicitly, and NCrunch hasn't automatically detected it. You may be able to solve this by including the file using the 'Additional files to include' setting. There's some more information about this specific problem and how it can be solved in the documentation.
I hope this helps!
Cheers,
Remco
Thanks for the response, that page is very helpful. I did some further digging and found that the font is included in the project according to Visual Studio. I also had a look at the project file and found this bit:
<BlendEmbeddedFont Include="Fonts\UniversLTStd-ThinUltraCn.otf">
<IsSystemFont>True</IsSystemFont>
<All>True</All>
<AutoFill>True</AutoFill>
<Uppercase>True</Uppercase>
<Lowercase>True</Lowercase>
<Numbers>True</Numbers>
<Punctuation>True</Punctuation>
</BlendEmbeddedFont>
There are more BlendEmbeddedFont entries in the csproj but this is the first one. As far as I can tell the build process embeds this font into the exe.
I added the extra entry:
<None Include="Fonts\UniversLTStd-ThinUltraCn.otf"/>
This change made for all the embedded fonts in the project meant ncrunch could build correctly. However, it's not going to be possible to ensure that everyone adds those None entries when they use Blend to add fonts to the application, and I'm worried we will get projects suddenly not building, rendering ncrunch useless without anyone on the team knowing how to correct it.
<BlendEmbeddedFont Include="Fonts\UniversLTStd-ThinUltraCn.otf">
<IsSystemFont>True</IsSystemFont>
<All>True</All>
<AutoFill>True</AutoFill>
<Uppercase>True</Uppercase>
<Lowercase>True</Lowercase>
<Numbers>True</Numbers>
<Punctuation>True</Punctuation>
</BlendEmbeddedFont>
There are more BlendEmbeddedFont entries in the csproj but this is the first one. As far as I can tell the build process embeds this font into the exe.
I added the extra entry:
<None Include="Fonts\UniversLTStd-ThinUltraCn.otf"/>
This change made for all the embedded fonts in the project meant ncrunch could build correctly. However, it's not going to be possible to ensure that everyone adds those None entries when they use Blend to add fonts to the application, and I'm worried we will get projects suddenly not building, rendering ncrunch useless without anyone on the team knowing how to correct it.
Remco NCrunch Developer
#3701
14 Feb 2013 21:39 UTC
Thanks, you've given me the key that I need in order to fix this problem in the next revision ("BlendEmbeddedFont"). I'll add this to NCrunch's auto-configuration list so that it will pick up these files in future.
As a workaround, I recommend using the 'Additional files to include' configuration setting to set up a wildcard include on all these files underneath your project's directory, i.e.: **.otf
It's a bit crude, but it's probably an easier approach than adding parallel items in the project file.
As a workaround, I recommend using the 'Additional files to include' configuration setting to set up a wildcard include on all these files underneath your project's directory, i.e.: **.otf
It's a bit crude, but it's probably an easier approach than adding parallel items in the project file.
Thanks, that's a big help.
Remco NCrunch Developer
#3902
30 Mar 2013 21:45 UTC
For anyone interested, a fix for this problem has been introduced with the newly released version of NCrunch (v1.45).
Post a reply
Log in to reply.