Comments (8)
See XMakeTasks/Exec.cs#L280-L285 for some background info.
from msbuild.
@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.
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.
@jasonwilliams200OK That is just the toolname, the actual executable is retrieved as "sh" here: Exec.cs#L582
from msbuild.
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.
Marking as up-for-grabs as this is something we would like to have working correctly.
from msbuild.
@v-yadli Some work was done in #143 to address this, can you check if that fixes your problem as well?
from msbuild.
I'm going to mark this as closed since the fix went in last year.
from msbuild.
Related Issues (20)
- Remove code repetition in EventSourceSink.cs
- [Bug]: When Publishing with .sln, MSBuild doesn't use `BaseOutputPath` HOT 1
- Release 17.11
- [Kitten] Fix binskim warnings in msbuild pipeline HOT 3
- [Bug]: Running a specific target which depends on ResolveReferences fails when TargetFrameworks is specified HOT 4
- Visual Studio 2022 17.10 fails to load csproj - error : The "Target" name is reserved, and cannot be used HOT 3
- Is the double-checked locking pattern in BuildManager correct?
- [Bug]: Parsing `-property:Configuration` with Command-line comments HOT 5
- [BuildCkeck] No warning or error message visible when replaying binlog of an analyzed build
- [Feature Request]: Support building the new Visual Studio solution file format (.slnx) HOT 7
- [Bug]: HOT 2
- [Bug]: CustomAnalyzerTest test fails in the CI pipeline HOT 2
- Retarget to .NET 9
- [Bug]: Can't use contained classes of NuGet Package Microsoft.Build when added as GlobalPackageReference in a Directory.Packages.props file HOT 2
- Investigate possible ToolTask hang HOT 1
- [Bug]: Net472 Service Fabric project with .Net 8 project reference broken in latest msbuild HOT 2
- Create tests for ConfigurationContext
- [dnceng-bot] Branch `msbuild/vs17.10` can't be mirrored to Azdo fast forward branch HOT 1
- Rework the approach to bootstrap HOT 3
- [Feature Request]: Improvements to the Copy task warnings in Terminal Logger HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuild.