GetBinaryReferences() public method

Returns all binary references from current project.
public GetBinaryReferences ( ) : List
return List
Ejemplo n.º 1
0
		private void UpdateReferenceVersions(ProjectDocument project)
		{
			Console.Write("Updating reference versions... ");

			foreach (var reference in project.GetBinaryReferences())
			{
				// skip assemblies from GAC
				if (reference.IsGlobal)
					continue;

				// skip remote packages
				if (!m_checker.IsLocal(reference.Name))
					continue;

				// skip static packages
				if (m_checker.IsStatic(reference.Name))
					continue;

				// package should be pinned to its current version
				if (m_checker.IsPinnedToCurrentVersion(reference.Name))
					continue;

				// get version to use for local package
				var versionToUse = m_checker.VersionToUse(reference.Name);

				// update is not required
				if (versionToUse.Normalize() == reference.Version.Normalize())
					continue;

				// update package version within project file
				reference.UpdateVersion(versionToUse);
			}

			Console.WriteLine("OK");
		}