Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msgmerge parameters on PostBuild.exe breaks PostBuild.exe #53

Closed
javizcaino opened this issue Apr 19, 2013 · 1 comment
Closed

msgmerge parameters on PostBuild.exe breaks PostBuild.exe #53

javizcaino opened this issue Apr 19, 2013 · 1 comment

Comments

@javizcaino
Copy link

Sorry, but I can't make it work... whenever I add a "msgmerge:-N" parameter to PostBuild.exe, even using directly from command line, it allways gives me the same error, which I paste:

This is the command I run:

C:\Users\javizcaino>"C:\Documents\Projects\MVC4Bootstrap\MVC4Bootstrap\bin\i18n.PostBuild.exe" "C:\Documents\Projects\MVC4Bootstrap\MVC4Bootstrap\" "msgmerge:-N"

And this is the exception thrown:

Unhandled Exception: System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at i18n.PostBuildTask.BuildProjectFileManifest(String path) in c:\Users\Daniel\Desktop\Src\i18n\src\i18n\PostBuildTask.cs:line 84
   at i18n.PostBuildTask.Execute(String path, String gettext, String msgmerge) in c:\Users\Daniel\Desktop\Src\i18n\src\i18n\PostBuildTask.cs:line 22
   at i18n.PostBuild.Program.Main(String[] args) in c:\Users\Daniel\Desktop\Src\i18n\src\i18n.PostBuild\Program.cs:line 30

This happens with every project I have tried.
If I remove the "msgmerge-N" it all runs flawless

What I'm doing wrong?

@javizcaino
Copy link
Author

Ok, I have found what I might have been doing wrong...

I have found that the postbuild event to build the POT that is demonstrated in the readme file is not working correctly when using msgmerge parameters or gettext parameters. I copy it here for documentation purposes:

"$(TargetDir)i18n.PostBuild.exe" "$(ProjectDir)"
    //using all available parameter:
    // msgmerge: optional parameter for msgmerge
    // gettext: optional parameter for gettext
    // inputpaths: comma delimited input paths. Useful if the project is split in several sub projects. i.e. "inputpaths:C:\temp\Project1,C:\temp\Project2"
    "$(TargetDir)i18n.PostBuild.exe" "$(ProjectDir)" "msgmerge:(optional params for msgmerge)" "gettext:(optional params for gettext)" "inputpaths:(comma delimited input paths)"

But if you use this:

"$(TargetDir)i18n.PostBuild.exe" "$(ProjectDir)\"
    //using all available parameter:
    // msgmerge: optional parameter for msgmerge
    // gettext: optional parameter for gettext
    // inputpaths: comma delimited input paths. Useful if the project is split in several sub projects. i.e. "inputpaths:C:\temp\Project1,C:\temp\Project2"
    "$(TargetDir)i18n.PostBuild.exe" "$(ProjectDir)\" "msgmerge:(optional params for msgmerge)" "gettext:(optional params for gettext)" "inputpaths:(comma delimited input paths)"

Please, note the backslash after $(ProjectDir)... without it, this was what caused the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant