GithubHelp home page GithubHelp logo

Exec task: unicode support about msbuild HOT 8 CLOSED

dotnet avatar dotnet commented on July 17, 2024
Exec task: unicode support

from msbuild.

Comments (8)

akoeplinger avatar akoeplinger commented on July 17, 2024

See XMakeTasks/Exec.cs#L280-L285 for some background info.

from msbuild.

v-yadli avatar v-yadli commented on July 17, 2024

@akoeplinger I've already read that. For my current task I'm attempting to derive from the Exec task. Will get back to report if it works.

from msbuild.

 avatar commented on July 17, 2024

There are other issues with Exec.cs as well: dotnet/roslyn#575 (comment). The xplat branch is also having cmd.exe.

For my current task I'm attempting to derive from the Exec task. Will get back to report if it works.

@jaredpar, @mmitche, I think probably the efforts can be converged here, either to make class Exec aware of environment and culture specifics or sub-class Exec/ToolTaskExtension to form NetExec?

from msbuild.

akoeplinger avatar akoeplinger commented on July 17, 2024

@jasonwilliams200OK That is just the toolname, the actual executable is retrieved as "sh" here: Exec.cs#L582

from msbuild.

v-yadli avatar v-yadli commented on July 17, 2024

It's ugly...

        protected override int ExecuteTool(string pathToTool, string responseFileCommands, string commandLineCommands)
        {
            /* In ExecuteTool Exec will attempt to delete the 'script file'.
             * That would cause an exception for sure. However,
             * we could not derive from its base, nor can we invoke
             * base.base.ExecuteTool. So we make a dummy file for it
             * to delete. To do this, we invoke base's AddCommandLineCommands
             * so that it calls CreateTemporaryBatchFile. Since the base's base
             * already captured our correct parameters, it is safe to hack it.
             */
            this.Command = "TSLCompileTask"; // This will trick VS to display "The command 'TSLCompileTask' failed with code..." on error.
            Microsoft.Build.Tasks.CommandLineBuilderExtension commandLine = new CommandLineBuilderExtension();
            base.AddCommandLineCommands(commandLine);

            return base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands);
        }

But at least it works -____-"

from msbuild.

AndyGerlicher avatar AndyGerlicher commented on July 17, 2024

Marking as up-for-grabs as this is something we would like to have working correctly.

from msbuild.

akoeplinger avatar akoeplinger commented on July 17, 2024

@v-yadli Some work was done in #143 to address this, can you check if that fixes your problem as well?

from msbuild.

rainersigwald avatar rainersigwald commented on July 17, 2024

I'm going to mark this as closed since the fix went in last year.

from msbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.