"MakeSelectServerPackage" task failed unexpectedly

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
danvanf
Posts: 54
Joined: Fri Nov 07, 2008 10:45 am
Location: Dayton, Ohio
Contact:

"MakeSelectServerPackage" task failed unexpectedly

Post by danvanf »

Hello,

I am building a server side package that I'm running into a problem when I try to call a DLL which in turn makes calls to Google's PubSub service. As soon as I reference it AND create an object based on a defination in the DLL Visual Studio gives an error "The "MakeSelectServerPackage" task failed unexpectedly"

The Error mentions the specified URI is already in the package. I'm not sure how the PubSub dll (custom written, not by me) could have a URI that already exists.

The complete error is

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Error The "MakeSelectServerPackage" task failed unexpectedly.
System.InvalidOperationException: Cannot add part for the specified URI because it is already in the package.
   at System.IO.Packaging.Package.CreatePart(Uri partUri, String contentType, CompressionOption compressionOption)
   at SoftPro.Select.Sdk.Tasks.MakeSelectServerPackage.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	TwentyFourSevenPayoffLink	C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.targets	91	
And this might be a bit much, but data is power. Here is the end of the output for the build

Code: Select all

1>------ Build started: Project: TwentyFourSevenPayoffLink, Configuration: Debug Any CPU ------
1>Build started 12/21/2020 4:12:56 PM.
1>Building with tools version "14.0".
--------------------------- lots of text, getting interesting soon --------------------
1>  D:\Cust\Small Clients\Vspc\Select Server Package\packages\Grpc.Core.2.34.0\runtimes\win-x86\native\grpc_csharp_ext.x86.dll
1>Done executing task "Message".
1>Task "Message"
1>  D:\Cust\Small Clients\Vspc\Select Server Package\packages\Grpc.Core.2.34.0\runtimes\win-x64\native\grpc_csharp_ext.x64.dll
1>Done executing task "Message".
1>Task "Message"
1>  D:\Cust\Small Clients\Vspc\Select Server Package\packages\Grpc.Core.2.34.0\runtimes\linux-x64\native\libgrpc_csharp_ext.x64.so
1>Done executing task "Message".
1>Task "Message"
1>  D:\Cust\Small Clients\Vspc\Select Server Package\packages\Grpc.Core.2.34.0\runtimes\osx-x64\native\libgrpc_csharp_ext.x64.dylib
1>Done executing task "Message".
1>Task "Message"
1>  D:\Cust\Small Clients\Vspc\Select Server Package\TwentyFourSevenPayoffLink\seven-payoff-c9b87684eb9a.json
1>Done executing task "Message".
1>Using "MakeSelectServerPackage" task from assembly "C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.Tasks.dll".
1>Task "MakeSelectServerPackage"
1>C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.targets(91,5): error MSB4018: The "MakeSelectServerPackage" task failed unexpectedly.
1>C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.targets(91,5): error MSB4018: System.InvalidOperationException: Cannot add part for the specified URI because it is already in the package.
1>C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.targets(91,5): error MSB4018:    at System.IO.Packaging.Package.CreatePart(Uri partUri, String contentType, CompressionOption compressionOption)
1>C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.targets(91,5): error MSB4018:    at SoftPro.Select.Sdk.Tasks.MakeSelectServerPackage.Execute()
1>C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.targets(91,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files (x86)\MSBuild\SoftPro\Select\SoftPro.Select.Sdk.targets(91,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>Done executing task "MakeSelectServerPackage" -- FAILED.
1>Done building target "MakeSelectServerPackage" in project "TwentyFourSevenPayoffLink.csproj" -- FAILED.
1>Target "_CheckForCompileOutputs" skipped. Previously built successfully.
1>Target "_SGenCheckForOutputs" skipped, due to false condition; ('$(_SGenGenerateSerializationAssembliesConfig)' == 'On' or ('@(WebReferenceUrl)'!='' and '$(_SGenGenerateSerializationAssembliesConfig)' == 'Auto')) was evaluated as ('Off' == 'On' or (''!='' and 'Off' == 'Auto')).
1>Target "_CleanGetCurrentAndPriorFileWrites" in file "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" from project "D:\Cust\Small Clients\Vspc\Select Server Package\TwentyFourSevenPayoffLink\TwentyFourSevenPayoffLink.csproj" (target "_CleanRecordFileWrites" depends on it):
1>Using "ReadLinesFromFile" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "ReadLinesFromFile"
1>Done executing task "ReadLinesFromFile".
1>Using "ConvertToAbsolutePath" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "ConvertToAbsolutePath"
1>Done executing task "ConvertToAbsolutePath".
1>Using "FindUnderPath" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "FindUnderPath"
1>  Comparison path is "D:\Cust\Small Clients\Vspc\Select Server Package\TwentyFourSevenPayoffLink".
1>Done executing task "FindUnderPath".
1>Task "FindUnderPath"
1>  Comparison path is "bin\Debug\".
1>Done executing task "FindUnderPath".
1>Task "FindUnderPath"
1>  Comparison path is "obj\Debug\".
1>Done executing task "FindUnderPath".
1>Using "RemoveDuplicates" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "RemoveDuplicates"
1>Done executing task "RemoveDuplicates".
1>Done building target "_CleanGetCurrentAndPriorFileWrites" in project "TwentyFourSevenPayoffLink.csproj".
1>Target "_CleanRecordFileWrites" in file "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets" from project "D:\Cust\Small Clients\Vspc\Select Server Package\TwentyFourSevenPayoffLink\TwentyFourSevenPayoffLink.csproj" (target "CoreBuild" depends on it):
1>Task "RemoveDuplicates"
1>Done executing task "RemoveDuplicates".
1>Task "MakeDir"
1>Done executing task "MakeDir".
1>Using "WriteLinesToFile" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "WriteLinesToFile"
1>Done executing task "WriteLinesToFile".
1>Done building target "_CleanRecordFileWrites" in project "TwentyFourSevenPayoffLink.csproj".
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:09.99
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Have I provided any clues to what is stopping the build?
Thanks,
-Dan
I blog at http://DanVanFleet.com on SoftPro and other things
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: "MakeSelectServerPackage" task failed unexpectedly

Post by BobRichards »

Try increasing the level of verbosity for Visual Studio.
  • From top menu, select Tools -> Options...
  • Navigate to Projects and Solutions -> Build and Run
  • Set MSBuild project build output verbosity to Detailed
This should allow you to see the list of files that are being included in the spspkg file in the build viewer right before the error you observed. Is there a duplicate name??

By the way, an spspkg file is just a zip file with a specified format. If you rename any spspkg file to a "zip" extension, you can examine the file contents with an ZIP viewer.
Bob Richards, Senior Software Developer, SoftPro
Post Reply