-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try running stub msquic on CI #2111
Conversation
@ViktorHofer maybe you can help with this (or direct me to someone who would know more). I'm a bit confused why there was a test failure here. The goal is to have a native dll that the test project brings in that will be found when having a DllImport. msquic.dll is located in I downloaded the same test assets that were downloaded by the helix test run. I then ran RunTests.cmd with a local build of the testhost. This also succeeded. So I'm not sure why the native dll isn't being found. I can do some more verification to make sure the dll is present on the helix machine, but from what I can tell it's present. |
I'm starting to wonder if this might be a deps.json issue. I'll take a look now. |
So the native dll is being included via contentFiles and specifies CopyToOutputDirectory on it. Therefore, I don't believe it would be added to the deps file. However, my expectations were that if the msquic.dll is present next to System.Net.Quic.Tests.dll, when DllImport resolves, it would be able to find msquic.dll. Also, if there is a better way to do what I'm trying to do, I'm all ears. Internal configuration for creating this package is here: https://dev.azure.com/dnceng/internal/_git/dotnet-msquic-build?path=%2FMsQuicPackage |
Otherwise the host could refuse to load the assembly even if it's present. The folder structure inside the nuget package defines which is being written into the deps.json file which is the input for the host and its assembly loading decisions. |
Right now, I'm doing content include to bring in these native dlls. Should I just do a none include with a link to get it into the runtime/*/lib/netcoreapp2.1 folder? Another thing is; I don't really care about the netcoreapp2.1 aspect. I think I should be doing: \runtimes\win-x64\native\msquic.dll. |
Anyways, I think I know what I need to do at this point. Will update this PR once the package is authored correctly. Appreciate the help as well 😄 |
You also need to set the property CopyLocalLockFileAssemblies in the test project to true.. |
Can you please point me to the source code / project file?
I think you need to have the netcoreappx.x in it, otherwise it won't be resolved as a usable asset by the host. |
Can you share the deps file? /cc @vitek-karas Is msquic.dll a native DLL? Does it statically link its depdencies (like C-runtime, etc)? |
If you want the entire deps file, I can post separately, but here is the relevant section in the deps file itself.
msquic is a native dll. I think the c-runtime is dynamically linked, but I'll need to confirm that. |
The |
FYI I have found the root cause of the issue. msquic isn't dynamically linking against the UCRT yet, so I statically build msquic for now to use for testing. |
f1d54a8
to
87ef8ce
Compare
Need to check a few things before merging, like whether it's okay to have a package reference like this in a test project.