This question already has an answer here:
What's the difference between using dotnet and MSBuild for building .NET applications?
(1 answer)
Closed 13 days ago.
When have I to use one or the other one?
I think that for net framework projects I’ve to use msbuild and for .net projects the dot net build but I don’t why
The article of dotnet build says:
dotnet build uses MSBuild to build the project
So you needn't worry about the choice, MSBuild is the end of everything. You can use dotnet build to build a .Net Framework project.
For the word MsBuild I suppose you mean MSBuild for .Net Framework, it can't build .Net/.Net Core projects.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
I've installed multiple .NET SDKs from Microsoft site. They do not appear in Visual Studio when I want to change it. How do I fix this?
I've downloaded SDKs, Nugets, and nothing. I want to be able to use .net 7+ on a C# project.
Your project is a .NET Framework project (the "older" dot net). You'll not be able to select dotnet 5+ directly in the visual studio project's properties as dotnet net 5+ is the evolution of the dotnet core branch. Those versions will not appear at all.
You can create a new dotnet core project and import your code (and adapt if necessary), or use the tool microsoft released to "upgrade" a .NET Framework project to dotnet core one. (https://dotnet.microsoft.com/en-us/platform/upgrade-assistant)
You'll then be able to select any dotnet core framework you want (ie 7.0)
If your project is targeting .Net framework 4.8, you can't simply upgrade to .Net 7 by selecting from a list,
You need to migrate your project to .Net 7,
A very useful tool is the .Net upgrade assistant provided by Microsoft.
You can find it here:
https://dotnet.microsoft.com/en-us/platform/upgrade-assistant/tutorial/install-sdk
and follow the step-by-step instructions in that page to complete your migration.
Try installing everything related to .NET using the Visual Studio Installer - https://visualstudio.microsoft.com/downloads
In order to be able to create .NET 7 application, you will need to select ".NET 7 Runtime" under the "Individual components" section.
After the installation, you should be able to select ".NET 7" as your application Framework.
This question already has answers here:
What's the difference between .NET Core, .NET Framework, and Xamarin?
(11 answers)
Closed 4 years ago.
I have navigate to https://www.microsoft.com/net/download/windows
to download .net core SDK , then i saw there is 3 build apps
.Net Core
Visual Studio
.NET Framework Develop Pack
Can anyone explain what is the difference between 1st one and 3rd one ?
The first is .NET Core which is a smaller subset of the .NET framework. .NET Core was largely for web apps and web workers, but it was announced yesterday that soon .NET Core will support desktop applications as well. Not all assemblies are available in Core, but it has a smaller package size and will run on any platform.
.NET Framework is the one people usually refer to when they say ".NET", which is the full-featured framework that is used to build VB.NET and C# applications.
A great read about the difference in use for server applications (which is where the real details lie) can be found here.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
If you write a C# or F# program that runs on .NET Core, will the same bytecode also run on .NET (with no .NET Core installed)?
I have heard that reflection works differently, but it's not clear to me if those differences are part of the API.
In .NET Core 1.0 there are new possibilities like being able to run your app on top of the .NET Core Platform or on top of the traditional .NET Framework 4.5.x. Environment setup depends on type of application (portable or self-contained app) and target frameworks.
From .NET Core Application Deployment documentation:
You can deploy your .NET Core app in either of two ways:
As a portable app. A portable app relies on a shared system-wide
version of .NET Core to be present on the target system. Because .NET
Core is already present, your app is portable between installations of
.NET Core. Your app contains only its own code and any third-party
dependencies that are outside of the .NET Core libraries. Portable
applications are .dll files that can be launched by using the dotnet
utility from the command line. For example, dotnet app.dll runs a
portable application named app.
As a self-contained application. Unlike a portable app, a
self-contained app does not rely on any shared components to be
present on the target system. All components, including both .NET Core
libraries and the .NET Core runtime, are included with the application
and are isolated from other .NET Core applications. Self-contained
applications include an executable (such as app.exe on Windows
platforms for a self-contained application named app), which is a
renamed version of the platform-specific .NET Core host, and a .dll
file (such as app.dll), which is the actual application.
Regarding frameworks specifying (read more here)
The “framework” section in project.json specifies the framework or
list of frameworks supported by your app.
The “imports” section in
project.json is a way to use packages/libraries that are not based on
the same version than your target Core platform version, such as
“dnxcore” and portable-* libs, as shown below in one of the examples.
It is important to use “imports” only for versions of .NET Core and
PCL (Portable Class Libraries). Using it with TFMS from the
traditional .NET Framework can cause issues or malfunction.
When supporting multiple frameworks in your app, you can selectively run
your app on top of one or the other framework by selecting that
default framework from Visual Studio or from the command line (as
explained below).
This question already has answers here:
Configuring .NET Framework 4.5.2 in IIS 8.0
(2 answers)
Closed 7 years ago.
I have an old website, it is not web application so there is no properties window to target the .NET Framework to 4.5.2, how do I modify the web.config to target .NET Framework 4.5.2?
I need to know that it uses .NET 4.5.2 because I want to test whether the application is compatible with it before deploying to production
Right click on the web project and select the Application tab on the left. There is an option for Target Framework: It will probably be set to 4.5 or 4.5.1. Change it to 4.5.2 and repeat for any other projects in the solution.
This question already has an answer here:
Version Information on ASP.NET Server Error Page
(1 answer)
Closed 7 years ago.
I am implementing an MVC 5 website in C# (VS 2013 update 4) and the build setting is targeting .NET framework version 4.5. However when I load the page, I see the following header entry:
X-AspNet-Version:4.0.30319
Why is the website running under .NET 4.0xxxx despite the compile setting is pointing to .NET 4.5? Any ideas?
Thanks in advance.
That is not the actual .NET framework version. It is the version of the CLR.
From .NET 4 up to 4.5.2 it is version 4. Between 2.0 and 3.5 it was version 2.0.
That is also the reason that in your application pool configuration you can only choose .NET 2 or 4.
See MSDN: .NET Framework Versions and Dependencies on this matter.
https://stackoverflow.com/a/25632090/511418