Repository navigation
Open
Labels
QuestionGeneral question, not a problem in source code or documentation (yet)
Description
I try to build WPF in github action. And my build command is:
.\build.cmd -pack -ci -configuration Debug -prepareMachine /p:Platform=x86
After I checkout the code to v6.0.23, I fail to build WPF in github action. And the error code is:
LINK : fatal error LNK1104: cannot open file 'MSVCURTD_netcore.LIB' [D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\src\Microsoft.DotNet.Wpf\src\DirectWriteForwarder\DirectWriteForwarder.vcxproj]
This isn't the first time we've had this problem, see #6251 and #2290 and #2714
The build log:
##vso[task.setvariable isSecret=False;variable=Artifacts;isOutput=True]D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts
##vso[task.setvariable isSecret=False;variable=Artifacts.Toolset;isOutput=True]D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\toolset
##vso[task.setvariable isSecret=False;variable=Artifacts.Log;isOutput=True]D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\log\Debug
##vso[task.setvariable isSecret=False;variable=TEMP;isOutput=True]D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\tmp\Debug
##vso[task.setvariable isSecret=False;variable=TMP;isOutput=True]D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\tmp\Debug
Processing D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\global.json
strawberry-perl was not found in D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\.tools\bin\strawberry-perl\5.28.1.1-1\.
net-framework-48-ref-assemblies was not found in D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\.tools\bin\net-framework-48-ref-assemblies\0.0.0.1\.
dotnet-api-docs_net6.0 was not found in D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\.tools\bin\dotnet-api-docs_net6.0\0.0.0.4\.
Native tools bootstrap failed
GET https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1
Attempting to install dotnet from public location.
dotnet-install: Remote file https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.121/dotnet-sdk-6.0.121-win-x64.zip size is 251089702 bytes.
dotnet-install: Downloaded file https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.121/dotnet-sdk-6.0.121-win-x64.zip size is 251089702 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Extracting the archive.
dotnet-install: Adding to current process PATH: "D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install/windows#dependencies
dotnet-install: Installed version is 6.0.121
dotnet-install: Installation finished
##vso[task.prependpath]D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\.dotnet
##vso[task.setvariable isSecret=False;variable=DOTNET_MULTILEVEL_LOOKUP;isOutput=True]0
##vso[task.setvariable isSecret=False;variable=DOTNET_SKIP_FIRST_TIME_EXPERIENCE;isOutput=True]1
Downloading vswhere
Setting NUGET enhanced retry environment variables
##vso[task.setvariable isSecret=False;variable=NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY;isOutput=True]true
##vso[task.setvariable isSecret=False;variable=NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT;isOutput=True]6
##vso[task.setvariable isSecret=False;variable=NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS;isOutput=True]1000
Processing D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\eng\..\global.json
File 'C:\Users\runneradmin\.netcoreeng\native\temp\strawberry-perl-5.28.1.1-1-win64-x64.zip' already exists, skipping download
strawberry-perl was not found in D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\eng\..\.tools\native\bin\strawberry-perl\5.28.1.1-1\.
File 'C:\Users\runneradmin\.netcoreeng\native\temp\net-framework-48-ref-assemblies-0.0.0.1-win64-x64.zip' already exists, skipping download
net-framework-48-ref-assemblies was not found in D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\eng\..\.tools\native\bin\net-framework-48-ref-assemblies\0.0.0.1\.
File 'C:\Users\runneradmin\.netcoreeng\native\temp\dotnet-api-docs_net6.0-0.0.0.4-win64-x64.zip' already exists, skipping download
dotnet-api-docs_net6.0 was not found in D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\eng\..\.tools\native\bin\dotnet-api-docs_net6.0\0.0.0.4\.
Native tools bootstrap failed
Setting NUGET enhanced retry environment variables
##vso[task.setvariable isSecret=False;variable=NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY;isOutput=True]true
##vso[task.setvariable isSecret=False;variable=NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT;isOutput=True]6
##vso[task.setvariable isSecret=False;variable=NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS;isOutput=True]1000
Setting NUGET enhanced retry environment variables
##vso[task.setvariable isSecret=False;variable=NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY;isOutput=True]true
##vso[task.setvariable isSecret=False;variable=NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT;isOutput=True]6
##vso[task.setvariable isSecret=False;variable=NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS;isOutput=True]1000
renderingbuilder.cpp
swinit.cpp
Generating Code...
basert.cpp
basesurfrt.cpp
shapeclipperforfeb.cpp
Generating Code...
Determining projects to restore...
Restored D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\obj\UtilLib\Win32\Debug\CppSupport\CppSupport_UtilLib.csproj (in 32 ms).
shared.vcxproj -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\shared\Win32\Debug\shared.lib
targets.vcxproj -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\targets\Win32\Debug\targets.lib
sw.vcxproj -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\sw\Win32\Debug\sw.lib
UIAutomationTypes-ref -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\UIAutomationTypes-ref\Debug\net6.0\UIAutomationTypes.dll
Determining projects to restore...
pch.cxx
Restored D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\obj\uce\Win32\Debug\CppSupport\CppSupport_uce.csproj (in 44 ms).
precomp.cpp
Determining projects to restore...
WindowsBase -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\WindowsBase\Debug\net6.0\WindowsBase.dll
assert.cxx
Restored D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\obj\PresentationNative\Win32\Debug\CppSupport\CppSupport_PresentationNative.csproj (in 45 ms).
memutils.cxx
misc.cxx
strutil.cxx
instrumentation.cxx
list.cxx
hirestimer.cxx
registry.cxx
debugbreak.cpp
Generating Code...
UtilLib.vcxproj -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\UtilLib\Win32\Debug\wpfutil.lib
alphamaskwrapper.cpp
apifunc.cpp
clientchanneltables.cpp
serverchanneltables.cpp
clientchannel.cpp
clipstack.cpp
cmdbatch.cpp
connection.cpp
connectioncontext.cpp
composition.cpp
crossthreadcomposition.cpp
dirtyregion.cpp
precomp.cxx
dpiprovider.cpp
drawingcontext.cpp
generated_resource_factory.cpp
geometry_api.cpp
global.cpp
glyphcacheslave.cpp
graphwalker.cpp
handletable.cpp
Generating Code...
System.Windows.Presentation-ref -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\System.Windows.Presentation-ref\Debug\net6.0\System.Windows.Presentation.dll
DirectWriteForwarder.cpp
Compiling...
htmaster.cpp
htslave.cpp
hwndtarget.cpp
partition.cpp
partitionmanager.cpp
partitionthread.cpp
precompctx.cpp
prerender3dcontext.cpp
printtarget.cpp
render3dcontext.cpp
renderdatabounder.cpp
rendertarget.cpp
rendertargetmanager.cpp
resslave.cpp
rsapi.cpp
samethreadcomposition.cpp
schedulemanager.cpp
System.Windows.Presentation -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\System.Windows.Presentation\Debug\net6.0\System.Windows.Presentation.dll
serverchannel.cpp
VisualCache.cpp
VisualCacheManager.cpp
Generating Code...
Compiling...
VisualCacheSet.cpp
vt_api.cpp
Generating Code...
UIAutomationProvider-ref -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\UIAutomationProvider-ref\Debug\net6.0\UIAutomationProvider.dll
uce.vcxproj -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\uce\Win32\Debug\uce.lib
dwriteloader.cpp
UIAutomationClient-ref -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\UIAutomationClient-ref\Debug\net6.0\UIAutomationClient.dll
UIAutomationClientSideProviders-ref -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\UIAutomationClientSideProviders-ref\Debug\net6.0\UIAutomationClientSideProviders.dll
Utils.cxx
precomp.cpp
main.cpp
OtherAssemblyAttrs.cpp
Generating Code...
dllentry.cpp
wpfgfx.def
.NETCoreApp,Version=v6.0.AssemblyAttributes.cpp
Creating library D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\wpfgfx\Win32\Debug\wpfgfx_cor3.lib and object D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\wpfgfx\Win32\Debug\wpfgfx_cor3.exp
UIAutomationTypes -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\UIAutomationTypes\Debug\net6.0\UIAutomationTypes.dll
LINK : fatal error LNK1104: cannot open file 'MSVCURTD_netcore.LIB' [D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\src\Microsoft.DotNet.Wpf\src\DirectWriteForwarder\DirectWriteForwarder.vcxproj]
##vso[task.logissue type=error;sourcepath=LINK;linenumber=0;columnnumber=0;code=LNK1104;](NETCORE_ENGINEERING_TELEMETRY=Build) cannot open file 'MSVCURTD_netcore.LIB'
wpfgfx.vcxproj -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\wpfgfx\Win32\Debug\wpfgfx_cor3.dll
wpfgfx.vcxproj -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\wpfgfx\Win32\Debug\wpfgfx_cor3.pdb (Full PDB)
PresentationCore-ref -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\PresentationCore-ref\Debug\net6.0\PresentationCore.dll
UIAutomationProvider -> D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\bin\UIAutomationProvider\Debug\net6.0\UIAutomationProvider.dll
Build FAILED.
LINK : fatal error LNK1104: cannot open file 'MSVCURTD_netcore.LIB' [D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\src\Microsoft.DotNet.Wpf\src\DirectWriteForwarder\DirectWriteForwarder.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:05:26.77
Build failed with exit code 1. Check errors above.
See log: D:\a\dotnetCampus.CustomWpf\dotnetCampus.CustomWpf\artifacts\log\Debug\Build.binlog
##vso[task.complete result=Failed]msbuild execution failed.
Killing running build processes...
The github action is : https://github.com/dotnet-campus/dotnetCampus.CustomWpf/actions/runs/6595089616/job/17919705232
Metadata
Metadata
Assignees
Labels
QuestionGeneral question, not a problem in source code or documentation (yet)
Activity
lindexi commentedon Oct 21, 2023
As @singhashish-wpf says in #6251 (comment), the visual studio 17.3 Preview 2 can fix this issues. But the github action still fail with Visual Studio Enterprise 2022 17.7.34202.233. Is this VisualStudio's issues?
singhashish-wpf commentedon Oct 23, 2023
Not sure if your github action is installing vs workloads specified in the vsconfig file. This should ideally not be there if the vsconfig workloads are installed with VS and during a clean build.
lindexi commentedon Oct 23, 2023
@singhashish-wpf Thank you. And I use windows-latest enviroment, which is
Windows Server 2022with this software list: https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.mdsinghashish-wpf commentedon Oct 23, 2023
Are you installing the vs workloads in wpf.vsconfig file as well or not?
Are you running a clean build? (Is there a clean task in your github action?)
lindexi commentedon Oct 23, 2023
@singhashish-wpf I just run in github action. And the github action will use the default windows-latest development enviroment, but I am not sure it installed the vs workloads in wpf.vsconfig file. And the github action will clone the repo to the new folder which means I do the clean before build.
lindexi commentedon Dec 6, 2023
Install as follow still fail.
Fail:
riverar commentedon Mar 14, 2024
@lindexi For some reason, it appears the build process (or Visual Studio command prompt?) is latching onto an earlier MSVC toolchain. I have
C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.40.33521on disk but VSpre during build is using14.39.33519during build for some reason.So as a workaround, ensure you have
C++/CLI support for v143 build toolsinstalled for one or two toolchains earlier.Screenshot from Visual Studio installer:
