[ERROR]: Failed build-raw: Value cannot be null.
What am I doing wrong. I downloaded the code and submodules recursively. Ran: .\build -s -all -x86 Release
3:47:02 PM.1103 [ERROR]: Failed build-raw: Value cannot be null. Parameter name: input MSBUILD : Logger error MSB1029: The build has been canceled by user script. Build failed.
Hello. You need to update vsSolutionBuildEvent up to 1.16
FIXED: "Failed build-raw: Value cannot be null" in modern environments.
I'm in progress in attempt to update all my affected repos according to priorities https://www.reddit.com/r/x3F/comments/189wi1h/first_public_release_this_year_and_something/
slowly, but ...
in order not to wait, please temporarily replace it by yourself "1.14.1.1" as "1.16.0" here; then remove ./packages/vsSolutionBuildEvent folder, and try again
Your suggestion seemed to work, thank you, but now I'm getting:
DllExport.sln.metaproj : error MSB4126: The specified solution configuration "-s|Any CPU" is invalid.
-s is not a key to .\build, build-s inside coreclr folder, that is,
cd coreclr
build-s -x86 -release
better to use available helpers in root folder:
- build-coreclr-ilasm-x64.cmd
- build-coreclr-ilasm-x86+x64.cmd
- build-coreclr-ilasm-x86.cmd
Runing both build-coreclr-ilasm-x86+x64.cmd or build-coreclr-ilasm-x86.cmd
C:\Users\kenln\Downloads\DllExport\coreclr.dotnet\sdk\3.0.100\NuGet.targets(123,5): error : Unable to load the service index for source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. [C:\Users\kenln\Downloads\DllExport\coreclr\eng\empty.csproj] C:\Users\kenln\Downloads\DllExport\coreclr.dotnet\sdk\3.0.100\NuGet.targets(123,5): error : The SSL connection could not be established, see inner exception. [C:\Users\kenln\Downloads\DllExport\coreclr\eng\empty.csproj] C:\Users\kenln\Downloads\DllExport\coreclr.dotnet\sdk\3.0.100\NuGet.targets(123,5): error : The remote certificate is invalid according to the validation procedure. [C:\Users\kenln\Downloads\DllExport\coreclr\eng\empty.csproj]
This is what I was talking about here https://www.reddit.com/r/x3F/comments/189wi1h/first_public_release_this_year_and_something/
All modern environments will work properly with all modern instances until small differences appear that break everything like a house of cards due to different formats, different resolvers, different dependencies in the same domain, each of them can refer to each other requiring different versions, including due to the product cycle of the declared the arcade (just below) ... Consider at least the build with Arcade SDK. This is an internal MS corporate standard for build, localization (part of), and distribution. Quite convenient as long as it is closed inside this internal ecosystem.
must be upgraded somehow later; don't know;
Note the following: to build ilasm from src is optional for current project since it uses artefacts that was built in the past from parent https://github.com/3F/coreclr
https://ci.appveyor.com/project/3Fs/coreclr-62ql7/builds/29395847
So are you saying your build is broken? I am willing to help you fix it because I need it for .NET 8, but I need you to tell me why you had to fork and modify Robert Giesecke's version? I noticed this from the old version:
stringBuilder.Append(" modopt(['mscorlib']'").Append(AssemblyExports.ConventionTypeNames[exportMethod.CallingConvention]).Append("') ");
Above references .NET Framework and of course, does not work with .NET Core or later. Is this why you chose a modified ILAsm + ILDasm on coreclr?
Can you send me a successfully created .il file as an example?
So are you saying your build is broken?
You're trying to build coreclr\ilasm while trying to interact with Giesecke's wrapper to update modopt(['mscorlib'] in current repository.
coreclr submodule is not required to build DllExport if you don't have the plan to change something from it of course. Because to build IL assembler on coreclr takes about ~30-40 min (see CI). That's why it was cached as https://www.nuget.org/packages/ILAsm package in the past.
This is a different repo and a different story if MS dropped something from their ecosystem and finally brokes lot of these dependencies. If you say 3F/coreclr is broken now, then it is. 3F/coreclr has not changed since the last build
I am willing to help you fix it because I need it for .NET 8
Good! I appreciate it, thanks! I'm currently in progress according to my new priorities mentioned in link above. This or next week I've plan to fix some other related projects to be closer to implement something new for DllExport too.
but I need you to tell me why you had to fork and modify Robert Giesecke's version?
Have you tried using search on this tracker?
- https://github.com/3F/DllExport/issues/3
- https://github.com/3F/DllExport/issues/87#issuecomment-438576100
Above references .NET Framework and of course, does not work with .NET Core or later.
does not work with .NET Core
.NET Core 2.2 and .NET Standard 2
Is this why you chose a modified ILAsm + ILDasm on coreclr?
- https://github.com/3F/DllExport/issues/125#issuecomment-561245575
- https://github.com/3F/DllExport/pull/123
Can you send me a successfully created .il file as an example?
Is 1.7.3 or its rebasing broken for you? Or what example you're talking about?
Is 1.7.3 or its rebasing broken for you? Or what example you're talking about?
Yes, I keep getting the following:
Runing both build-coreclr-ilasm-x86+x64.cmd or build-coreclr-ilasm-x86.cmd
C:\Users\kenln\Downloads\DllExport\coreclr.dotnet\sdk\3.0.100\NuGet.targets(123,5): error : Unable to load the service index for source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. [C:\Users\kenln\Downloads\DllExport\coreclr\eng\empty.csproj] C:\Users\kenln\Downloads\DllExport\coreclr.dotnet\sdk\3.0.100\NuGet.targets(123,5): error : The SSL connection could not be established, see inner exception. [C:\Users\kenln\Downloads\DllExport\coreclr\eng\empty.csproj] C:\Users\kenln\Downloads\DllExport\coreclr.dotnet\sdk\3.0.100\NuGet.targets(123,5): error : The remote certificate is invalid according to the validation procedure. [C:\Users\kenln\Downloads\DllExport\coreclr\eng\empty.csproj]
However, I downloaded and compiled ilasm, ildasm from https://github.com/dotnet/runtime.
.\build.cmd -subset Clr.ILTools
I had luck using these with the following source:
` .class public abstract auto ansi sealed beforefieldinit 'MyClass' extends ['System.Runtime']'System'.'Object' { .method public hidebysig static void modopt(['System.Runtime']'System.Runtime.CompilerServices.CallConvStdcall') 'MyMethod'() cil managed { .custom instance void ['DllExport.Metadata']'DllExport'.'DllExportAttribute'::.ctor(string) = ... .export [0] as 'Scan'
...
} } `
It exports Scan correctly:
I can load the image using LoadLibrary from a .NET 4.8 app but cannot from a .NET 8 app.
If I knew the changes you made to ilasm.exe, I may can get it working.
I can't be too distracted by this project yet (immediate plans are described in the linked post). But I've checked the following specially for you to build from scratch using VS 2022; Everything seems to be working;
Try to build from scratch using the following commands: (n. gnt will inject latest changes from mentioned 1.16 fixes, you don't need to change it manually as I suggested earlier)
git clone https://github.com/3F/DllExport.git src & cd src
git submodule update --init GetNuTool
cd GetNuTool & ..\tools\gnt /p:ngpackages=vsSolutionBuildEvent &cd..
tools\gnt /p:ngpackages=vsSolutionBuildEvent
build
It exports Scan correctly:
There is nothing about correctness. These are only the EAT entries about RVAs in related PE directory from the attached screenshot. Please read all mentioned issues from my links above. It's all about what you're trying at the moment.
I can load the image using LoadLibrary from a .NET 4.8 app but cannot from a .NET 8 app.
This is what I'm talking about.
If I knew the changes you made to ilasm.exe, I may can get it working.
?
https://github.com/3F/coreclr
The build for the current repo has been fixed since 8e77905 https://github.com/3F/DllExport#build-net-dllexport-from-source
git clone https://github.com/3F/DllExport.git DllExport
cd DllExport & .\build Debug
3F/coreclr repo will be fixed later; +Important changes are coming soon (I've planned for ~June-July). Follow the news or let me know what are you trying here.