Home > Software engineering >  Is it possible to use dotnet new to create an ASP.NET Web Application Empty .Net Framework 4.7.2 pro
Is it possible to use dotnet new to create an ASP.NET Web Application Empty .Net Framework 4.7.2 pro

Time:10-21

I've been trying to find a way to create a ASP.NET Web Application with .Net Framework v4.7.2 using dotnet new. But so far I couldn't find anything.

I checked dotnet new -l and it isn't on the list. So I tried several things.

Using:

dotnet new web --framework net472 -n ProjectName

It doesn't work and gives:

Error: Invalid parameter(s):
--framework net472
    'net472' is not a valid value for --framework (Framework).

Used:

dotnet new web --target-framework-override net472 -n ProjectName

It just goes to default and creates a ASP.NET Core project.

Is it actually possible?

CodePudding user response:

You can create It With Visual Studio anyway. But dotnet, right now, no and why?

CodePudding user response:

I am not sure I graps the question here?

If you use .net 4, then you using .net 4.

If you decide to upgrade and use a later version say like .net 4.5, then you now using and adopting .net 4.5

Now, over 18 years, they added feature after feature, and have hacked and chopped up the .net framework to death. So, they decided to build a new .net version. One that "massive" reduced the dependences on the windows platform. and they removed all the warts, bad things, and almost started over.

For the most part, quite much near everything works the same. However key concept here is that the .net core runtime is really much the same idea and concept of upgrading from a older version to a newer version. And in 99% of cases, you not even notice ANY difference in your code.

Of course there is no such thing as a .net 4.5 framework as .net core 4.5. It is simply a newer and more cleaned up .net runtime system. As noted, it also much more platform neutral.

So you can for example, create a brand new web site as say .net 4.7, or you can create a brand new web site project using .net core At that point, you will quite much notice ZERO difference between the two. (you be restricted to MVC projects, as no support for .net core web forms exist). And quite sure that you can't choose vb.net for .net core.

So all .net core is really? A newer and fresher version of the .net framework. You for the most part notice much difference when choosing that option.

So there is no such idea of creating a 4.0, or 4.72 application that is based on .net core. If you create a project using .net core, then you using the .net core "versions" such as 3.0, or now 5.0, and I think 6.0 is already out.

So, just think of .net core as a newer version and release of the .net framework, nothing more, nothing less.

However, if you wanting to create a new web site in .net 4.7? Sure, that option should show up in Visual Studio when you create a new project. Just ensure that version of .net is installed on your computer, and you should have/be given that option when creating a new site. eg:

enter image description here

So you are and should be free to create a project using quite much any version of .net.

However, if you going to create a .net core application, then you get a list of ONLY .net core versions - rather again, similar to above.

eg: enter image description here

So, really again, the new .net core is JUST a newer series of runtimes for development. And thus, if you create a .net core project, then obvious you ONLY going to get .net core versions to choose from, just like you did when creating a .net framework project, and again, you get a choices of what runtime to use.

However, no, I don't believe that the .net core system can create a .net framework application, and it would not make sense if it could.

  • Related