dsplaisted / strongnamer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support dotnet execution tool

alexdrl opened this issue · comments

Is there any chance to get support in StrongNamer to be executed in dotnet core CLI?

I tried to follow this tutorial to convert it, but without luck.

If you want I can pass you the WIP.

I think this is my problem too. I get the following error when trying to build on Ubuntu 16.4.

/[removed]/.nuget/packages/strongnamer/0.0.8/build/StrongNamer.targets(13,5): error MSB4062: The "StrongNamer.AddStrongName" task could not be loaded from the assembly /[removed]/.nuget/packages/strongnamer/0.0.8/build/StrongNamer.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/[removed].csproj]
/[removed]/.nuget/packages/strongnamer/0.0.8/build/StrongNamer.targets(13,5): error MSB4062: Confirm that the 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. [/[removed].csproj]

In https://github.com/dsplaisted/strongnamer/blob/master/src/StrongNamer/AddStrongName.cs there is usage of Microsoft.Build.Utilities, dotnet/msbuild#2111 hints at how to change this to use Microsoft.Build.Framework.ITask.

However it looks like https://github.com/dsplaisted/strongnamer/blob/master/build/Build.tasks is explicitly requiring Microsoft.Build.Utilities.v4.0. which from what I understand is not available on Linux systems.

For now I am building on a Windows system and deploying to the Linux server, however I would like to be able to build in Linux too.

I accept that my understanding could be way off, if that is the case, please point me in the right direction.

I've been digging and just found that too. Looks like it is a WIP. See jbevain/cecil#548
I tried porting strongnamer to Standard 2.0 and found the Mono.Cecil issue. Thanks for the PR, I'll give it a shot.

Edit: It looks like the PR is the port to standard. It still has StrongNameKeyPair, which was removed in Mono.Cecil 0.10.1. So it does not compile for me. I'll keep an eye on Mono.Cecil to see how they end up changing it.

@Digitalroot wow, that looks very promising, thank you for pointing me that. With that, the PR that I mentioned, and jbevain/cecil#527 strongnamer will be fully cross-platform 😊

Sorry if I was not clear, but the PR I mentioned depends on Mono.Cecil supporting .NET Standard 2.0

Any news about this?

Or statement how the current state is?

Any news?

It seems like cecil supports netstandard2.0 out of box. Does it can help solve this issue?

Sorry for the long delay on this, and thanks a bunch to @onovotny for the PR that added this support. The latest package on NuGet.org (0.2.5) should now support building from dotnet.