sourcelink: Errors with beta 2

Tryign to use beta 2 gives me these errors

 StrictFilePathMarshaler must be used on a FilePath. [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                                                                                                              
    at LibGit2Sharp.Core.StrictFilePathMarshaler.MarshalManagedToNative(Object managedObj) [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                                                                        
    at System.StubHelpers.MngdRefCustomMarshaler.ConvertContentsToNative(IntPtr pMarshalState, Object& pManagedHome, IntPtr pNativeHome) [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                          
    at LibGit2Sharp.Core.NativeMethods.git_repository_discover(GitBuf buf, FilePath start_path, Boolean across_fs, FilePath ceiling_dirs) [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                         
    at LibGit2Sharp.Core.Proxy.<>c__DisplayClass219_0.<git_repository_discover>b__0(GitBuf buf) [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                                                                   
    at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever) [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                                                                                                  
    at LibGit2Sharp.Core.Proxy.git_repository_discover(FilePath start_path) [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                                                                                       
    at LibGit2Sharp.Repository.Discover(String startingPath) [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]                                                                                                      
    at Microsoft.Build.Tasks.Git.GitOperations.LocateRepository(String directory) in /_/src/Microsoft.Build.Tasks.Git.Operations/GitOperations.cs:line 26 [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]         
    at Microsoft.Build.Tasks.Git.RepositoryTasks.LocateRepository(LocateRepository task) in /_/src/Microsoft.Build.Tasks.Git.Operations/RepositoryTasks.cs:line 58 [C:\dev\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool\NuGetKeyVaultSignTool.csproj]

Using 1.0.0-beta-63127-02 works correctly, 1.0.0-beta2-18618-05 does not.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 32 (19 by maintainers)

Commits related to this issue

Most upvoted comments

Unfortunately, if this is hitting the bug fixed by https://github.com/dotnet/coreclr/pull/21606, and at this point it seems quite likely, then I don’t think there’s a workaround for it. We’d need that to be backported.

I just confirmed what @onovotny mentioned, the previous beta, 1.0.0-beta-63127-02 does not produce these warnings.

I get the following errors with beta2, building locally with Vsts package:

...\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4062: The "Microsoft.Build.Tasks.Git.LocateRepository" task could not be loaded from the assembly ...\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta2-18618-05\build\..\tools\netcoreapp2.0\Microsoft.Build.Tasks.Git.dll. Assembly with same name is already loaded 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.