Interoperability with MSBuild 4.0?

Topics: For MSBee Developers, For MSBee Users, User Forum
Mar 16, 2010 at 2:27 PM

Someone asked me today if MSBee will work with MSBuild 4.0. I haven't tried it but I'm guessing that it won't since, based on the issue tracker, it looks like it doesn't work with MSBuild 3.5. Can anyone confirm?

May 19, 2010 at 10:14 PM

I spent a few hours realizing what you just said :(

For the most part it seems fine, it's just that for me it seems that it uses the wrong version of ResGen.

Specifically, if I run msbuild using .NET 2 version, it uses resgen from the .NET 1 SDK folder, but under .NET 4 it uses

 C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ResGen.exe

which is the wrong version, so the .resources files are unusable.

I can't see how it's finding that path, according to this post http://blogs.msdn.com/clichten/default.aspx?p=2 it should get the .NET 1 SDK from the registry (which is does for CSC).

Anyone any idea?  Some way I could even hard code the right path?

Ugh - you know that feeling when you've spent too long on something.

 

Aug 3, 2010 at 8:11 PM

Solved this one. The override for the "GenerateResource" task isn't working for some reason; the MSBee "CoreResGen" target is getting called, but the GenerateResource is being called from the "Microsoft.Build.Tasks.v4.0" assembly instead of the MSBee one. 

I opened up MSBuildExtras.FX1_1.Common.targets and replaced the two "GenerateResource" task calls inside the CoreResGen target with the fully qualified "Microsoft.Build.Extras.FX1_1.GenerateResource", and everything is back to normal again.

Oct 22, 2010 at 8:10 AM

Would you share your .generateresource and target files here ?