NuGet.Build.Tasks.Pack.dll shipped delay signed in VS2017 (d15rel 26014.00) #4122

Closed
AArnott opened this Issue Dec 17, 2016 · 17 comments

Comments

Projects
None yet
7 participants
@AArnott
Contributor

AArnott commented Dec 17, 2016

On a machine without \\vspreinstall\preinstall\preinstall having run:

Create a .NET Core project.
Try to package it.
The build fails because NuGet.Build.Tasks.Pack.dll is delay or test signed:

Could not load file or assembly 'NuGet.Build.Tasks.Pack, Version=4.0.0.0, Culture=neutral, PublicKeyTo
ken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed.

msbuild /t:pack
  ConsoleApp1 -> C:\Users\andre\OneDrive\Documents\Visual Studio 2017\Projects\ConsoleApp1\ConsoleApp1\bin\Debug\netcoreapp1.0\ConsoleApp1.dll
  ConsoleApp1 -> C:\Users\andre\OneDrive\Documents\Visual Studio 2017\Projects\ConsoleApp1\ConsoleApp1\bin\Debug\net46\ConsoleApp1.exe
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(73,5): error MSB4062:
 The "NuGet.Build.Tasks.Pack.PackTask" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\NuGet.Build.T
asks.Pack\buildCrossTargeting\..\Desktop\NuGet.Build.Tasks.Pack.dll. Could not load file or assembly 'NuGet.Build.Tasks.Pack, Version=4.0.0.0, Culture=neutral, PublicKeyTo
ken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) 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. [C:\Users\andre\OneDri
ve\Documents\Visual Studio 2017\Projects\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj]

@AArnott AArnott changed the title from NuGet.Build.Tasks.Pack.dll shipped delay signed in VS2017 RC2.1 to NuGet.Build.Tasks.Pack.dll shipped delay signed in VS2017 (d15rel 26014.00) Dec 17, 2016

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott Dec 17, 2016

Contributor

Apparently at least one other assembly is also not fully signed: NuGet.Commands

Contributor

AArnott commented Dec 17, 2016

Apparently at least one other assembly is also not fully signed: NuGet.Commands

@xwipeoutx

This comment has been minimized.

Show comment
Hide comment
@xwipeoutx

xwipeoutx Dec 19, 2016

Is there a workaround for this if we've already installed it?

Is there a workaround for this if we've already installed it?

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott Dec 20, 2016

Contributor

@xwipeoutx: one workaround is to execute this from an elevated VS Developer Prompt

sn -Vr NuGet.Build.Tasks.Pack,31bf3856ad364e35
sn -Vr NuGet.Commands,31bf3856ad364e35

the same for any other assemblies that have this problem.

But be sure to unregister them later (using sn -Vu) after the bug is fixed.

Contributor

AArnott commented Dec 20, 2016

@xwipeoutx: one workaround is to execute this from an elevated VS Developer Prompt

sn -Vr NuGet.Build.Tasks.Pack,31bf3856ad364e35
sn -Vr NuGet.Commands,31bf3856ad364e35

the same for any other assemblies that have this problem.

But be sure to unregister them later (using sn -Vu) after the bug is fixed.

@rrelyea rrelyea added the Priority:1 label Dec 29, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Dec 30, 2016

Contributor

@rohit21agrawal looked at RC2 (not RC2.1) and believes that those DLLs are properly signed there. He'll continue to dig into it to make sure RC3 has this addressed.

Contributor

rrelyea commented Dec 30, 2016

@rohit21agrawal looked at RC2 (not RC2.1) and believes that those DLLs are properly signed there. He'll continue to dig into it to make sure RC3 has this addressed.

@rohit21agrawal

This comment has been minimized.

Show comment
Hide comment
@rohit21agrawal

rohit21agrawal Jan 4, 2017

Contributor

i have replaced the culprit unsigned nuget package on the nuget-build (and cli-deps) feed on myget. The next nightly build should pick up the right package and have signed DLLs

Contributor

rohit21agrawal commented Jan 4, 2017

i have replaced the culprit unsigned nuget package on the nuget-build (and cli-deps) feed on myget. The next nightly build should pick up the right package and have signed DLLs

@rohit21agrawal

This comment has been minimized.

Show comment
Hide comment
@rohit21agrawal

rohit21agrawal Jan 4, 2017

Contributor

verified with jacques from the WTE team that the build is picking up the signed nupkg now. tomorrow's build will not have this issue. closing this issue.

Contributor

rohit21agrawal commented Jan 4, 2017

verified with jacques from the WTE team that the build is picking up the signed nupkg now. tomorrow's build will not have this issue. closing this issue.

@davghouse

This comment has been minimized.

Show comment
Hide comment
@davghouse

davghouse Jan 25, 2017

I just installed VS 2017 RC and got this bug, does that make sense?

I just installed VS 2017 RC and got this bug, does that make sense?

@rohit21agrawal

This comment has been minimized.

Show comment
Hide comment
@rohit21agrawal

rohit21agrawal Jan 25, 2017

Contributor

@davghouse can you tell us the build number?

Go to Help -> About Microsoft Visual Studio

Contributor

rohit21agrawal commented Jan 25, 2017

@davghouse can you tell us the build number?

Go to Help -> About Microsoft Visual Studio

@davghouse

This comment has been minimized.

Show comment
Hide comment
@davghouse

davghouse Jan 25, 2017

Microsoft Visual Studio Professional 2017 RC
Version 15.0.26020.0 D15REL
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Professional

NuGet Package Manager 4.0.0

Microsoft Visual Studio Professional 2017 RC
Version 15.0.26020.0 D15REL
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Professional

NuGet Package Manager 4.0.0

@rohit21agrawal

This comment has been minimized.

Show comment
Hide comment
@rohit21agrawal

rohit21agrawal Jan 25, 2017

Contributor

@davghouse this build is over a month old, and yes it did have this problem. could you try updating your VS?

Contributor

rohit21agrawal commented Jan 25, 2017

@davghouse this build is over a month old, and yes it did have this problem. could you try updating your VS?

@davghouse

This comment has been minimized.

Show comment
Hide comment
@davghouse

davghouse Jan 25, 2017

@rohit21agrawal Okay I looked around but I appear to have the latest version based off of https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes. I'm not very familiar with VS, should I look somewhere else?

@rohit21agrawal Okay I looked around but I appear to have the latest version based off of https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes. I'm not very familiar with VS, should I look somewhere else?

@rohit21agrawal

This comment has been minimized.

Show comment
Hide comment
@rohit21agrawal

rohit21agrawal Jan 25, 2017

Contributor

@davghouse my bad.. wait for a few days for the next update..and use the work around mentioned in the post above until then.

Contributor

rohit21agrawal commented Jan 25, 2017

@davghouse my bad.. wait for a few days for the next update..and use the work around mentioned in the post above until then.

@ShreeSam

This comment has been minimized.

Show comment
Hide comment
@ShreeSam

ShreeSam Jul 6, 2017

Hi Team,

We are getting same error in out TFS 2017 build. Builds were working fine till last week. Not sure what went wrong. All builds are failing with below error.

D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets (104, 5)
The "NuGet.Build.Tasks.Pack.PackTask" task could not be loaded from the assembly D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\NuGet.Build.Tasks.Pack\build..\CoreCLR\NuGet.Build.Tasks.Pack.dll. Could not load file or assembly 'NuGet.Commands, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621) 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.

Solutions are building successfully on developers machines.
Any help or suggestions would be more helpful.

Thanks,
Shree

ShreeSam commented Jul 6, 2017

Hi Team,

We are getting same error in out TFS 2017 build. Builds were working fine till last week. Not sure what went wrong. All builds are failing with below error.

D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets (104, 5)
The "NuGet.Build.Tasks.Pack.PackTask" task could not be loaded from the assembly D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\NuGet.Build.Tasks.Pack\build..\CoreCLR\NuGet.Build.Tasks.Pack.dll. Could not load file or assembly 'NuGet.Commands, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621) 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.

Solutions are building successfully on developers machines.
Any help or suggestions would be more helpful.

Thanks,
Shree

@dasMulli

This comment has been minimized.

Show comment
Hide comment
@dasMulli

dasMulli Jul 6, 2017

@ShreeSam this looks like the issue logged at dotnet/sdk#1384

dasMulli commented Jul 6, 2017

@ShreeSam this looks like the issue logged at dotnet/sdk#1384

@ShreeSam

This comment has been minimized.

Show comment
Hide comment
@ShreeSam

ShreeSam Jul 6, 2017

Hi dasMulli,

No. We are not getting any System.IO error.

Thanks,
Shree

ShreeSam commented Jul 6, 2017

Hi dasMulli,

No. We are not getting any System.IO error.

Thanks,
Shree

@rohit21agrawal

This comment has been minimized.

Show comment
Hide comment
@rohit21agrawal

rohit21agrawal Jul 6, 2017

Contributor

@ShreeSam can you provide details of the Visual Studio version you are using?

Contributor

rohit21agrawal commented Jul 6, 2017

@ShreeSam can you provide details of the Visual Studio version you are using?

@ShreeSam

This comment has been minimized.

Show comment
Hide comment
@ShreeSam

ShreeSam Jul 7, 2017

Hi Rohit,

Please find the attached screenshot.

image

Thanks,
Shree

ShreeSam commented Jul 7, 2017

Hi Rohit,

Please find the attached screenshot.

image

Thanks,
Shree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment