question

ArathiJinde-8885 avatar image
0 Votes"
ArathiJinde-8885 asked JeanineZhang-MSFT commented

C++ CLI Task IEnumerable shows Error not a valid Generic argument

Hi ,

MyRepository<MyModel, String>^ pr = new PatientRepository<PatientModel, String>();

Task<IEnumerable<MyModel>^> FindAsync(String^ key)
{
return pr->FindAsync(key);
}

here Task IEnemurable<MyModel> shows not a valid generic argument

how to resolve this
Thanks,

c++dotnet-cli
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Task Async await supported with C++/CLI ?

0 Votes 0 ·

@ArathiJinde-8885

As far as I'm concerned, you couldn't use async/await with c++/cli. I suggest you could refer to the links:
https://stackoverflow.com/a/23897564/11872808
https://stackoverflow.com/a/57236107/11872808


0 Votes 0 ·

Thanks for the confirmation

Now I have an issue with /clr:netcore I have a dll
I am referencing the same in WPF application when creating object of viewModel class this thows error
System.BadImageFormatException: 'Could not load file or assembly

same as here
https://stackoverflow.com/questions/64025144/c-sharp-clr-excecption-badimageformatexception-could-not-load-file-or-assembly

is there any solution on how to launch WPF application by referencing the clr dll within the applicaiton and creating an object of clr:core class



0 Votes 0 ·
Show more comments

0 Answers