Skip to content
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

[BUG] fresh build looks for .NET CORE 5.0 #45

Closed
IngmarBitter opened this issue May 2, 2020 · 6 comments
Closed

[BUG] fresh build looks for .NET CORE 5.0 #45

IngmarBitter opened this issue May 2, 2020 · 6 comments

Comments

@IngmarBitter
Copy link
Contributor

Windows 10 Pro, Visual Studio 2019, .NET CORE 3.0 and 3.1 installed via the Visual Studio installer.
terrafx repo cloned, opened TerraFX.Interop.Windows.sln tried to run TerraFX.Samples.DirectX in Debug AnyCpu mode.

I got 117 identical errors complaining that

The current .NET SDK does not support targeting .NET Core 5.0. Either target .NET Core 3.1 or lower, or use a version of the .NET SDK that supports .NET Core 5.0.

All pointing back to the file

C:\ProgramFiles\dotnet\sdk\3.1.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets

Why is it thinking .Net Core 5.0 is configured as target?

PS: Ok, the next version of .Net Core will be .Net 5.0 (no core). I installed the preview 3 and rebuilt the solutino. Still same error.

@nathan-alden-sr
Copy link
Contributor

You need to install .NET 5.0 preview 3 (or newer) and likely use VS 2019 Preview, as well. Tanner's multitargeting the projects now.

@Perksey
Copy link

Perksey commented May 2, 2020

Ok, the next version of .Net Core will be .Net 5.0 (no core). I installed the preview 3 and rebuilt the solutino. Still same error.

Perhaps the TFM change was breaking after all? Didn’t expect that. In any case, it probably should be changed from netcoreapp5.0 to net5.0 and such change may fix this issue

@tannergooding
Copy link
Member

For .NET 5 you will eventually need VS 2019 Preview. However, for the current preview you should be able to get it working by enabling VS to use preview SDKs.

If you goto Tools->Options->Environemtn->Preview Features you'll find a checkbox for Use previews of the .NET Core SDK (requires restart) which should unblock you for now:
image

@IngmarBitter
Copy link
Contributor Author

Yay! Got it to work. So the preview of .Net 5.0 is needed, but the normal released version of VisualStudio 2019 is fine - although only after checking the feature Tools->Options->Environment->Preview Features->Use previews of the .Net Core SDK.

Thanks for you quick responses and help.
Should this info be added to the readme here at the root of the repo?
https://github.com/terrafx/terrafx.interop.windows

From my point of view this issue can be closed. Am I supposed to do so or someone else?

@Perksey
Copy link

Perksey commented May 3, 2020

Feel free to submit a PR.

@tannergooding
Copy link
Member

I've closed it, although you should feel free to do so in the future if you feel your issue is resolved or no longer applicable.

I've logged #48 to track updating the documentation to call out any tooling requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants