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

Notification

Icon
Error

Build failure - SubsetFontWPF.targets: Could not find file
peterwiles
#1 Posted : Wednesday, February 13, 2013 3:35:52 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/13/2013(UTC)
Posts: 3
Location: South Africa

Thanks: 1 times
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.
Remco
#2 Posted : Wednesday, February 13, 2013 8:31:24 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
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
peterwiles
#3 Posted : Thursday, February 14, 2013 11:42:59 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/13/2013(UTC)
Posts: 3
Location: South Africa

Thanks: 1 times
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.
Remco
#4 Posted : Thursday, February 14, 2013 9:39:19 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
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.
1 user thanked Remco for this useful post.
peterwiles on 2/19/2013(UTC)
peterwiles
#5 Posted : Tuesday, February 19, 2013 3:21:35 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/13/2013(UTC)
Posts: 3
Location: South Africa

Thanks: 1 times
Thanks, that's a big help.
Remco
#6 Posted : Saturday, March 30, 2013 9:45:08 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
For anyone interested, a fix for this problem has been introduced with the newly released version of NCrunch (v1.45).
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.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download