AOT publish from `dotnet publish` generates error message, but seems to complete anyway
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 50/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- build-system
Research direction
Start by reproducing dotnet publish -r win-x64 <myproj>.csproj on the reported Windows and .NET 9 configuration. Then inspect microsoft.dotnet.ilcompiler\9.0.4\build\findvcvarsall.bat and the logged Exec invocation; done means publish no longer emits vague error output when the result is usable, or reports an actionable failure.
Written by the indexing model from the issue text.
Description
Description
When running dotnet publish on my project it will generate the following output:
The input line is too long.
The syntax of the command is incorrect.
After sleuthing with diagnostics, it seems to be coming from an attempt to run a packaged version of findvcvarsall.bat
Task "Exec" (TaskId:389)
Task Parameter:StandardOutputImportance=Low (TaskId:389)
Task Parameter:Command="D:\.nuget\packages\microsoft.dotnet.ilcompiler\9.0.4\build\findvcvarsall.bat" x64 (TaskId:389)
Task Parameter:ConsoleToMSBuild=True (TaskId:389)
Task Parameter:IgnoreExitCode=True (TaskId:389)
"D:\.nuget\packages\microsoft.dotnet.ilcompiler\9.0.4\build\findvcvarsall.bat" x64 (TaskId:389)
The input line is too long. (TaskId:389)
The syntax of the command is incorrect. (TaskId:389)
The command ""D:\.nuget\packages\microsoft.dotnet.ilcompiler\9.0.4\build\findvcvarsall.bat" x64" exited with code 255. (TaskId:389)
Output Property: _FindVCVarsallOutput=The input line is too long.;The syntax of the command is incorrect. (TaskId:389)
Output Property: _VCVarsAllFound=255 (TaskId:389)
Done executing task "Exec". (TaskId:389)
Task "Error" skipped, due to false condition; ('$(_VCVarsAllFound)' == '1') was evaluated as ('255' == '1').
Reproduction Steps
syntax of command run:
dotnet publish -r win-x64 .\<myproj>.csproj
Expected behavior
It should complete without errors or warnings that are vague or unactionable.
Actual behavior
As described, it indicates something is wrong, but doesn't say what that something is, even though it "seems" to produce a working output. (This does NOT inspire one with much in the way of confidence in said output!)
Regression?
No response
Known Workarounds
No response
Configuration
.NET 9
Windows 10 Version 22H2 (OS Build 19045.5737) [All Updates applied]
AMD64
[Unknown if related to this config only, I have no other configs to try]
Other information
No response
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·