0

I'm running msbuild on my .sln file and I'm suddenly getting

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2291,5):
error SB3554: Cannot write to the output file "C:\Work\product\src\component\
obj\Debug\product.resources". Could not find a part of the path 'C:\Work\
product\src\component\obj\Debug\component.Resources.resources'. [C:\Work\
product\src\component\component.vbproj]

No amount of deleting binaries and retrying helps

JoelFan
  • 37,465
  • 35
  • 132
  • 205
  • A couple of weeks ago I saw a question here where a virusscanner kept complaining about a vb build. Maybe the same issue? – rene Jan 04 '13 at 20:40

2 Answers2

1

The error states product.resources is failing because component.Resources.resources cannot be found.

  1. Ensure your project build order is correct since resources files are built at compile time and it cannot find the needed resources file to continue.
  2. Another solution you might try is to delete and re-add any .resx files in your projects.

Also, I would create one shared project with resources for the solution to make it easier to mange your resources. Here is an example although a little dated.

How to use shared resource file between projects in one solution?

MSDOCS-Packaging and Deploying Resources in .NET Apps

SoftwareCarpenter
  • 3,835
  • 3
  • 25
  • 37
  • Merely posting links to support.microsoft.com pages is not helpful as a long-term answer, since they apparently move/delete their pages every few months just to make it more challenging to use their products. – phonetagger Mar 19 '17 at 23:41
  • @phonetagger is right - the first link is now broken. – Mathias Lykkegaard Lorenzen Jan 17 '19 at 18:42
  • Agreed. Not ideal , but also don’t want to act like it’s my answer when it documented. I will try and update the link. – SoftwareCarpenter Jan 18 '19 at 03:49
  • I think it's acceptable to post a link and also post a quote of the pertinent info; that makes it clear that it's not your own writing and also makes your answer meaningful even if the link is broken. And if the link is broken and someone wants to search for the original article, they have a fragment of it to search for. – phonetagger Jan 18 '19 at 15:06
  • Gotcha. Updated with suggestions of my own with link fixes – SoftwareCarpenter Jan 18 '19 at 15:08
1

Had a similar intermittent problem, added these options to the copy command

Retries="10" RetryDelayMilliseconds="5000"

and it seemed to do the trick

Rob Sedgwick
  • 4,342
  • 6
  • 50
  • 87