C# C# Basics C# Syntax The .NET Framework

Why Would We Need/Want to Use the Downloaded .NET Framework Over the Self-Contained .NET Framework?

The instructor in the .NET Framework video mentioned that you can either have a self-contained .NET framework program that can run as an executable or have your users install the .NET Framework, but it's smaller. I don't understand what's "smaller" about the self-install and when you'd ever find it advantageous to have your users download the .NET Framework to run your program. This seems very user-unfriendly.

Dan B
Dan B
5,750 Points

Well it depends. Are you a developer creating many different programs in the dotnet framework? Or are you expecting that your users will run only a single program or you wish to compile and run only a single program on your own?

The inbuilt workspace that we have is great for all of the things the course will teach us, however you may have noticed it's not particularly fast and it doesn't have remotely any frills. Start trying to do anything complicated and you'll quickly find that you're going to outgrow its capabilities.

For those of us who are serious about learning C# it's important to download the framework.

For those who just want to run a program that we've made in C# that requires some parts of the framework, then they can just use the self-contained framework we've packaged with our programs.

Maybe you weren't using Windows a few years ago, but after installing Windows XP, 7, 8 and even the first versions of 10. One of the most common problems you would get if you hadn't updated Windows after installing it, was that you needed to install the .NET framework before you were able to run a whole host of software applications that you might want to use. This is no longer necessary and means a lot of time and stress is saved.

2 Answers

Ryan Brooks
Ryan Brooks
2,509 Points

In my personal experience, I've encountered this mostly with games. Some games require you to download a specific version of .NET. Some just run on their own.

The best example of why you'd want to use the framework-dependent deployment is for users that have multiple programs on their machine that require .NET. If a user only has one program on their machine that requires .NET, then there's really no meaningful difference between the 2 approaches for deployment. However, if a user has multiple programs that are dependent on .NET and each one of these programs has its own self-contained executable, there is unnecessary redundancy. It requires more storage space on the user's machine because they now have multiple programs each with their own instance of the .NET runtime, rather than just having a single installation of .NET that could support all of those programs.