C
C#14mo ago
newt 🐀

❔ Failed to publish on Ubuntu with strange error

Hello, I have limited experience with C#, so I am sorry if I am missing any key terminology. I am trying to publish a solution on Ubuntu, but it is erroring because I am apparently missing version 4.0.3.0 of System.Security.Permissions. This version does not exist on nuget, so I can not add it. What is the issue, and how do I fix it?
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: The "GenerateResource" task failed unexpectedly. [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: File name: 'System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Shared.ExceptionHandling.IsXmlException(Exception e) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Shared.ExceptionHandling.NotExpectedIoOrXmlException(Exception e) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.GetResourcesToProcess(List`1& inputsToProcess, List`1& outputsToProcess, List`1& cachedOutputFiles) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute() [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: The "GenerateResource" task failed unexpectedly. [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: File name: 'System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Shared.ExceptionHandling.IsXmlException(Exception e) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Shared.ExceptionHandling.NotExpectedIoOrXmlException(Exception e) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.GetResourcesToProcess(List`1& inputsToProcess, List`1& outputsToProcess, List`1& cachedOutputFiles) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute() [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
/usr/lib/dotnet/sdk/6.0.123/Microsoft.Common.CurrentVersion.targets(3264,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/newt/johnny/docker/PixelStacker/src/PixelStacker.Resources/PixelStacker.Resources.csproj]
5 Replies
newt 🐀
newt 🐀OP14mo ago
If any more context is needed, just ask - I didn't really know what to include in this post Oh, I am using .NET SDK 6.0
reflectronic
reflectronic14mo ago
the problem is not with your project, it's with your .NET SDK it is itself trying to use System.Security.Permissions, but it cannot find it it suggests that the SDK was not installed correctly
newt 🐀
newt 🐀OP14mo ago
I installed the dotnet-sdk-7.0 apt package I don't really know what could've gone wrong I also replicated this error on another system running Linux Mint After installing the sdk the same way
reflectronic
reflectronic14mo ago
i have looked at the packages, and it seems like the 6.0 ones may just be broken so you are using the .NET 7 SDK? is it broken with both or just .NET 6
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server