How can I make the C# interactive console inside Visual Studio use .NET Core instead of .NET Framework?
By default when it starts it shows that it is using .NET Framework in parenthesis in the title bar.
In Visual Studio 2019 16.8.3 (and probably in earlier versions, but I don't know how much earlier) you can execute:
#reset core
This resets the C# interactive console and makes it use .NET Core.
Related
I've been working on my ASP.NET Core 2.1 project using the preview version of Visual Studio 15.7.x
Looks like VS 15.7 is now final. Can we now use that instead of preview versions of VS?
I've had a lot of issues with the preview versions and would love to switch to a stable version of VS.
According to Announcing .NET Core 2.1 RC 1 on .NET Blog:
You can develop .NET Core 2.1 apps with Visual Studio 2017 15.7,
Visual Studio for Mac 7.5, or Visual Studio Code.
The Visual Studio side of the equation is tooling. If Visual Studio 15.7 has the ASP.NET Core 2.1 tooling included in the release, then yes you can use it to develop ASP.NET Core 2.1 apps. However, if the ASP.NET Core 2.1 code is still in flux, that means the tooling could change as well, so until the framework release is final, it's still a better idea to continue using the preview build of Visual Studio.
It's worth noting that ASP.NET Core 2.1 is conspicuously missing from the release notes. It's very likely that that support was stripped from 15.7 to allow the release of other necessary features that were ready to ship. I haven't updated myself yet, so I can't say for sure, but your question may be moot.
I installed Visual Studio 2017 version 15.6.5 (the latest) and now when I create a new Visual F# project under .NET Standard the only alternative is Class Library (.NET Standard). I would like to create a Console Application. How can I do that?
The answer here suggests to target .Net Core.
I've installed Visual Studio 2015 Community Edition and Mono Runtime. The list of target frameworks in visual studio looks this way (No .net core):
What should I do next?
Had the same problem.
My mistake was that I chose the template for
Windows -> Console Application instead of
Web -> Console Application
when I created the new project. From your screenshot it looks like you did the same.
Depends on what you need. In my case I found that in the latest update for VS 2015 there's the option of Class Library (Portable) more suitable.
A useful add-on to VS 2013 and 2015 is .NET Portability Analyzer to check your code:
https://visualstudiogallery.msdn.microsoft.com/1177943e-cfb7-4822-a8a6-e56c7905292b?SRC=VSIDE
I'm getting started with Visual Studio 2010 Express. A simple "Hello world" program (with a window and a command button) is being compiled with .net assembles, so it will require a .net to run.
Is there a way to set up Visual Studio to compile the code natively without using .net dependencies? Just a plain executable without .net dependencies.
If you're creating a .Net application, you're going to need the .Net Framework to run the program. If you don't want to use the .Net Framework then you are creating the wrong type of application. If you're trying to create a C++ application, you need to use the C++ templates.
I'm pretty aware that Visual Studio 2010 works with C# 4.0. But now I was wandering if I'm able to test C# 4.0 features with Visual Studio 2008.
I did that one time, using C# 3.0 with Visual Studio 2005 hacking the app.config file.
Did anyone have any success using C# 4.0 in VS2008?
I've installed Net Framework 4.0 beta, rebooted, created a new WPF application, chosen Application properties, but the Target Framework can be set only to Net Framework 3.5.
No. You can't use .NET 4.0 with VS2008, and you can't use the C# 4.0 features either - it's exactly the same situation as trying to make VS2005 cope with C# 3.0. The editor, Intellisense etc just don't know about the new features.
One important aspect is that even though it looks like Visual Studio is just using the external csc.exe compiler, it isn't - there's another "in-process" one. That in-process compiler is tied to the version of Visual Studio it comes with, so it only knows about the language features which were available at the time.
The 3.0 and 3.5 .NET libraries were just add-ons to 2.0. So it ws possible to test work done in VS 2008 using VS 2005 if you didn't use any 3.0 or 3.5 features.
My understanding is that the 4.0 is entirely new libraries, so I doubt you will be able to load or use them in VS 2008/2005.