RononDex / FitsLibrary

A native C# dotnet core implenetation to read and write astronomical .FITS files following newest specifications
Mozilla Public License 2.0
12 stars 0 forks source link

'System.Runtime' error #11

Closed algady closed 3 years ago

algady commented 3 years ago

I'm trying to use this library with Windows Forms App using VS2019, I added FitsLibrary as a reference via nuget package manager. I used your example code just to see what can I do: var reader = new FitsDocumentReader(); var fitsFile = await reader.ReadAsync("SampleFiles/FOCx38i0101t_c0f.fits"); but I got this error:

Error CS7069 Reference to type 'Task<>' claims it is defined in 'System.Runtime', but it could not be found Not sure what is I'm doing wrong! Screenshot_1

RononDex commented 3 years ago

This usually hints that the library (in this case "FitsLibrary") and your project have incompatible frameworks. What framework are you using for your project (netcoreapp3.1 for example or .Net Framework 4.7)

The compatibility between .net version can be seen here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support

This library runs on netstandard2.1 which makes in incompatible with old .Net Framework (which is probably what you are using for windows forms)

algady commented 3 years ago

I'm using .NET Framework 4.8

RononDex commented 3 years ago

Yeah as you can see on the support table, any .Net Framework won't work with .net standard 2.1. You need to use .net5.0 or .net5.0-windows or .net core 3.1 etc

RononDex commented 3 years ago

Were you able to fix the issue by using a more up to date framework? I would like to close this issue becaues it does not seem related to the the code in this repository

RononDex commented 3 years ago

Closing issue due to inactivity of OP