Batch code for pre-build event.
@ECHO off
DEL "$(TargetPath)"
FOR /F "delims=" %%i IN  ('findstr /M /L /S /C:"global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager" "$(ProjectDir)*.Designer.cs"') DO (
DEL resource.gen
	FOR /F "usebackq delims=" %%j IN ("%%i") DO (
		ECHO. %%j > resourcecurrentrow.gen
		FOR /F "tokens=1,2* delims=(=" %%k IN (resourcecurrentrow.gen) DO ( 
			IF "%%l" == " new global::System.Resources.ResourceManager" (ECHO %%k = new ResourceExtension.ResourceXManager(%%m)>>resource.gen ELSE (ECHO. %%j) >>resource.gen 
		   ))
XCOPY resource.gen "%%i" /Q /Y /R /K
)


Section will be to add in project xml
<UseHostCompilerIfAvailable>FALSE</UseHostCompilerIfAvailable>

Last edited Apr 3, 2010 at 9:36 AM by komarovskiy, version 4

Comments

No comments yet.