How to target .Net Core from Visual Studio? - visual-studio

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

Related

How can I create a windows forms project using .NET Core?

I'm migrating my project from .net Framework pro .net core.
I installed Visual Studio Community 2019 and .net core packages (Including .net core 3.0).
I have already followed the guidelines outlined but the selection I am oriented to do simply does not exist in Visual Studio Community 2019:
I did it in 2017, but the problem was not solved.
I also tried to create the form through the command:
dotnet new winforms -o FormCore
The project is created, but I can not open it. I have the error message:
The project file is incomplete. Expected imports are missing
I've already tried installing Visual Studio Community 2019. The problem persists.
If anyone can help me with the solution to this problem, thank you very much.
Are you using the preview version of visual studio 2019?
To be able to open winforms projects with .NET Core you have to have the preview version of it. The release version doesn't have support for desktop development in .net core 3.0
You should also enable the preview development with Visual Studio, to do it you should go to
Tools → Options → Projects and Solutions → .NET Core and check Use preview versions of the .NET Core SDK
Or depending on your vs version preview version in could be located in:
Tools → Options → Environment → Use preview versions of the .NET Core SDK

How to open project VS 2015 with VS Code?

I have developed a project (AngularJS, NodeJS, ExpressJS) with Visual Studio 2015 (.sln) in Windows, and want to know how I can open it with Visual Studio Code in iOS.
Thanks!
Visual Studio Code is meant to be a powerful editor and not a full IDE. So, it isn't designed to work with project files (.sln or .csproj).
If you want to use your project created in Windows, then create a .NET Core application. See, more information on the .NET Core.
Also, check out this explanation by Benjamin Pasero.

Will visual studio 2015 projects and solutions be backward compatible with 2013?

Now that Visual Studio 2015 RC is out, has anyone installed it and opened Visual Studio 2013 projects/solutions?
Does it ask the files to be changed?
If yes, are the changes it makes backward compatible?
Take a look at the Porting, Migrating, and Upgrading Visual Studio Projects article for Visual Studio 2015. All of the various caveats are described there.
Not all types of project are supported. I tried the following 4 project types:
Vb.net Class project, OK.
Vb.net Web Services project, OK.
Cordova JS project, not OK, need to migrate manually, by moving the sources from root directory to the www directory and install all API again.
C#.net winform project, OK.
Yes, though you sometimes will have to change the version (single number) in .sln file, no other differences found yet.
We resolved this by typically excluding this file from check in and only check it in when there really was a change (added project, ...) - and then to fix the version before checking in. (Different developer machines with different versions of VS.)
See question Visual Studio 2015 solutions backwards compatibility with Visual Studio 2013 and answer https://stackoverflow.com/a/31540590/586754.
(Assuming you are having basic projects that are supported by both versions, like C# and .net framework that is supported by lower version VS.)

Is it possible to downgrade from Visual Studio 2012 to Visual Studio 2010?

I have a wonderful solution in Visual Studio 2012 with a Web project using WebAPI and a supporting Web Service project for data using Entity Framework (EF) Code First. I was just told I need to see about using Visual Studio 2010.
Is there something I can do to work on this project in Visual Studio 2010?
As Henrick answers: you do not upgrade/downgrade VS installs, rather you install versions side by side.
You note two technologies that might be problematic:
EF Code First: this is supported from 4.1 (or was it 4.2?) which is supported against .NET 4.0 and VS2010. Providing your not using enum or geo/spatial data types (which require .NET 4.5) this should work, but you'll need to ensure you update to the EF5 NuGet package for .NET 4.
WebAPI: This is new in MVC4, which comes with VS2012, but is a separate install for .NET 4/VS2010.
Finally. While some project types with round trip between VS2012 and VS2010 SP1 (you need the service pack) it is not true for all project types. Details are on MSDN.
You can install Visual Studio 2010 separately and open the project and see. There is no danger in having version 2005, 2008, 2010 or 2012 of Visual Studio installed.

Can I open VS 2008 Project in VS 2010 Beta

I was hoping there would an option somewhere that would just let me open my VS 2008 projects and continue working in .Net 3.5 - while using some of the neat new VS UI enhancements.
Yes, Visual Studio 2010 allows you to target previous versions of the CLR/.NET framework at the project level.
When you open the Visual Studio 2008 project file in Visual Studio 2010 it will convert the project file for you. Once this is done, it will be smart enough to target the proper framework and runtime version for you (.NET 3.5 and CLR 2). If it doesn't, you can change this yourself on the property sheet for the project.

Resources