Problem with Resgen when building a plugin

Dear all,

I am experiencing a problem when I want to build my plugin: I keep getting the following error message:

Error 1 Failed to locate ResGen.exe and unable to compile plug-in resource file 'C:\Users\lp50922\documents\visual studio 2013\Projects\EPO_446_CreateStudioProject\EPO_446_CreateStudioProject\PluginResources.resx' EPO_446_CreateStudioProject

I know that the Resgen is available and working because it is used in other (non-SDL) projects I am building, e.g. this one, which is also based on .Net Framework 4.0:

1>CoreResGen:

1>  "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\resgen.exe" /useSourcePath /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Deployment.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /compile Properties\Resources.resx,obj\Debug\testResGen40.Properties.Resources.resources

1>  Processing resource file "Properties\Resources.resx" into "obj\Debug\testResGen40.Properties.Resources.resources"

 

Is there any reference in the plugin template which redirect Visual Studio to another location where it cannot find the Resgen.exe file?

Can anyone give me a good hint on this one? I am a bit blocked since I do not know what is going wrong and what prevents me of building my Plugin.

 

Thanks in advance for your support.

 

Regards,

 

Laurent

Parents
  • Hello!  Very old question here, but I had the same problem, and have spent about 3 weeks trying to solve it.

    I solved it, finally, so I thought I would publicize what I discovered.  Here it is:

    The problem is that this error message is very vague: "Failed to locate ResGen.exe and unable to compile plug-in resource file..."  Well, Visual Studio, exactly where did you look for resgen.exe?  This kind of information is not printed in the error message.

    The solution to this is to run msbuild.exe from the command line, including a few parameters.  Click on the "Start" button of Windows and type 'cmd'.  This will bring up a command line prompt.

    Here is what you type into the command line prompt:

     "C:/Windows/Microsoft.NET/Framework/v4.0.3.0319/MSBuild.exe C:/Users/Michael/Plugin.csproj -fl -flp:logfile="C:/Users/Michael/Desktop/error_log.log";verbosity=diagnostic"

    To make it more general, what is being input is:

    The complete path to MSBuild.exe (space) The complete path to your *.csproj file (space) -fl -flp:logfile=(where you would like your logfile to be saved);verbosity=diagnostic

    When you press enter, MSBuild.exe will try to compile your *.csproj file, but will fail, just as Visual Studio fails.  The only difference is, this time a log file, detailing the error, will be created.  If you open that log file and look somewhere near the bottom, you will find some lines that resemble the following:

    We can see that MSBuild looked in 5 separate locations for "ResGen.exe," but, unable to find it, gave up. So, just edit your Windows Registry (by typing 'regedit' after you click the "Start" button on Windows) so that "ResGen.exe" can be found.

    Next time, when you click "Build" from Visual Studio, Visual Studio should be able to find ResGen.exe, and there will be no problems!

Reply
  • Hello!  Very old question here, but I had the same problem, and have spent about 3 weeks trying to solve it.

    I solved it, finally, so I thought I would publicize what I discovered.  Here it is:

    The problem is that this error message is very vague: "Failed to locate ResGen.exe and unable to compile plug-in resource file..."  Well, Visual Studio, exactly where did you look for resgen.exe?  This kind of information is not printed in the error message.

    The solution to this is to run msbuild.exe from the command line, including a few parameters.  Click on the "Start" button of Windows and type 'cmd'.  This will bring up a command line prompt.

    Here is what you type into the command line prompt:

     "C:/Windows/Microsoft.NET/Framework/v4.0.3.0319/MSBuild.exe C:/Users/Michael/Plugin.csproj -fl -flp:logfile="C:/Users/Michael/Desktop/error_log.log";verbosity=diagnostic"

    To make it more general, what is being input is:

    The complete path to MSBuild.exe (space) The complete path to your *.csproj file (space) -fl -flp:logfile=(where you would like your logfile to be saved);verbosity=diagnostic

    When you press enter, MSBuild.exe will try to compile your *.csproj file, but will fail, just as Visual Studio fails.  The only difference is, this time a log file, detailing the error, will be created.  If you open that log file and look somewhere near the bottom, you will find some lines that resemble the following:

    We can see that MSBuild looked in 5 separate locations for "ResGen.exe," but, unable to find it, gave up. So, just edit your Windows Registry (by typing 'regedit' after you click the "Start" button on Windows) so that "ResGen.exe" can be found.

    Next time, when you click "Build" from Visual Studio, Visual Studio should be able to find ResGen.exe, and there will be no problems!

Children