question

ANUPRIYAB-0355 avatar image
0 Votes"
ANUPRIYAB-0355 asked Bruce-SqlWork answered

Why can't I change directory path of dotnet core sdk from C drive to S drive?

After a long try, I installed the dotnet core on my computer. But the location PATH in the environment automatically stores the installed data of the dotnet core in the C drive. I want to change the directory path to S drive. How can I change the directory path from C to S drive?

dotnet-runtimedotnet-clidotnet-ad
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


To install .NET to a custom location, try uninstalling the current version, then use Windows Installer, specifying the command-line variables:

0 Votes 0 ·
cooldadtx avatar image
0 Votes"
cooldadtx answered

You can't. The SDKs are installed to a shared location on the system drive. There is no reason to move them.

Even if you did then it would likely break stuff. Refer to this doc that discusses some of the ramifications of trying to use a directory other than the default. It isn't worth the effort in most cases.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

Because all installations of dotnet runtimes and sdk must be under the same folder, the very first install controls the folder location. To change folder, you must completely uninstall dotnet, and specify the folder on the install of first version. Also 3.1 was the first to allow specification of the folder, see install docs.

It might be easier with a clean o/s install.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.