I last downloaded and used Microsoft visual studio 2017 for a C# class back in the spring. I have since opened and loaded an old project today and I get this when running it:
“the current .NET SDK does not support targeting .NET Core 2.0. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.0."
Any ideas as to why this is happening? When I open and run my c++ projects from the summer everything runs fine.
Thank you!
Ok, looks like you will have to go to this Microsoft page and choose and install .NET Core SDK you need:
.NET Core 2.0 downloads
Also it's good thing if you install updates in Visual Studio 2017 - check for the notifications flag in upper right corner of VS 2017.
Related
I have installed both .NET CORE 3.1. and preview 5.0. I see it when I type command:
dotnet --list-sdks
I see all packages
but when I want to use it in VS project in C# .NET CORE console app I cannot.
I have not tried .NET CORE 3.x with VS 2017 but according this page it is possible that is is supported only in VS 2019.
You might also try to restart Visual Studio. I think it loads installed frameworks only during startup.
Also check out this thread. You might find there some answers
I currently have Visual Studio 2012 and I want to download .NET Core SDK (https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-2.2.103-windows-x64-installer).
I don't want to use it inside the VS2012 because I know this is not possible.
My question is if I can have and use .NET Core alongside VS2012? It will be safe to install the SDK? Or it might affect the functionality of VS2012 somehow?
I can't install another VS version on my PC and I want to try .NET Core.
Yes you can, it is totally possible to install .NET Core 2.2 alongside Visual Studio 2012. You wont be able to create .NET Core 2.2 Projects using Visual Studio 2012, for this you need at least Visual Studio 2015 Update 3.3 or later.
If you're looking for an alternative, Visual Studio Code might be interesting to look at. Here is a tutorial to working with C# in VS Code and here is a simple step by step tutorial to creating a "Hello World" console app in .NET Core and VS Code
I'm currently making a bot for a discord server with Discord.NET and I'd like to create a WinForm for this instead of a console. Is there a way to implement WinForms to a .NET Core app?
Starting from .NET Core 3.0, you can create Windows Forms applications using .NET Core.
VS 2019
The project template is available in VS 2019.
VS 2017
You need to have Visual Studio 2017 Update 15.8 or higher.
Install Visual Studio 2017 Update 15.8 or higher
[Visual Studio download site.]
Install the latest .NET Core 3.0 SDK
[daily build (latest changes, but less stable) or preview (more stable, recommended)].
Open command prompt and run the following command to create the project:
dotnet new winforms -o MyWinFormsApp
To build and run the project, you can go to the directory in which the project is created and open MyWinFormsApp.csproj using Visual Studio, build and run it.
You can also run the following commands if you prefer to build and run from command line:
cd MyWinFormsApp
dotnet build
dotnet run
Note
Project Template: The project template is available in VS 2019.
Designer: Along with GA release of .NET Core 3.0, Windows Forms Designer Preview 1 has also been released and can be used in VS 2019. Also starting from Visual Studio 16.5 Preview 1 and by release of .NET CORE 3.1, Visual Studio has built in support for designer. Take a look at this post. But keep in mind, in this release, many controls aren’t yet supported in designer.
Related links
Updates to .NET Core Windows Forms designer in Visual Studio 16.5 Preview 1
Announcing .NET Core 3 Preview 1 and Open Sourcing Windows Desktop Framework
.NET Core Windows Form GitHub Repository
WinForms on .NET Core Roadmap
.NET Core Windows Forms Samples
Porting existing applications to .NET Core 3.0
Edit: Since I wrote this back in September 2017, the reality has changed. As of the .NET Core SDK 3, Windows Forms support has been added back in. It does not have the platform independance of many other parts of .NET Core and converting between .NET Framework and .NET Core WinForms code needs a conversion tool. But it is there.
No, not really. .NET Core is a specific selection of classes from the larger .NET Framework, which includes Windows Forms. Windows Forms is one of the things they (had to) cut out to make the smaller .NET Core.
Last I looked, .NET Core had support for UWP (a followup to WPF), Xamarin and ASP.Net 5 (Core version). UWP and maybe Xamarin would be suitable for Desktop applications:
Frameworks, Programming for .NET, Display technologies and the like
.Net core 3 preview is released which includes WPF and Win Forms support. You can use it with Visual studio 2019 preview which can publish Win Forms platform independently and self contained.
I know this is an old post, but I am currently in the process of doing this I can tell you it is very possible now. Hopefully when I'm done it catches on, basically I'm creating a simple user interface to pass off to a D&D DM so he can administer the game easily.
Like I said I know this is an old post and probably no one cares, but I figured I'd throw it out there that it can be done.
I am a java developer and know very little about .Net. I am working on project which has some screens built using the .Net FrameWork. Recently, client updated to IE11 and now they are facing some .net exception related to Systems.Windows.Form while right clicking on any page.
After some research I realized this is an existing issue with .net 1.1 framework.
Can I point to Systems.Windows.Form.dll of some higher version of .net as I have other versions also installed on my system.
The first Visual Studio version to support Multi-Targeting was VS2008. Before then each version of Visual Studio only supported working with the then current version of the .Net Framework.
VS.Net => .Net 1.0
VS2003 => .Net 1.1
VS2005 => .Net 2.0
So you will have to migrate to a newer version of Visual Studio to resolve the issue.
Normally opening an old solution in a new version of Visual Studio will run an upgrade wizzard that in my experience rarely causes issues. However given how old VS2003 is I have no practical experience with how new versions of Visual Studio will handle it.
I am learning C# and have installed Visual Studio 2012 on a PC running Windows 7.
I can now browse to the C:\Windows\Microsoft.NET directory.
My first question is:
Does Visual Studio ship with the .NET directory, or does Visual Studio just access the directory that already exists on a computer running Windows 7?
My second related question is:
The highest numbered folder at the location C:\Windows\Microsoft.NET\Framework\ is v4.0.30319. This confuses me because the version number associated with Visual Studio 2012 in the table at https://en.wikipedia.org/wiki/.NET_Framework#History is 4.5.50709.17929.
So why do I not have a folder with that higher version number if I installed Visual Studio a couple of weeks ago?
Windows 7 comes with .NET 3.5 SP1. Visual Studio does not ship with .NET.. however, .NET ships with Visual Studio (obviously, so you can develop on it).
The version number didn't change between 4 and 4.5 .. I cannot remember the reason why (I think it had something to do with it being an in-place upgrade.. or something). This is why the folder version numbering is the same.
EDIT:
You can look here for a better explanation of the .NET 4/4.5 versioning and what the exact revision numbers mean: https://stackoverflow.com/a/12972517/1517578
Visual studio is just an IDE that requires the .NET framework. Lots of applications require the .NET framework so there's a chance that you could have had .NET installed before installing VS. Installing VS, however, will ensure you have the correct .NET runtime for your version.
.NET 4.5 is an in place replacement to the .NET 4.0 framework so the folder will still be called v4.0.... I guess this is a way to avoid problems with systems built on .NET 4.0
There is a good article here about .NET 4.0 and .NET 4.5
Visual Studio ships with the .NET directory and it also accesses the directory if that already exists. One can install .Net 4.5 separately too
The highest numbered folder v4.0.30319 is the version of the CLR and not the .Net Libraries. .Net v4.5 replaces v4.0 similar to the way v3.0, v3.5 and v3.5SP1 replace v2.0 still the CLR version remains v2.0.xxxxx. This is the reason why you don't have a folder with higher version number.
It comes with windows os. If you go to Turn Windows features on or off you will see the Microsoft .NET framework