-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dotnet execution tool #17
Comments
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] 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. |
#31 This PR adapts the build task to execute on Linux and to bypass the exception that you're hitting. The problem is that this works, but the underlying APIs used in Mono.Cecil (updated to .NET Standard 2.0), does not seem to work in Linux. But, at least, this enables building using dotnet CLI on Windows.
…________________________________
From: Nicholas Dunnaway <notifications@github.com>
Sent: Saturday, November 24, 2018 10:06:28 PM
To: dsplaisted/strongnamer
Cc: Alejandro Del Rincón López; Author
Subject: Re: [dsplaisted/strongnamer] Support dotnet execution tool (#17)
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<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdsplaisted%2Fstrongnamer%2Fblob%2Fmaster%2Fsrc%2FStrongNamer%2FAddStrongName.cs&data=02%7C01%7C%7Cdf8416962ba346a5b7cb08d65250b3f8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636786903900617536&sdata=TvwZ7b9EroUg0xPwBrONuELuN%2BB0VQxrpsOVl1zC20k%3D&reserved=0> there is usage of Microsoft.Build.Utilities, dotnet/msbuild#2111<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsbuild%2Fissues%2F2111&data=02%7C01%7C%7Cdf8416962ba346a5b7cb08d65250b3f8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636786903900617536&sdata=PefgP4cFbRAi4dYLzRyxIXE6Tcrw59taz6N9767zX6I%3D&reserved=0> 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<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdsplaisted%2Fstrongnamer%2Fblob%2Fmaster%2Fbuild%2FBuild.tasks&data=02%7C01%7C%7Cdf8416962ba346a5b7cb08d65250b3f8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636786903900617536&sdata=6uGxyXA7q29yw7otxP%2FAWvD9ZwFnTYIJJq9EzqomA%2Bc%3D&reserved=0> 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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdsplaisted%2Fstrongnamer%2Fissues%2F17%23issuecomment-441395780&data=02%7C01%7C%7Cdf8416962ba346a5b7cb08d65250b3f8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636786903900617536&sdata=Dmg%2FwV5q5UDs407H2G%2BSF40Z12ZHDpivjf5DVrr3XJ8%3D&reserved=0>, or mute the thread<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAZKRKW8IPE0sTtqCb1y8tjgs2GwlZ6lwks5uybTUgaJpZM4PJwk7&data=02%7C01%7C%7Cdf8416962ba346a5b7cb08d65250b3f8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636786903900617536&sdata=j%2FcsJxnE6Ek6czxAjE1t2gcxPy7qwc%2BwH7gJXAtxt5k%3D&reserved=0>.
|
I've been digging and just found that too. Looks like it is a WIP. See jbevain/cecil#548 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 |
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.
The text was updated successfully, but these errors were encountered: