@echo Running Sonar pre-build script...

@set SonarRunnerProperties=%1
@set ProjectKey=%2
@set ConfigFolder=%3

@echo Sonar runner properties location: %SonarRunnerProperties%
@echo Sonar project key: %ProjectKey%
@echo Sonar config location: %ConfigFolder%

@echo Creating the Sonar config folder...
@rmdir %ConfigFolder% /S /Q
@mkdir %ConfigFolder%

@echo Dumping environment variables... (TODO - REMOVE)
@~dp0\DumpEnvironmentVars.exe

@echo Generating Sonar FxCop file...
@%~dp0\Sonar.FxCopRuleset.exe "%SonarRunnerProperties%" "%ProjectKey%" "%ConfigFolder%\SonarAnalysis.ruleset"
@echo ...done.

@echo Sonar pre-build steps complete.

@echo Running Sonar pre-build script...

@set SonarRunnerProperties=%1
@set ConfigFolder=%2

@echo Sonar runner properties location: %SonarRunnerProperties%
@echo Sonar config location: %ConfigFolder%

@echo Creating the Sonar config folder...
@rmdir %ConfigFolder% /S /Q
@mkdir %ConfigFolder%

@echo Generating Sonar FxCop file...
REM @%~dp0\Sonar.FxCopRuleset.exe %SonarRunnerProperties% "%ConfigFolder%\SonarAnalysis.ruleset"
@echo ...done.

@echo Copying a dummy ruleset for the time being...
copy %~dp0\Example.ruleset %ConfigFolder%\SonarAnalysis.ruleset


@echo Sonar pre-build steps complete.

Revert "Updated prebuild script to pass the Sonar project key"
Revert "Updated prebuild script to pass the Sonar project key"

This reverts commit 8643823a98ac984f7e1f28305c44cf803c76f876.
