Skip to content

Instantly share code, notes, and snippets.

@b0urb4k1
Created July 1, 2021 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b0urb4k1/aec3e882d6e680fdf6a879a954d8d8ab to your computer and use it in GitHub Desktop.
Save b0urb4k1/aec3e882d6e680fdf6a879a954d8d8ab to your computer and use it in GitHub Desktop.
Directory.Build.targets
Directory.Build.targets(28,9): error MSB4062: The "XXX.BuildTasks.CheckProjectReferenceCopyLocal" task could not be loaded from the assembly C:\Coding\git_repos\XXXux_Evo_4\bin\Build\Release\XXX.BuildTasks.dll. Could not load file or assembly 'file:///C:\Coding\git_repos\XXXux_Evo_4\bin\Build\Release\XXX.BuildTasks.dll' or one of its dependencies. The system cannot find the file specified. 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.
<PropertyGroup>
<CoreCompileDependsOn>
BuildTasksProject;
TestProjectSettings;
$(CoreCompileDependsOn)
</CoreCompileDependsOn>
</PropertyGroup>
<Target Name="BuildTasksProject" Inputs="@(XXXBuildTaskFiles)" Outputs="$(MSBuildThisFileDirectory)bin\Build\Release\XXX.BuildTasks.dll" Condition="'$(Language)' == 'C#' AND '$(IsXXXuxSolution)' == 'true'">
<Message Text="Building $(MSBuildThisFileDirectory)Build\BuildTasks\XXX.BuildTasks.csproj" Importance="high" />
<MSBuild Projects="$(MSBuildThisFileDirectory)Build\BuildTasks\XXX.BuildTasks.csproj" Properties="Configuration=Release;Platform=AnyCPU" />
</Target>
<Target Name="TestProjectSettings" Condition="Exists('$(MSBuildThisFileDirectory)bin\Build\Release\XXX.BuildTasks.dll') AND '$(Language)' == 'C#' AND '$(IsXXXuxSolution)' == 'true'">
<Message Text="Checking Settings for $(ProjectName)" Importance="high" />
<CheckProjectReferenceCopyLocal ProjectReferences="@(ProjectReference)" />
<CheckPaketReferenceCopyLocal References="@(Reference)" />
<CheckDuplicatedTaskItems ProjectReferences="@(ProjectReference)" ErrorMessage="Projektreferenz von {0} doppelt bitte Projektfile checken und ausgeizen." />
<CheckDuplicatedTaskItems ProjectReferences="@(None)" ErrorMessage="File {0} doppelt enthalten bitte Projektfile checken und ausgeizen." />
<CheckGlobalXXXuxVersionInfo CompileFiles="@(Compile)" />
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment