Consume (TobySmithGameDev) Mac OS

broken image


Consume

Nov 20, 2020 Mac OS X tries to automatically remove temporary files, but a dedicated application will likely find more files to clean up. Cleaning temporary files won't necessarily speed up your Mac, but it will free up some of that precious disk space. Apr 26, 2021 If your Mac is using an earlier version of any Mac operating system, you should install the latest Apple software updates, which can include important security updates and updates for the apps that are installed by macOS, such as Safari, Books, Messages, Mail, Music, Calendar, and Photos.

-->

NuGet's behavior is driven by the accumulated settings in one or more NuGet.Config (XML) files that can exist at project-, user-, and computer-wide levels. A global NuGetDefaults.Config file also specifically configures package sources. Settings apply to all commands issued in the CLI, the Package Manager Console, and the Package Manager UI.

Config file locations and uses

ScopeNuGet.Config file locationDescription
SolutionCurrent folder (aka Solution folder) or any folder up to the drive root.In a solution folder, settings apply to all projects in subfolders. Note that if a config file is placed in a project folder, it has no effect on that project.
UserWindows:%appdata%NuGetNuGet.Config
Mac/Linux:~/.config/NuGet/NuGet.Config or ~/.nuget/NuGet/NuGet.Config (varies by OS distribution)
Additional configs are supported on all platforms. These configs cannot be edited by the tooling.
Windows:%appdata%NuGetconfig*.Config
Mac/Linux:~/.config/NuGet/config/*.config or ~/.nuget/config/*.config
Settings apply to all operations, but are overridden by any project-level settings.
ComputerWindows:%ProgramFiles(x86)%NuGetConfig
Mac/Linux:$XDG_DATA_HOME. If $XDG_DATA_HOME is null or empty, ~/.local/share or /usr/local/share will be used (varies by OS distribution)
Settings apply to all operations on the computer, but are overridden by any user- or project-level settings.

Notes for earlier versions of NuGet: Slicesanke mac os.

  • NuGet 3.3 and earlier used a .nuget folder for solution-wide settings. This folder is not used in NuGet 3.4+.
  • For NuGet 2.6 to 3.x, the computer-level config file on Windows was located in %ProgramData%NuGetConfig[{IDE}[{Version}[{SKU}]]]NuGet.Config, where {IDE} can be VisualStudio, {Version} was the Visual Studio version such as 14.0, and {SKU} is either Community, Pro, or Enterprise. To migrate settings to NuGet 4.0+, simply copy the config file to %ProgramFiles(x86)%NuGetConfig. On Linux, this previous location was /etc/opt, and on Mac, /Library/Application Support.

Changing config settings

A NuGet.Config file is a simple XML text file containing key/value pairs as described in the NuGet Configuration Settings topic.

Settings are managed using the NuGet CLI config command:

  • By default, changes are made to the user-level config file.
  • To change settings in a different file, use the -configFile switch. In this case files can use any filename.
  • Keys are always case sensitive.
  • Elevation is required to change settings in the computer-level settings file.

Warning

Although you can modify the file in any text editor, NuGet (v3.4.3 and later) silently ignores the entire configuration file if it contains malformed XML (mismatched tags, invalid quotation marks, etc.). This is why it's preferable to manage setting using nuget config.

Setting a value

Windows:

Mac/Linux:

Note

In NuGet 3.4 and later you can use environment variables in any value, as in repositoryPath=%PACKAGEHOME% (Windows) and repositoryPath=$PACKAGEHOME (Mac/Linux).

Removing a value

To remove a value, specify a key with an empty value.

Creating a new config file

Copy the template below into the new file and then use nuget config -configFile to set values:

How settings are applied

Multiple NuGet.Config files allow you to store settings in different locations so that they apply to a single project, a group of projects, or all projects. These settings collectively apply to any NuGet operation invoked from the command line or from Visual Studio, with settings that exist 'closest' to a project or the current folder taking precedence.

Specifically, NuGet loads settings from the different config files in the following order:

  1. The NuGetDefaults.Config file, which contains settings related only to package sources.
  2. The computer-level file.
  3. The user-level file.
  4. The file specified with -configFile.
  5. Files found in every folder in the path from the drive root to the current folder (where nuget.exe is invoked or the folder containing the Visual Studio project). For example, if a command is invoked in c:ABC, NuGet looks for and loads config files in c:, then c:A, then c:AB, and finally c:ABC.

As NuGet finds settings in these files, they are applied as follows: Spaec gaem mac os.

  1. For single-item elements, NuGet replaced any previously-found value for the same key. This means that settings that are 'closest' to the current folder or project override any others found earlier. For example, the defaultPushSource setting in NuGetDefaults.Config is overridden if it exists in any other config file.
  2. For collection elements (such as ), NuGet combines the values from all configuration files into a single collection.
  3. When is present for a given node, NuGet ignores previously defined configuration values for that node.

Settings walkthrough

Let's say you have the following folder structure on two separate drives:

The tops dont sting you! mac os. You then have four NuGet.Config files in the following locations with the given content. (The computer-level file is not included in this example, but would behave similarly to the user-level file.)

File A. User-level file, (%appdata%NuGetNuGet.Config on Windows, ~/.config/NuGet/NuGet.Config on Mac/Linux):

File B. disk_drive_2/NuGet.Config:

Consume (tobysmithgamedev) Mac Os 11

File C. disk_drive_2/Project1/NuGet.Config:

File D. disk_drive_2/Project2/NuGet.Config:

NuGet then loads and applies settings as follows, depending on where it's invoked:

What Version Of MacOS Can My Mac Run? - Macworld UK

  • Invoked from disk_drive_1/users: Only the default repository listed in the user-level configuration file (A) is used, because that's the only file found on disk_drive_1.

  • Invoked from disk_drive_2/ or disk_drive_/tmp: The user-level file (A) is loaded first, then NuGet goes to the root of disk_drive_2 and finds file (B). NuGet also looks for a configuration file in /tmp but does not find one. As a result, the default repository on nuget.org is used, package restore is enabled, and packages get expanded in disk_drive_2/tmp.

  • Invoked from disk_drive_2/Project1 or disk_drive_2/Project1/Source: The user-level file (A) is loaded first, then NuGet loads file (B) from the root of disk_drive_2, followed by file (C). Settings in (C) override those in (B) and (A), so the repositoryPath where packages get installed is disk_drive_2/Project1/External/Packages instead of disk_drive_2/tmp. Also, because (C) clears , nuget.org is no longer available as a source leaving only https://MyPrivateRepo/ES/nuget.

  • Invoked from disk_drive_2/Project2 or disk_drive_2/Project2/Source: The user-level file (A) is loaded first followed by file (B) and file (D). Because packageSources is not cleared, both nuget.org and https://MyPrivateRepo/DQ/nuget are available as sources. Packages get expanded in disk_drive_2/tmp as specified in (B).

Additional user wide configuration

Starting with 5.7, NuGet has added support for additional user wide configuration files. This allows third-party vendors to add additional user configuration files without elevation.These configuration files are found in the standard user wide configuration folder within a config subfolder.All files ending with .config or .Config will be considered.These files cannot be edited by the standard tooling.

OS PlatformAdditional Configurations
Windows%appdata%NuGetconfig*.Config
Mac/Linux~/.config/NuGet/config/*.config or ~/.nuget/config/*.config

NuGet defaults file

The NuGetDefaults.Config file exists to specify package sources from which packages are installed and updated, and to control the default target for publishing packages with nuget push. Because administrators can conveniently (using Group Policy, for example) deploy consistent NuGetDefaults.Config files to developer and build machines, they can ensure that everyone in the organization is using the correct package sources rather than nuget.org.

Important

The NuGetDefaults.Config file never causes a package source to be removed from a developer's NuGet configuration. That means if the developer has already used NuGet and therefore has the nuget.org package source registered, it won't be removed after the creation of a NuGetDefaults.Config file.

Furthermore, neither NuGetDefaults.Config nor any other mechanism in NuGet can prevent access to package sources like nuget.org. If an organization wishes to block such access, it must use other means such as firewalls to do so.

Consume (TobySmithGameDev) Mac OS

Nov 20, 2020 Mac OS X tries to automatically remove temporary files, but a dedicated application will likely find more files to clean up. Cleaning temporary files won't necessarily speed up your Mac, but it will free up some of that precious disk space. Apr 26, 2021 If your Mac is using an earlier version of any Mac operating system, you should install the latest Apple software updates, which can include important security updates and updates for the apps that are installed by macOS, such as Safari, Books, Messages, Mail, Music, Calendar, and Photos.

-->

NuGet's behavior is driven by the accumulated settings in one or more NuGet.Config (XML) files that can exist at project-, user-, and computer-wide levels. A global NuGetDefaults.Config file also specifically configures package sources. Settings apply to all commands issued in the CLI, the Package Manager Console, and the Package Manager UI.

Config file locations and uses

ScopeNuGet.Config file locationDescription
SolutionCurrent folder (aka Solution folder) or any folder up to the drive root.In a solution folder, settings apply to all projects in subfolders. Note that if a config file is placed in a project folder, it has no effect on that project.
UserWindows:%appdata%NuGetNuGet.Config
Mac/Linux:~/.config/NuGet/NuGet.Config or ~/.nuget/NuGet/NuGet.Config (varies by OS distribution)
Additional configs are supported on all platforms. These configs cannot be edited by the tooling.
Windows:%appdata%NuGetconfig*.Config
Mac/Linux:~/.config/NuGet/config/*.config or ~/.nuget/config/*.config
Settings apply to all operations, but are overridden by any project-level settings.
ComputerWindows:%ProgramFiles(x86)%NuGetConfig
Mac/Linux:$XDG_DATA_HOME. If $XDG_DATA_HOME is null or empty, ~/.local/share or /usr/local/share will be used (varies by OS distribution)
Settings apply to all operations on the computer, but are overridden by any user- or project-level settings.

Notes for earlier versions of NuGet: Slicesanke mac os.

  • NuGet 3.3 and earlier used a .nuget folder for solution-wide settings. This folder is not used in NuGet 3.4+.
  • For NuGet 2.6 to 3.x, the computer-level config file on Windows was located in %ProgramData%NuGetConfig[{IDE}[{Version}[{SKU}]]]NuGet.Config, where {IDE} can be VisualStudio, {Version} was the Visual Studio version such as 14.0, and {SKU} is either Community, Pro, or Enterprise. To migrate settings to NuGet 4.0+, simply copy the config file to %ProgramFiles(x86)%NuGetConfig. On Linux, this previous location was /etc/opt, and on Mac, /Library/Application Support.

Changing config settings

A NuGet.Config file is a simple XML text file containing key/value pairs as described in the NuGet Configuration Settings topic.

Settings are managed using the NuGet CLI config command:

  • By default, changes are made to the user-level config file.
  • To change settings in a different file, use the -configFile switch. In this case files can use any filename.
  • Keys are always case sensitive.
  • Elevation is required to change settings in the computer-level settings file.

Warning

Although you can modify the file in any text editor, NuGet (v3.4.3 and later) silently ignores the entire configuration file if it contains malformed XML (mismatched tags, invalid quotation marks, etc.). This is why it's preferable to manage setting using nuget config.

Setting a value

Windows:

Mac/Linux:

Note

In NuGet 3.4 and later you can use environment variables in any value, as in repositoryPath=%PACKAGEHOME% (Windows) and repositoryPath=$PACKAGEHOME (Mac/Linux).

Removing a value

To remove a value, specify a key with an empty value.

Creating a new config file

Copy the template below into the new file and then use nuget config -configFile to set values:

How settings are applied

Multiple NuGet.Config files allow you to store settings in different locations so that they apply to a single project, a group of projects, or all projects. These settings collectively apply to any NuGet operation invoked from the command line or from Visual Studio, with settings that exist 'closest' to a project or the current folder taking precedence.

Specifically, NuGet loads settings from the different config files in the following order:

  1. The NuGetDefaults.Config file, which contains settings related only to package sources.
  2. The computer-level file.
  3. The user-level file.
  4. The file specified with -configFile.
  5. Files found in every folder in the path from the drive root to the current folder (where nuget.exe is invoked or the folder containing the Visual Studio project). For example, if a command is invoked in c:ABC, NuGet looks for and loads config files in c:, then c:A, then c:AB, and finally c:ABC.

As NuGet finds settings in these files, they are applied as follows: Spaec gaem mac os.

  1. For single-item elements, NuGet replaced any previously-found value for the same key. This means that settings that are 'closest' to the current folder or project override any others found earlier. For example, the defaultPushSource setting in NuGetDefaults.Config is overridden if it exists in any other config file.
  2. For collection elements (such as ), NuGet combines the values from all configuration files into a single collection.
  3. When is present for a given node, NuGet ignores previously defined configuration values for that node.

Settings walkthrough

Let's say you have the following folder structure on two separate drives:

The tops dont sting you! mac os. You then have four NuGet.Config files in the following locations with the given content. (The computer-level file is not included in this example, but would behave similarly to the user-level file.)

File A. User-level file, (%appdata%NuGetNuGet.Config on Windows, ~/.config/NuGet/NuGet.Config on Mac/Linux):

File B. disk_drive_2/NuGet.Config:

Consume (tobysmithgamedev) Mac Os 11

File C. disk_drive_2/Project1/NuGet.Config:

File D. disk_drive_2/Project2/NuGet.Config:

NuGet then loads and applies settings as follows, depending on where it's invoked:

What Version Of MacOS Can My Mac Run? - Macworld UK

  • Invoked from disk_drive_1/users: Only the default repository listed in the user-level configuration file (A) is used, because that's the only file found on disk_drive_1.

  • Invoked from disk_drive_2/ or disk_drive_/tmp: The user-level file (A) is loaded first, then NuGet goes to the root of disk_drive_2 and finds file (B). NuGet also looks for a configuration file in /tmp but does not find one. As a result, the default repository on nuget.org is used, package restore is enabled, and packages get expanded in disk_drive_2/tmp.

  • Invoked from disk_drive_2/Project1 or disk_drive_2/Project1/Source: The user-level file (A) is loaded first, then NuGet loads file (B) from the root of disk_drive_2, followed by file (C). Settings in (C) override those in (B) and (A), so the repositoryPath where packages get installed is disk_drive_2/Project1/External/Packages instead of disk_drive_2/tmp. Also, because (C) clears , nuget.org is no longer available as a source leaving only https://MyPrivateRepo/ES/nuget.

  • Invoked from disk_drive_2/Project2 or disk_drive_2/Project2/Source: The user-level file (A) is loaded first followed by file (B) and file (D). Because packageSources is not cleared, both nuget.org and https://MyPrivateRepo/DQ/nuget are available as sources. Packages get expanded in disk_drive_2/tmp as specified in (B).

Additional user wide configuration

Starting with 5.7, NuGet has added support for additional user wide configuration files. This allows third-party vendors to add additional user configuration files without elevation.These configuration files are found in the standard user wide configuration folder within a config subfolder.All files ending with .config or .Config will be considered.These files cannot be edited by the standard tooling.

OS PlatformAdditional Configurations
Windows%appdata%NuGetconfig*.Config
Mac/Linux~/.config/NuGet/config/*.config or ~/.nuget/config/*.config

NuGet defaults file

The NuGetDefaults.Config file exists to specify package sources from which packages are installed and updated, and to control the default target for publishing packages with nuget push. Because administrators can conveniently (using Group Policy, for example) deploy consistent NuGetDefaults.Config files to developer and build machines, they can ensure that everyone in the organization is using the correct package sources rather than nuget.org.

Important

The NuGetDefaults.Config file never causes a package source to be removed from a developer's NuGet configuration. That means if the developer has already used NuGet and therefore has the nuget.org package source registered, it won't be removed after the creation of a NuGetDefaults.Config file.

Furthermore, neither NuGetDefaults.Config nor any other mechanism in NuGet can prevent access to package sources like nuget.org. If an organization wishes to block such access, it must use other means such as firewalls to do so.

NuGetDefaults.Config location

The following table describes where the NuGetDefaults.Config file should be stored, depending on the target OS:

OS PlatformNuGetDefaults.Config Location
WindowsVisual Studio 2017 or NuGet 4.x+:%ProgramFiles(x86)%NuGetConfig
Visual Studio 2015 and earlier or NuGet 3.x and earlier:%PROGRAMDATA%NuGet
Mac/Linux$XDG_DATA_HOME (typically ~/.local/share or /usr/local/share, depending on OS distribution)

NuGetDefaults.Config settings

  • packageSources: this collection has the same meaning as packageSources in regular config files and specifies the default sources. NuGet uses the sources in order when installing or updating packages in projects using the packages.config management format. For projects using the PackageReference format, NuGet uses local sources first, then sources on network shares, then HTTP sources, regardless of the order in the configuration files. NuGet always ignores the order of sources with restore operations.

  • disabledPackageSources: this collection also has the same meaning as in NuGet.Config files, where each affected source is listed by its name and a true/false value indicating whether it's disabled. This allows the source name and URL to remain in packageSources without having it turned on by default. Individual developers can then re-enable the source by setting the source's value to false in other NuGet.Config files without having to find the correct URL again. This is also useful to supply developers with a full list of internal source URLs for an organization while enabling only an individual team's source by default.

  • defaultPushSource: specifies the default target for nuget push operations, overriding the built-in default of nuget.org. Administrators can deploy this setting to avoid publishing internal packages to the public nuget.org by accident, as developers specifically need to use nuget push -Source to publish to nuget.org.

Example NuGetDefaults.Config and application

Symptoms

Symptoms such as these could mean that a device connected to the USB-A , USB-C , or Thunderbolt 3 (USB-C) port on your Mac isn't getting enough power:

  • A message says that the device needs more power, the operation can't be completed, or USB devices are disabled until you unplug the device using too much power.
  • An operation that requires more power doesn't work. For example, writing to disk requires more power than reading from it.
  • The device doesn't turn on or isn't recognized by your Mac.

Solutions

  • Use your device as a self-powered device or connect it to a powered USB or Thunderbolt 3 (USB-C) hub if possible.
    Self-powered devices get power from an electrical outlet or their own battery. Bus-powered devices get power from the device they're plugged into, such as your Mac.
  • Reduce the total amount of power needed from your Mac by reducing the number of bus-powered devices connected to your Mac, or using more of them as self-powered devices.
  • If your device is plugged into another device (such as a display or multiport adapter) as part of a chain of devices, the other device might not be providing enough power or passing through enough power from your Mac. Plug your device directly into your Mac instead.
  • Make sure that the port on your Mac and the cable you're using to connect it to your device both support the same or later USB specification as your device. For example, a device designed to support the USB 3 specification might not get enough power when plugged into a USB 2 port or cable.
  • Try a different cable, in case the cable that you're using is damaged or defective. If you're using an adapter with your cable, the adapter could also be damaged or defective.
  • If your Mac has multiple Thunderbolt 3 ports, connect your device to a Thunderbolt 3 port farthest away from the current port. For example, if your device is connected to the ports on the left side of MacBook Pro, connect to the Thunderbolt 3 ports on the right side.
  • If your device has software (such as drivers or firmware) that can be updated, make sure that it's using the latest software from the manufacturer. To get firmware updates for Apple accessories, update your Apple software.
  • Make sure that your Mac is awake and started up from the Mac operating system. Some Apple devices can request extra power only when your Mac is awake or started up from macOS.

Learn more about USB power on your Mac

System Information provides additional detail about USB power on your Mac. Connect the USB device directly to your Mac, then select USB from the sidebar in System Information. For each USB device, System Information shows:

  • Current Available: The default power provided by the port to which your device is connected.
  • Current Required: The power needed by your device.
  • Extra Operating Current: Mac computers and Apple displays introduced after 2006, when directly connected to certain Apple devices such as iPhone or iPad, can provide extra power over one or more ports. The Mac or display must be powered on and awake to provide this extra power. A Mac started from the Windows operating system doesn't provide extra power.

Learn more about the power available under each USB specification, such as USB 2 and USB 3.





broken image