Recompiling Add-in resources with every build
In the Displaying custom bitmap for VS add-in command button from satellite DLL, Huizhong showed how to create a Managed Satellite dll. The steps for creating the Satellite dll need to be performed everytime your make a change to the resources. And it would need to be repeated for every language/culture that your add-in supports. Wouldn’t it be great if the resources were built with every compile? To do this is very simple. You follow all the steps mentioned above for creating the resources file. Then follow the steps below:
1. Select the project and right click to open the Project Properties.
2. Open the Build Events dialog (Click on Build Events for C#, Compile->Build Events for VB)
3. Then in the Post Build Events type the following. Make sure to replace the <yourresourcename> with your resource name.
"$(DevEnvDir)\..\..\SDK\v2.0\Bin\resgen.exe" "$(ProjectDir)<YourResourceName>.resx" "$(TargetDir)<YourResourceName>.resources"
mkdir "$(TargetDir)en-US"
%windir%\Microsoft.NET\Framework\v2.0.50727\Al.exe /embed:"$(TargetDir)<YourResourceName>.resources" /culture:en-US /out:"$(TargetDir)en-US\$(TargetName).resources.dll"
Repeat the commands for all the language resource files that you intend to provide for the Add-in.
4. Click OK.
Now whenever you do a build, the resources will also be compiled.