Detecting language please wait for.......
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> "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.
Can anyone help me on this issue? I already tried to copy the resgen.exe to several places but without success. Has anyone an idea or a suggestion which could help me to think further about that?
Have you added a new icon in the pluginresources? If so, could you please make sure that the version set for the icon is Version=220.127.116.11 and not 18.104.22.168. To do this, open the PluginResources.resx with a text editor and manually make the change.
Thank you for your reply. No, I have no icon in the plugin resources.
For your information, I am using Visual Studio Express and not Visual Studio. Do you believe it may be the problem?
It shouldn't be an issue, but I haven't tried it myself, I am going to try to replicate the issue and get back here after that.
I had the same exact problem using Visual Studio Express 2013 (Failed to locate ResGen.exe and unable to compile plug-in resource file). I spent hours trying to find a solution to no avail.
I ended up downloading Visual Studio 14 CTP and compilation works fine.
That is caused by Express version, full version will solve this issue.
Here is the workaround which was suggested by SDL to solve this issue:
Create a string value registry key named CurrentInstallFolder in SOFTWARE\Microsoft\Microsoft SDKs\Windows and set the value to the location of the Windows SDK on your hard drive - be sure that the specified folder contains a Bin folder in it – and which contains all the Microsoft SDK tools are in, including resgen.exe.
So for example in your situation the registry key value should be "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A" and in that folder you should create a new folder named bin in which you should copy all the tools from the folder "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools"
I had to adapt this workaround slightly to make it work. This is what I did:
I copied the content of the folder
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\
However, I had to add the registry key under Wow6432Node structure (see below):
I hope this helps you.
You can also try the new Visual Studio 2013 Community Edition - which is also free
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!
Hi, I'm having the same issue, while trying to build a project for Studio2017- with SDK 2017 too.
However, I am using Visual Studio Community 2019 - but I guess this should not be an issue.
I tried the solutions proposed above, to edit the registry - so far no good
Anyone here building for 2017 with success?
Unfortunately this can be quite a pain. It took me a couple of months off and on until I finally got it, but it is possible! I am building now stably with success.
I am using Visual Studio 2017 and Trados Studio 2017 with .NET 4.6.1.
The path that worked for me was C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin
You can look here https://stackoverflow.com/questions/2731365/running-msbuild-fails-to-read-sdktoolspath/56640450#comment103427496_56640450 for additional data, specifically the post from todbott.
Hope this helps!