Warn if build accelerated without reference assemblies
Build acceleration relies heavily upon the presence of reference assemblies. If a referenced project does not produce a reference assembly, we will be unable to accelerate the case where that referenced project had a private (non public-API) change. This change introduces a log message when we detect this scenario, directing the user to consider a change that would improve their incremental build performance.
This commit is contained in:
Родитель
f4b1ff6c0e
Коммит
0fe07b6e9f
|
@ -100,6 +100,12 @@ Looking through the build output with the following points in mind:
|
|||
|
||||
Then any project that references the indicated project (directy or transitively) cannot be accelerated. This can happen if the mentioned project uses the legacy `.csproj` format, or for any other project system within Visual Studio that doesn't support build acceleration. Currently only .NET SDK-style projects (loaded with the project system from this GitHub repository) provide the needed data.
|
||||
|
||||
- ⛔ If you see:
|
||||
|
||||
> This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'.
|
||||
|
||||
Then build acceleration will not know whether it is safe to copy a modified output DLL from a referenced project or not. We rely on the use of reference assemblies to convey this information. To address this, ensure all referenced projects have the `ProduceReferenceAssembly` property set to `true`. You may like to add this to your `Directory.Build.props` file alongside the `AccelerateBuildsInVisualStudio` property. Note that projects targeting `net5.0` or later produce reference assemblies by default. Projects that target .NET Standard may require this to be specified manually (see https://github.com/dotnet/project-system/issues/8865).
|
||||
|
||||
- 🗒️ TODO Add validation and output message when reference assemblies are not enabled (https://github.com/dotnet/project-system/issues/8798)
|
||||
|
||||
- ✅ You should see a section listing items to copy:
|
||||
|
|
|
@ -164,6 +164,9 @@
|
|||
<StringProperty Name="Platform"
|
||||
Visible="False" />
|
||||
|
||||
<StringProperty Name="ProduceReferenceAssembly"
|
||||
Visible="False" />
|
||||
|
||||
<StringProperty Name="ProjectAssetsFile"
|
||||
ReadOnly="true"
|
||||
Visible="False" />
|
||||
|
|
|
@ -57,6 +57,16 @@ internal sealed partial class BuildUpToDateCheck
|
|||
/// </remarks>
|
||||
public bool? IsAccelerationEnabled { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether all referenced projects produce reference assemblies or not.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Build acceleration works best when all referenced projects produce reference assemblies.
|
||||
/// This flag allows us to prompt the user when they have enabled build acceleration, but
|
||||
/// they are referencing projects that do not produce reference assemblies.
|
||||
/// </remarks>
|
||||
public bool AllReferencesProduceReferenceAssemblies { get; internal set; } = true;
|
||||
|
||||
public BuildAccelerationResult AccelerationResult
|
||||
{
|
||||
get
|
||||
|
@ -187,7 +197,7 @@ internal sealed partial class BuildUpToDateCheck
|
|||
private readonly FileSystemOperationAggregator _parent;
|
||||
private readonly bool? _isBuildAccelerationEnabled;
|
||||
|
||||
public ConfiguredFileSystemOperationAggregator(FileSystemOperationAggregator parent, bool? isBuildAccelerationEnabled)
|
||||
public ConfiguredFileSystemOperationAggregator(FileSystemOperationAggregator parent, bool? isBuildAccelerationEnabled, bool referencesProduceReferenceAssemblies)
|
||||
{
|
||||
_parent = parent;
|
||||
_isBuildAccelerationEnabled = isBuildAccelerationEnabled;
|
||||
|
@ -202,6 +212,11 @@ internal sealed partial class BuildUpToDateCheck
|
|||
// Note an explicit disable
|
||||
_parent.IsAccelerationEnabled = false;
|
||||
}
|
||||
|
||||
if (referencesProduceReferenceAssemblies is false)
|
||||
{
|
||||
_parent.AllReferencesProduceReferenceAssemblies = false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool AddCopy(string source, string destination)
|
||||
|
|
|
@ -1054,11 +1054,12 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
// We may have an incomplete set of copy items.
|
||||
// We check timestamps of whatever items we can find, but only perform acceleration when the full set is available.
|
||||
(IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> copyItemsByProject, bool isCopyItemsComplete) = _copyItemAggregator.TryGatherCopyItemsForProject(implicitState.ProjectTargetPath, logger);
|
||||
(IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> copyItemsByProject, bool isCopyItemsComplete, bool allReferencesProduceReferenceAssemblies)
|
||||
= _copyItemAggregator.TryGatherCopyItemsForProject(implicitState.ProjectTargetPath, logger);
|
||||
|
||||
bool? isBuildAccelerationEnabled = IsBuildAccelerationEnabled(isCopyItemsComplete, implicitState);
|
||||
|
||||
var configuredFileSystemOperations = new ConfiguredFileSystemOperationAggregator(fileSystemOperations, isBuildAccelerationEnabled);
|
||||
var configuredFileSystemOperations = new ConfiguredFileSystemOperationAggregator(fileSystemOperations, isBuildAccelerationEnabled, allReferencesProduceReferenceAssemblies);
|
||||
|
||||
string outputFullPath = Path.Combine(implicitState.MSBuildProjectDirectory, implicitState.OutputRelativeOrFullPath);
|
||||
|
||||
|
@ -1113,6 +1114,14 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
logger.Minimal(nameof(Resources.FUTD_AccelerationCandidate));
|
||||
}
|
||||
|
||||
if (fileSystemOperations.IsAccelerationEnabled is true && fileSystemOperations.AllReferencesProduceReferenceAssemblies is false)
|
||||
{
|
||||
// This project is configured to use build acceleration, but some of its references do not
|
||||
// produce reference assemblies. Log a message to let the user know that they may be able
|
||||
// to improve their build performance by enabling the production of reference assemblies.
|
||||
logger.Minimal(nameof(Resources.FUTD_NotAllReferencesProduceReferenceAssemblies));
|
||||
}
|
||||
|
||||
logger.Verbose(nameof(Resources.FUTD_Completed), sw.Elapsed.TotalMilliseconds);
|
||||
|
||||
_lastFailureReason = logger.FailureReason;
|
||||
|
|
|
@ -20,7 +20,7 @@ internal class CopyItemAggregator : ICopyItemAggregator
|
|||
}
|
||||
}
|
||||
|
||||
public (IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> ItemsByProject, bool IsComplete) TryGatherCopyItemsForProject(string targetPath, BuildUpToDateCheck.Log logger)
|
||||
public (IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> ItemsByProject, bool IsComplete, bool AllReferencesProduceReferenceAssemblies) TryGatherCopyItemsForProject(string targetPath, BuildUpToDateCheck.Log logger)
|
||||
{
|
||||
// Keep track of all projects we've visited to avoid infinite recursion or duplicated results.
|
||||
HashSet<string> explored = new(StringComparers.Paths);
|
||||
|
@ -38,6 +38,10 @@ internal class CopyItemAggregator : ICopyItemAggregator
|
|||
// results is strictly an improvement over ignoring what results we do have.
|
||||
bool isComplete = true;
|
||||
|
||||
// Whether all referenced projects have ProduceReferenceAssembly set to true. The originating project
|
||||
// is not included in this check (targetPath).
|
||||
bool allReferencesProduceReferenceAssemblies = true;
|
||||
|
||||
List<ProjectCopyData>? contributingProjects = null;
|
||||
|
||||
// We must capture the results at this moment of time within the lock, to prevent corrupting collections.
|
||||
|
@ -60,6 +64,12 @@ internal class CopyItemAggregator : ICopyItemAggregator
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!data.ProduceReferenceAssembly && project != targetPath)
|
||||
{
|
||||
// One of the referenced projects does not produce a reference assembly.
|
||||
allReferencesProduceReferenceAssemblies = false;
|
||||
}
|
||||
|
||||
foreach (string referencedProjectTargetPath in data.ReferencedProjectTargetPaths)
|
||||
{
|
||||
frontier.Enqueue(referencedProjectTargetPath);
|
||||
|
@ -73,7 +83,7 @@ internal class CopyItemAggregator : ICopyItemAggregator
|
|||
}
|
||||
}
|
||||
|
||||
return (GenerateCopyItems(), isComplete);
|
||||
return (GenerateCopyItems(), isComplete, allReferencesProduceReferenceAssemblies);
|
||||
|
||||
IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> GenerateCopyItems()
|
||||
{
|
||||
|
|
|
@ -30,9 +30,10 @@ internal interface ICopyItemAggregator
|
|||
/// <list type="number">
|
||||
/// <item><c>Items</c> a sequence of items by project, that are reachable from the current project.</item>
|
||||
/// <item><c>IsComplete</c> indicating whether we have items from all reachable projects.</item>
|
||||
/// <item><c>AllReferencesProduceReferenceAssemblies</c> indicating whether all referenced projects produce reference assemblies.</item>
|
||||
/// </list>
|
||||
/// </returns>
|
||||
(IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> ItemsByProject, bool IsComplete) TryGatherCopyItemsForProject(string targetPath, BuildUpToDateCheck.Log logger);
|
||||
(IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> ItemsByProject, bool IsComplete, bool AllReferencesProduceReferenceAssemblies) TryGatherCopyItemsForProject(string targetPath, BuildUpToDateCheck.Log logger);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -40,11 +41,13 @@ internal interface ICopyItemAggregator
|
|||
/// </summary>
|
||||
/// <param name="ProjectFullPath">The full path to the project file (e.g. the <c>.csproj</c> file).</param>
|
||||
/// <param name="TargetPath">The full path to the target file (e.g. a <c>.dll</c> file), which should be unique to the configuration.</param>
|
||||
/// <param name="ProduceReferenceAssembly">Whether this project produces a reference assembly or not, determined by the <c>ProduceReferenceAssembly</c> MSBuild property.</param>
|
||||
/// <param name="CopyItems">The set of items the project provider to the output directory of itself and other projects.</param>
|
||||
/// <param name="ReferencedProjectTargetPaths">The target paths resolved from this project's references to other projects.</param>
|
||||
internal record struct ProjectCopyData(
|
||||
string? ProjectFullPath,
|
||||
string TargetPath,
|
||||
bool ProduceReferenceAssembly,
|
||||
ImmutableArray<CopyItem> CopyItems,
|
||||
ImmutableArray<string> ReferencedProjectTargetPaths)
|
||||
{
|
||||
|
|
|
@ -243,7 +243,7 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
ResolvedCompilationReferencePaths = ImmutableArray<string>.Empty;
|
||||
CopyReferenceInputs = ImmutableArray<string>.Empty;
|
||||
LastItemChanges = ImmutableArray<(bool IsAdd, string ItemType, string)>.Empty;
|
||||
ProjectCopyData = new(null, "", ImmutableArray<CopyItem>.Empty, ImmutableArray<string>.Empty);
|
||||
ProjectCopyData = new(null, "", false, ImmutableArray<CopyItem>.Empty, ImmutableArray<string>.Empty);
|
||||
}
|
||||
|
||||
private UpToDateCheckImplicitConfiguredInput(
|
||||
|
@ -653,9 +653,10 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
ProjectCopyData UpdateCopyData()
|
||||
{
|
||||
if (jointRuleUpdate.ProjectChanges.TryGetValue(CopyToOutputDirectoryItem.SchemaName, out IProjectChangeDescription? change1) &&
|
||||
jointRuleUpdate.ProjectChanges.TryGetValue(ResolvedProjectReference.SchemaName, out IProjectChangeDescription? change2))
|
||||
jointRuleUpdate.ProjectChanges.TryGetValue(ResolvedProjectReference.SchemaName, out IProjectChangeDescription? change2) &&
|
||||
jointRuleUpdate.ProjectChanges.TryGetValue(ConfigurationGeneral.SchemaName, out IProjectChangeDescription? change3))
|
||||
{
|
||||
if (change1.Difference.AnyChanges || change2.Difference.AnyChanges)
|
||||
if (change1.Difference.AnyChanges || change2.Difference.AnyChanges || change3.Difference.AnyChanges)
|
||||
{
|
||||
// Register this project's data with the CopyToOutputDirectoryItem tracking service.
|
||||
|
||||
|
@ -670,7 +671,9 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
ImmutableArray<string> referenceItems = change2.After.Items.Where(pair => IncludeProjectReference(pair.Value)).Select(item => item.Key).ToImmutableArray();
|
||||
|
||||
return new ProjectCopyData(msBuildProjectFullPath, targetPath, copyItems, referenceItems);
|
||||
bool produceReferenceAssembly = change3.After.Properties.GetBoolProperty(ConfigurationGeneral.ProduceReferenceAssemblyProperty) ?? false;
|
||||
|
||||
return new ProjectCopyData(msBuildProjectFullPath, targetPath, produceReferenceAssembly, copyItems, referenceItems);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -627,6 +627,15 @@ namespace Microsoft.VisualStudio {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration..
|
||||
/// </summary>
|
||||
internal static string FUTD_NotAllReferencesProduceReferenceAssemblies {
|
||||
get {
|
||||
return ResourceManager.GetString("FUTD_NotAllReferencesProduceReferenceAssemblies", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output '{0}' does not exist, not up-to-date..
|
||||
/// </summary>
|
||||
|
|
|
@ -449,6 +449,10 @@ This project was loaded using the wrong project type, likely as a result of rena
|
|||
<value>This project appears to be a candidate for build acceleration. To opt in, set the 'AccelerateBuildsInVisualStudio' MSBuild property to 'true'. See https://aka.ms/vs-build-acceleration.</value>
|
||||
<comment>Do not translate 'AccelerateBuildsInVisualStudio' or 'true'.</comment>
|
||||
</data>
|
||||
<data name="FUTD_NotAllReferencesProduceReferenceAssemblies" xml:space="preserve">
|
||||
<value>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</value>
|
||||
<comment>Do not translate 'ProduceReferenceAssembly' or 'true'.</comment>
|
||||
</data>
|
||||
<data name="FUTD_AccelerationDisabledCopyItemsIncomplete" xml:space="preserve">
|
||||
<value>Build acceleration is not available for this project because not all transitively referenced projects have provided acceleration data.</value>
|
||||
</data>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">Vstupní položka {1} {0} neexistuje, i když je povinná.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">Výstup {0} neexistuje. Není aktuální.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">Die Eingabe {1}-Element "{0}" ist nicht vorhanden, aber nicht erforderlich.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">Die Ausgabe "{0}" ist nicht vorhanden, nicht aktuell.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">El elemento {1} de entrada "{0}" no existe, pero no es necesario.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">La salida "{0}" no existe, no está actualizada.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">L''{0}' d’élément de {1} d’entrée n’existe pas, mais n’est pas obligatoire.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">La sortie '{0}' n’existe pas, elle n’est pas à jour.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">L'input {1} 'elemento '{0}' non esiste, ma non è obbligatorio.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">L'output '{0}' non esiste, non è aggiornato.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">入力 {1} の項目 '{0}' は存在しませんが、必須ではありません。</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">出力 '{0}' が存在せず、最新ではありません。</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">입력 {1} 항목 '{0}'이(가) 존재하지 않지만 필수는 아닙니다.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">출력 '{0}'이(가) 존재하지 않으며 최신 상태가 아닙니다.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">Wejściowy {1} element „{0}” nie istnieje, ale nie jest wymagany.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">Dane wyjściowe „{0}’ nie istnieją, nie są aktualne.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">O item '{0}' de entrada {1} não existe, mas não é necessário.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">A saída '{0}' não existe, não atualizada.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">Элемент "{0}" входных данных {1} не существует и не является обязательным.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">Выходные данные "{0}" не существуют. Обновление не выполнено.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">{1} girişinin '{0}' öğesi yok ancak gerekli değil.</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">'{0}' çıkışı yok ve güncel değil.</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">输入{1}项'{0}'不存在,但不需要。</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">输出 '{0}' 不存在,不是最新的。</target>
|
||||
|
|
|
@ -297,6 +297,11 @@
|
|||
<target state="translated">輸入 {1} 項目 '{0}' 不存在,但並非必要項目。</target>
|
||||
<note>{0} is a file path. {1} is an MSBuild item type.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_NotAllReferencesProduceReferenceAssemblies">
|
||||
<source>This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</source>
|
||||
<target state="new">This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.</target>
|
||||
<note>Do not translate 'ProduceReferenceAssembly' or 'true'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="FUTD_OutputDoesNotExist_1">
|
||||
<source>Output '{0}' does not exist, not up-to-date.</source>
|
||||
<target state="translated">輸出 '{0}' 不存在,不是最新狀態。</target>
|
||||
|
|
|
@ -40,6 +40,7 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
private bool? _isBuildAccelerationEnabled;
|
||||
private IEnumerable<(string Path, ImmutableArray<CopyItem> CopyItems)> _copyItems = Enumerable.Empty<(string Path, ImmutableArray<CopyItem> CopyItems)>();
|
||||
private bool _isCopyItemsComplete = true;
|
||||
private bool _allReferencesProduceReferenceAssemblies = true;
|
||||
|
||||
private UpToDateCheckConfiguredInput? _state;
|
||||
private SolutionBuildContext? _currentSolutionBuildContext;
|
||||
|
@ -98,7 +99,7 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
var upToDateCheckHost = new Mock<IUpToDateCheckHost>(MockBehavior.Strict);
|
||||
|
||||
var copyItemAggregator = new Mock<ICopyItemAggregator>(MockBehavior.Strict);
|
||||
copyItemAggregator.Setup(o => o.TryGatherCopyItemsForProject(It.IsAny<string>(), It.IsAny<BuildUpToDateCheck.Log>())).Returns(() => (_copyItems, _isCopyItemsComplete));
|
||||
copyItemAggregator.Setup(o => o.TryGatherCopyItemsForProject(It.IsAny<string>(), It.IsAny<BuildUpToDateCheck.Log>())).Returns(() => (_copyItems, _isCopyItemsComplete, _allReferencesProduceReferenceAssemblies));
|
||||
|
||||
_currentSolutionBuildContext = new SolutionBuildContext(_fileSystem);
|
||||
|
||||
|
@ -735,9 +736,10 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
[Theory]
|
||||
[CombinatorialData]
|
||||
public async Task IsUpToDateAsync_CopyReference_InputsOlderThanMarkerOutput(bool? isBuildAccelerationEnabled)
|
||||
public async Task IsUpToDateAsync_CopyReference_InputsOlderThanMarkerOutput(bool? isBuildAccelerationEnabled, bool allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
_isBuildAccelerationEnabled = isBuildAccelerationEnabled;
|
||||
_allReferencesProduceReferenceAssemblies = allReferencesProduceReferenceAssemblies;
|
||||
|
||||
var projectSnapshot = new Dictionary<string, IProjectRuleSnapshotModel>
|
||||
{
|
||||
|
@ -773,12 +775,25 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
if (isBuildAccelerationEnabled is true)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
if (allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
}
|
||||
else
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Project is up-to-date.
|
||||
This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.
|
||||
""");
|
||||
}
|
||||
}
|
||||
else if (isBuildAccelerationEnabled is false)
|
||||
{
|
||||
|
@ -1588,9 +1603,10 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
[Theory]
|
||||
[CombinatorialData]
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_SourceIsNewerThanDestination(bool? isBuildAccelerationEnabled)
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_SourceIsNewerThanDestination(bool? isBuildAccelerationEnabled, bool allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
_isBuildAccelerationEnabled = isBuildAccelerationEnabled;
|
||||
_allReferencesProduceReferenceAssemblies = allReferencesProduceReferenceAssemblies;
|
||||
|
||||
var sourcePath1 = @"C:\Dev\Solution\Project\Item1";
|
||||
var sourcePath2 = @"C:\Dev\Solution\Project\Item2";
|
||||
|
@ -1617,26 +1633,53 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
if (isBuildAccelerationEnabled is true)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
if (allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
}
|
||||
else
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.
|
||||
""");
|
||||
}
|
||||
}
|
||||
else if (isBuildAccelerationEnabled is false)
|
||||
{
|
||||
|
@ -1674,9 +1717,10 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
[Theory]
|
||||
[CombinatorialData]
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_SourceIsNewerThanDestination_TargetPath(bool? isBuildAccelerationEnabled)
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_SourceIsNewerThanDestination_TargetPath(bool? isBuildAccelerationEnabled, bool allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
_isBuildAccelerationEnabled = isBuildAccelerationEnabled;
|
||||
_allReferencesProduceReferenceAssemblies = allReferencesProduceReferenceAssemblies;
|
||||
|
||||
var sourcePath1 = @"C:\Dev\Solution\Project\Item1";
|
||||
var sourcePath2 = @"C:\Dev\Solution\Project\Item2";
|
||||
|
@ -1703,26 +1747,53 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
if (isBuildAccelerationEnabled is true)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
if (allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
}
|
||||
else
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.
|
||||
""");
|
||||
}
|
||||
}
|
||||
else if (isBuildAccelerationEnabled is false)
|
||||
{
|
||||
|
@ -1760,9 +1831,10 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
[Theory]
|
||||
[CombinatorialData]
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_SourceIsNewerThanDestination_CustomOutDir(bool? isBuildAccelerationEnabled)
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_SourceIsNewerThanDestination_CustomOutDir(bool? isBuildAccelerationEnabled, bool allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
_isBuildAccelerationEnabled = isBuildAccelerationEnabled;
|
||||
_allReferencesProduceReferenceAssemblies = allReferencesProduceReferenceAssemblies;
|
||||
|
||||
const string outDirSnapshot = "newOutDir";
|
||||
|
||||
|
@ -1792,26 +1864,53 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
if (isBuildAccelerationEnabled is true)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
if (allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
}
|
||||
else
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath1}'
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination {ToLocalTime(destinationTime)}: '{destinationPath2}'
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.
|
||||
""");
|
||||
}
|
||||
}
|
||||
else if (isBuildAccelerationEnabled is false)
|
||||
{
|
||||
|
@ -1882,9 +1981,10 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
[Theory]
|
||||
[CombinatorialData]
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_DestinationDoesNotExist(bool? isBuildAccelerationEnabled)
|
||||
public async Task IsUpToDateAsync_CopyToOutputDirectory_DestinationDoesNotExist(bool? isBuildAccelerationEnabled, bool allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
_isBuildAccelerationEnabled = isBuildAccelerationEnabled;
|
||||
_allReferencesProduceReferenceAssemblies = allReferencesProduceReferenceAssemblies;
|
||||
|
||||
var sourcePath1 = @"C:\Dev\Solution\Project\Item1";
|
||||
var sourcePath2 = @"C:\Dev\Solution\Project\Item2";
|
||||
|
@ -1908,26 +2008,53 @@ namespace Microsoft.VisualStudio.ProjectSystem.UpToDate
|
|||
|
||||
if (isBuildAccelerationEnabled is true)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination '{destinationPath1}' does not exist.
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination '{destinationPath2}' does not exist.
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
if (allReferencesProduceReferenceAssemblies)
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination '{destinationPath1}' does not exist.
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination '{destinationPath2}' does not exist.
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
""");
|
||||
}
|
||||
else
|
||||
{
|
||||
await AssertUpToDateAsync(
|
||||
$"""
|
||||
Comparing timestamps of inputs and outputs:
|
||||
No build outputs defined.
|
||||
Checking items to copy to the output directory:
|
||||
Checking copy items from project '{_projectPath}':
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath1}'
|
||||
Destination '{destinationPath1}' does not exist.
|
||||
Remembering the need to copy file '{sourcePath1}' to '{destinationPath1}'.
|
||||
Checking PreserveNewest item
|
||||
Source {ToLocalTime(sourceTime)}: '{sourcePath2}'
|
||||
Destination '{destinationPath2}' does not exist.
|
||||
Remembering the need to copy file '{sourcePath2}' to '{destinationPath2}'.
|
||||
Copying 2 files to accelerate build (https://aka.ms/vs-build-acceleration):
|
||||
From '{sourcePath1}' to '{destinationPath1}'.
|
||||
From '{sourcePath2}' to '{destinationPath2}'.
|
||||
Build acceleration copied 2 files.
|
||||
Project is up-to-date.
|
||||
This project has enabled build acceleration, but at least one referenced project does not produce reference assemblies. Ensure all referenced projects, both direct and indirect, have the 'ProduceReferenceAssembly' MSBuild property set to 'true'. See https://aka.ms/vs-build-acceleration.
|
||||
""");
|
||||
}
|
||||
}
|
||||
else if (isBuildAccelerationEnabled is false)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче