-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add inline array marshaller sample to our custom marshalling sample. #6064
Conversation
You can add the It's one of the tools that helps us keep up to date as we write docs for preview features, and then reset for the next version. |
.../interop/source-generation/custom-marshalling/src/custommarshalling/custommarshalling.csproj
Show resolved
Hide resolved
@BillWagner any ideas on how to get this building with a .NET 8 SDK since it needs to build with the VS host (due to the C++ project)? |
Add a That specifies using Visual Studio as the host. |
I did that, but now it's complaining that there's no .NET 8 SDK available. |
It looks like you're the first to need .NET 8 in this repo. Update this line with the .NET installer channel: https://github.com/dotnet/samples/blob/main/.github/workflows/build-validation.yml#L18 Then you should be fine. It should match the channel in the |
I already did that and I'm still getting the same error. If I don't use the visual studio host, it correctly finds the .NET 8 SDK, but it doesn't seem to work with the VS host. |
adding @adegeo I've exhausted my knowledge of how the tooling works. He may know. |
I don't think this would work with Visual Studio. Doesn't Visual Studio use it's own copies of .NET? The latest versions of Visual Studio probably don't install .NET 8 preview as part of the base image. You'll need to remove the snippets config file and just use the normal cl.exe should be in path still, since visual studio is in path, correct? Also, there is the support in the snippets system to run custom commands for compiling, if it just doesn't seem to work. |
The issue is that the .NET SDK isn't hooked up to find the VC++ targets, so the imports in the C++ project fail. |
@jkoritzinsky We may have to just merge without the testing framework as this may just be outside of the realm we support. Question, though, the readme indicates that you can do |
If you're in a VS command prompt as the instructions say, the targets will be found. |
@adegeo if you're okay with it, I'm okay merging this without the testing framework. We can also wait until .NET 8 releases, whichever you prefer. Once .NET 8 comes out and the VS version on the testing machines is updated, then the tests will start passing. |
Merging based on preview builds. |
This won't build successfully until the InlineArray feature is out of preview, as the project file doesn't set
LangVersion
toPreview
.Fixes dotnet/runtime#86572