开发者

VS 2010 Beta 2: "ResGen.exe" could not be run

So, I just downloaded VS 2010 Beta 2, and when I try to build one of my class libraries with several resource files, I get the error:

"The specified task executable "ResGen.exe" could not be run. The filename or extension is too long"

before that, I get the war开发者_C百科ning: Warning 4434 The command-line for the "ResGen" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "ResGen" into multiple calls with fewer parameters per call.

Both of which, I am SURE tell me exactly what the problem is, but its not clicking with me. Since this assembly works in VSTS 2008, I am at a bit of a loss.

If necessary, I'll enter a bug with MS, but I wanted to see what the collective wisdom of stackoverflow can do for me first.


I'm having the exact same problem. I've submitted the issue on the Microsoft Connect site:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=499196


I changed my projects to target .NET 4, and this problem went away.

Not an ideal solution though, as we're not ready to build to .NET 4 yet, but at least the product is usable.

UPDATE: Microsoft have posted an update to the connect issue:

Workarounds
1) switch to target 4.0. Obviously that isn't a workaround for a serious project, but it fixes it for experimentation.
2) I didn't try this. Go into \microsoft.common.targets and find the GenerateResource task. Make a backup of the file first. Change the Condition attribute to:
Condition="'%(EmbeddedResource.Type)' == 'Resx' and '%(EmbeddedResource.GenerateResource)' != 'false' and '%(EmbeddedResource.Identity)' != ''"

The extra clause should make resgen run separately on each input file, which will be slower, but should avoid the problem. Dan

I changed the Condition as noted, and everything is working fine so far, whilst still targeting .NET 3.5. It is noticibly slower :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜