Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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
6,155 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

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.