You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit tests were failing because they load MSBuild assemblies from the
test output directory. Normally they're not available there, so
GitLoaderContext doesn't load them. But in tests, they were there, and
being loaded in both ALC.Default (from the main part of the test) and
a GitLoaderContext created a type mismatch
```
MissingMethodException: Method not found: 'Microsoft.Build.Framework.ITaskItem[] GitVersion.MSBuildTask.Tasks.UpdateAssemblyInfo.get_CompileFiles()'.
at GitVersion.MSBuildTask.GitVersionTaskExecutor.UpdateAssemblyInfo(UpdateAssemblyInfo task)
at GitVersion.MSBuildTask.GitVersionTasks.<>c__DisplayClass1_0.<UpdateAssemblyInfo>b__0(IGitVersionTaskExecutor executor) in D:\a\1\s\src\GitVersionTask\GitVersionTasks.cs:line 15
at GitVersion.MSBuildTask.GitVersionTasks.ExecuteGitVersionTask[T](T task, Action`1 action) in D:\a\1\s\src\GitVersionTask\GitVersionTasks.cs:line 30
```
That was happening because the loaded `UpdateAssemblyInfo.CompileFiles`
was of type (`Microsoft.Build.Framework.ITaskItem[]` in the
`GitLoaderContext`) while it was looking for
(`Microsoft.Build.Framework.ITaskItem[]` in
`AssemblyLoadContext.Default`).
0 commit comments