This project is read-only.

Setup File to create MSI file

Jun 22, 2010 at 2:05 PM


I've translated the StyleCop screen and messages to Japanese and would like to create a msi file for distribution.

In the source file, there doesn't seems to be any setup project to generate msi files. Is it possible to obtain it?

If not, should the company name in the Setup be Microsoft or should I just use my name?

I've currently made the Japanese version available as a zip download from the following site:




Jun 26, 2010 at 9:09 PM


I am not an active StyleCop contributor, nevertheless it seems I could help somehow you in your questions.

1. StyleCop source code contains all data for bulding an MSI file. There are no "any setup project" because it uses WiX (you could google to learn more about).
To get to the point, see the following files:


echo --------------------------------------------------------------
echo Building setup MSI
call verifybuild retail -WixBuildOnly


REM Build Setup Solution
IF EXIST %PROJECTROOT%\src\WixSetup\%BuildLogFile%.wrn DEL /F /Q %PROJECTROOT%\src\WixSetup\%BuildLogFile%.wrn
IF EXIST %PROJECTROOT%\src\WixSetup\%BuildLogFile%.err DEL /F /Q %PROJECTROOT%\src\WixSetup\%BuildLogFile%.err

IF "%SkipWixBuild%" == "1" GOTO PostWixBuild
CALL "%windir%\\framework\v3.5\msbuild.exe" %PROJECTROOT%\src\wixsetup\StyleCop.Wix.sln /p:Configuration=%BuildTarget% /flp1:warningsonly;logfile=%PROJECTROOT%\src\wixsetup\%buildlogfile%.wrn /flp2:errorsonly;logfile=%PROJECTROOT%\src\wixsetup\%buildlogfile%.err
IF "%ERRORLEVEL%" == "0" DEL /F /Q %PROJECTROOT%\src\WixSetup\%BuildLogFile%.err
DeleteFileIfEmpty.exe %PROJECTROOT%\src\WixSetup\%BuildLogFile%.wrn
IF %WixBuildOnly%.==1. GOTO SUMMARY

WiX project itself is located at Project\Src\WixSetup.

2. I am not a licencing expert, but I could try to help you finding the information.

StyleCop uses Microsoft Public License (Ms-PL) that is described here:

... (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

Also, here you can find some comments about understanding Ms-PL:

...  In other words, if you create a modified version of the Software, you still retain the patent license to use and distribute the original portions of the Software under the specific Microsoft patent claims that read on the Software, but you do not have a patent license as to the new functionality you may have added by modifying the Software.

Hope this could help.

Best regards,
Oleg Shuruev 

Jun 27, 2010 at 3:38 AM

Thanks for the reply.

According to the documentation, I'm suppose to be able to build a msi file with "verifybuild retail", but I keep getting errors. Have anybody else done this? Am I suppose to create a shortcut with "OfficialBuild.cmd" and do a "verifybuild retail"?

Also, the following paragraph implies seems to imply even if I'm able to build a msi file, users would still have to execute Environment.cmd command to be able to use it. Am I missing something or is there a different method to allow partially signed bits with the key used by Microsoft - like a msi build will set up the machine to allow Microsoft partially signed bit.

>The builds produced by verifybuild will be partially signed. This means that they can only be run if the machine is set up to allow partially signed bits to >execute with the key used by Microsoft. This is set up for you automatically by the enlistment window script.


Jun 28, 2010 at 5:56 PM

What error are you seeing?