question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ResolvePublishAssemblies task is failing

See original GitHub issue

Error message

C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018: The "ResolvePublishAssemblies" task failed unexpectedly.\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018: System.ArgumentNullException: Value cannot be null.\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018: Parameter name: path1\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at System.IO.Path.Combine(String path1, String path2)\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at Microsoft.NET.Build.Tasks.PublishAssembliesResolver.<GetResolvedFiles>d__5.MoveNext()\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at Microsoft.NET.Build.Tasks.PublishAssembliesResolver.Resolve(ProjectContext projectContext)\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePublishAssemblies.ExecuteCore()\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute()\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]
C:\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Publish.targets(230,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [C:\Enlistments\vstest\src\vstest.console\vstest.console.csproj]

Repro Step:

1) Restore project https://github.com/Microsoft/vstest/blob/master/src/vstest.console/vstest.console.csproj
2) Build project https://github.com/Microsoft/vstest/blob/master/src/vstest.console/vstest.console.csproj
3) publish for framework net46 

Environment:

.NET Command Line Tools (1.0.0-preview5-004478)
Product Information:
Version: 1.0.0-preview5-004478
Commit SHA-1 hash: 4d3e287
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Users\faahmad\Desktop\dotnet-dev-win-x64.latest\sdk\1.0.0-preview5-004478

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
natemcmastercommented, Jan 13, 2017

I manually patched my CLI with the 1.0.0-alpha-20170113-1 Microsoft.NET.Sdk. Seems to have fixed it. I assume dotnet/cli needs to update to this new build but just hasn’t yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net - 'Publish failed' but build succeeded?
My solution is targeting x86, but I think during a Git Merge, this project had it's profile switched to Any CPU. After creating...
Read more >
Resolved - Publish failed. Check output for more details.
Guys, I've solved the problem. It seems that I did not set the framework to .NET 4.8 before publishing the project on my...
Read more >
Resolving packaged assembly path fail when published
I'm using TryResolveAssemblyPaths on a composite assembly resolver to resolve path for a reference in the NuGet cache and I observe it fail...
Read more >
Troubleshoot .NET Framework targeting errors
To resolve the error, make sure that your application targets a .NET version that's compatible with the version that's targeted by the projects ......
Read more >
MSB3277: Found conflicts between different versions of ' ...
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found