Closed matra774 closed 11 months ago
The fix to the "82 unexpected" is to add
set startTime=!startTime:,=.!
set endTime=!endTime:,=.!
before the lines
if "!startTime!" == "" set startTime=0
if "!endTime!" == "" set endTime=0
There's no easy fix for the time delay. Using set and setx to store the build start time doesn't work. PowerShell gets around this, but is hideously slow. I'm removing the build timing from the project.
In server.csproj remove these lines:
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(IsWindows)'=='true'">
<Exec Command="call ..\SDK\Scripts\starttimer.bat $(ProjectName)" />
</Target>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(IsWindows)'=='true'">
<Exec Command="call ..\SDK\Scripts\endtimer.bat $(ProjectName)" />
</Target>
(I think I submitted this one an hour ago, but is not showing up in a issue list, so I am resubmitting. Feel free to close as a duplciate if original submission shows up) Area of Concern
Describe the bug Compilation of several project fails:
Expected behavior Compilation should succeed.
Screenshots If applicable, add screenshots to help explain your problem.
Your System (please complete the following information):
31ad131530ec9a0011f83372d15a308ed22b0739
Additional context Looks like an error occurs in line 30 while trying to parse end dates. Modifying the endtime.bat in following way
produces ouput
Minimum script to reproduce:
Outputs:
*** Possible solution: Adding quotes around variables use din IF statements seems to help:
Additional observations I have also noticed that
endtimer.bat
andstartimer.bat
take long time to execute (around 5-10 seconds). Looks like this can be contributed to the following line in .bat file... which also takes a long time when executed directly from cmd. exe.
See the gap in powershell.exe as shown with ProcessMonitor:
I am using default PowerShell that comes with windows 11: