Open Laocoon7 opened 2 years ago
Late follow up, but could you confirm if this is an issue just affecting your VS2022 install versus older versions of Visual Studio? This appears to be an issue with how the CLR version is emitted in the project file.
What seems to be the problem? An invalid string is written to the "targetframework" configuration when targeting net6.0 with a c++/cli project.
This causes the project to not load in VisualStudio2022.
What did you expect to happen? Be able to load the project in VisualStudio and: Project "Configuration Properties->Advanced->C++/CLI Properties->.NET Core Target Framework" to be set to "net6.0"
What have you tried so far? This is probably related to issue #1865
How can we reproduce this?
What version of Premake are you using? premake5.0.0-beta1
Anything else we should know? The error message:
[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries(_.vnet6.0, '', x64, '')' cannot be evaluated. Input string was not in a correct format. $RelativePath\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets
This seems like the commit to add net5.0+ https://github.com/premake/premake-core/commit/cada88b037bdcdba0cd5efdc82a440bc44f1e5b8