Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Questo articolo descrive il codice di errore MSB4062.
Testo del messaggio
MSB4062: The 'value' task could not be loaded from the assembly 'value'. 'value' Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Descrizione
Questo errore viene generato quando MSBuild non riesce a caricare un assembly di attività prima di eseguire l'attività.
L'errore MSB4062 potrebbe essere causato quando un'attività viene eseguita in un ambiente per cui non è preparata. Ad esempio, quando un assembly di attività è destinato a x86 a 32 bit, ma viene eseguito in un ambiente MSBuild a 64 bit.
S:\BitnessInMSBuild\ShowErrors.proj(13,5): error MSB4062: The "TaskCompiledForx86" task could not be loaded from the assembly S:\BitnessInMSBuild\TaskCompiledForx86\bin\Debug\net472\TaskCompiledForx86.dll. Could not load file or assembly 'file:///S:\BitnessInMSBuild\TaskCompiledForx86\bin\Debug\net472\TaskCompiledForx86.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Risoluzione
Assicurarsi che l'attività esprime una dipendenza dall'ambiente di runtime richiesto nell'elemento UsingTask dell'attività.
Si applica a:
Tutte le versioni di MSBuild