JoshClose / CsvHelper

Library to help reading and writing CSV files
http://joshclose.github.io/CsvHelper/
Other
4.63k stars 1.05k forks source link

Build error - #2226

Closed rjn71 closed 5 months ago

rjn71 commented 5 months ago

Describe the bug I'm trying to build the project in Visual Studio 2022. I've installed the latest SDK 8.0.101. I still get this error

Error NETSDK1045 The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0.

If I target to use .Net 7.0 or lower, then I get the error in CsvHelper.cs "Invalid expression term '[' CsvHelper (net48)"

Rob-Hague commented 5 months ago

You probably(?) need to upgrade Visual Studio to 17.8 https://learn.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs

rjn71 commented 5 months ago

Thanks @Rob-Hague . Let me try. I was able to build using the VS command prompt, so surely it's to do with VS version

rjn71 commented 5 months ago

@Rob-Hague I upgraded VS 2022 to version 17.8 and the build went fine. Thanks for pointing out