Open PWagner1 opened 4 years ago
Are you sure you are using .Net SDK 5.0 Preview? What does dotnet --info
print for you?
Hi @svick, yes I've installed 5.0.0-preview.2.20160.6 (x86 & x64)
Is it possible that you have a global.json somewhere in the directory structure above your project? You can check that by running dotnet --info
in your project's directory.
Also, are you building from the command line or using Visual Studio? If it's Visual Studio, I believe VS 16.6 Preview is required. Are you using that?
Both yes I'm using VS 16.6 Preview & building the project & making NuGet packages via cmd. I do have the stable release of Visual Studio 16.5 installed, which I don't use. Could that be interfering? Here's the info from the directory structure.
Then I'm stumped, sorry. Hopefully, someone else will be able to help you.
@svick No problem, thanks anyway!
Unfortunately, I can't repro this issue @Wagnerp.
Just downloaded your project and checked out that branch and build went fine:
I have the same version as you:
Maybe try installing Preview 3 that was released today and see if you still have the same issue?
Hi @mairaw
Thanks, I'll check out preview 3 and will let you know what happens.
Hi @mairaw
I have tried but it doesn't output any binaries. I use build.cmd
& build.prj
, which works fine with .NET Core 3.1 but not with .NET 5, even though I have it as a targeted framework.
@rainersigwald is this something you can help with?
Hi @mairaw
I think that I've figured out the issue.
1) I've got both the stable & preview versions of Visual Studio installed
2) I don't think it likes to build if you don't have Visual Studio installed in the default C:\Program Files (x86)\Microsoft Visual Studio\2019
directory (I always install my applications in a separate partition)
Hope this helps!
@Wagnerp https://github.com/Krypton-Suite/Standard-Toolkit/blob/dot-net-5/build.cmd tries to find and invoke MSBuild.exe from a variety of locations (all in programfiles(x86)
). Which one is selected in your case? If you build from the command line using dotnet build
do you get the same problems?
Hi @rainersigwald
I use VS Community, but I installed my environment on another partition, not C:\Program Files (x86
. The dotnet build
command does work, but it doesn't output any binaries. I have tested the build system does work on a VM (to eliminate the possibility of the batch file having a issue). I can verify that everything does work, providing that you install everything to their default locations.
What is the exact command you're entering, and what is its output?
I use build.cmd
and it should output binaries to a Bin
directory in the root folder.
However, it fails to build with the message error NETSDK1045: 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.
Hi,
I'm receiving the following error while building a application for Windows: error NETSDK1045: 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. I'm using preview 2, and I am currently targeting 3.1. See: https://github.com/Krypton-Suite/Standard-Toolkit/tree/dot-net-5 for complete source.
Is there anyway of resolving this?