Closed maioni closed 1 year ago
Encountering same issue on Fedora 38
kyral@Azim[±|master ✓]:~/workspace/PSXPackager $ dotnet --version
7.0.105
kyral@Azim[±|master ✓]:~/workspace/PSXPackager $ dotnet build
MSBuild version 17.4.3+7e646be43 for .NET
Determining projects to restore...
Restored /home/kyral/workspace/PSXPackager/PSXPackager/PSXPackager.csproj (in 232 ms).
8 of 9 projects are up-to-date for restore.
/usr/lib64/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1226,3): error MSB4019: The imported project "/usr/lib64/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/lib64/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk. [/home/kyral/workspace/PSXPackager/PSXPackagerGUI/PSXPackagerGUI.csproj]
DiscUtils.Streams -> /home/kyral/workspace/PSXPackager/DiscUtils.Streams/bin/Debug/net6.0/DiscUtils.Streams.dll
DiscUtils.Core -> /home/kyral/workspace/PSXPackager/DiscUtils.Core/bin/Debug/net6.0/DiscUtils.Core.dll
DiscUtils.Iso9660 -> /home/kyral/workspace/PSXPackager/DiscUtils.Iso9660/bin/Debug/net6.0/DiscUtils.Iso9660.dll
Popstation.Database -> /home/kyral/workspace/PSXPackager/Popstation.Database/bin/Debug/net6.0/Popstation.Database.dll
PSXPackager.Common -> /home/kyral/workspace/PSXPackager/PSXPackager.Common/bin/Debug/net6.0/PSXPackager.Common.dll
PSXPackager.Tests -> /home/kyral/workspace/PSXPackager/PSXPackager.Tests/bin/Debug/net6.0/PSXPackager.Tests.dll
Popstation -> /home/kyral/workspace/PSXPackager/Popstation/bin/Debug/net6.0/Popstation.dll
PSXPackager -> /home/kyral/workspace/PSXPackager/PSXPackager/bin/Debug/net6.0/PSXPackager.dll
Build FAILED.
/usr/lib64/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1226,3): error MSB4019: The imported project "/usr/lib64/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/lib64/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk. [/home/kyral/workspace/PSXPackager/PSXPackagerGUI/PSXPackagerGUI.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.73
kyral@Azim[±|master ✓]:~/workspace/PSXPackager $ rpm -qa | grep dotnet
dotnet-host-7.0.5-1.fc38.x86_64
dotnet-apphost-pack-6.0-6.0.16-1.fc38.x86_64
dotnet-hostfxr-6.0-6.0.16-1.fc38.x86_64
dotnet-runtime-6.0-6.0.16-1.fc38.x86_64
dotnet-targeting-pack-6.0-6.0.16-1.fc38.x86_64
dotnet-templates-6.0-6.0.116-1.fc38.x86_64
dotnet-sdk-6.0-6.0.116-1.fc38.x86_64
dotnet-6.0.116-1.fc38.x86_64
dotnet-hostfxr-7.0-7.0.5-1.fc38.x86_64
dotnet-runtime-7.0-7.0.5-1.fc38.x86_64
dotnet-templates-7.0-7.0.105-1.fc38.x86_64
dotnet-targeting-pack-7.0-7.0.5-1.fc38.x86_64
dotnet-apphost-pack-7.0-7.0.5-1.fc38.x86_64
dotnet-sdk-7.0-7.0.105-1.fc38.x86_64
kyral@Azim[±|master ✓]:~/workspace/PSXPackager $
I was able to make it work by invoking 'make build-linux-x64'
kyral@Azim[±|master ✓]:~/workspace/PSXPackager $ make build-linux-x64
dotnet publish ./PSXPackager/PSXPackager-linux.csproj -c Release -r linux-x64 -o ./build/linux-x64 --self-contained -p:PublishSingleFile=true -p:SelfContained=true -p:PublishTrimmed=true -p:InvariantGlobalization=true -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false
MSBuild version 17.4.3+7e646be43 for .NET
Determining projects to restore...
Restored /home/kyral/workspace/PSXPackager/DiscUtils.Core/DiscUtils.Core.csproj (in 435 ms).
Restored /home/kyral/workspace/PSXPackager/Popstation.Database/Popstation.Database.csproj (in 435 ms).
Restored /home/kyral/workspace/PSXPackager/DiscUtils.Streams/DiscUtils.Streams.csproj (in 435 ms).
Restored /home/kyral/workspace/PSXPackager/DiscUtils.Iso9660/DiscUtils.Iso9660.csproj (in 435 ms).
Restored /home/kyral/workspace/PSXPackager/PSXPackager.Common/PSXPackager.Common.csproj (in 616 ms).
Restored /home/kyral/workspace/PSXPackager/Popstation/Popstation.csproj (in 616 ms).
Restored /home/kyral/workspace/PSXPackager/PSXPackager/PSXPackager-linux.csproj (in 616 ms).
DiscUtils.Streams -> /home/kyral/workspace/PSXPackager/DiscUtils.Streams/bin/Release/net6.0/DiscUtils.Streams.dll
DiscUtils.Core -> /home/kyral/workspace/PSXPackager/DiscUtils.Core/bin/Release/net6.0/DiscUtils.Core.dll
DiscUtils.Iso9660 -> /home/kyral/workspace/PSXPackager/DiscUtils.Iso9660/bin/Release/net6.0/DiscUtils.Iso9660.dll
Popstation.Database -> /home/kyral/workspace/PSXPackager/Popstation.Database/bin/Release/net6.0/Popstation.Database.dll
PSXPackager.Common -> /home/kyral/workspace/PSXPackager/PSXPackager.Common/bin/Release/net6.0/PSXPackager.Common.dll
Popstation -> /home/kyral/workspace/PSXPackager/Popstation/bin/Release/net6.0/Popstation.dll
PSXPackager-linux -> /home/kyral/workspace/PSXPackager/PSXPackager/bin/Release/net6.0/linux-x64/psxpackager.dll
PSXPackager-linux -> /home/kyral/workspace/PSXPackager/build/linux-x64/
cp README.md ./build/linux-x64
kyral@Azim[±|master ✓]:~/workspace/PSXPackager $ ls build/linux-x64/
psxpackager README.md Resources
kyral@Azim[±|master ✓]:~/workspace/PSXPackager $
closing issue as it is resolved
Error when tries to use 'dotnet build' in linux debian based!
Pre-Condition:
Steps:
Actual results:
Expected results:
LOGS:
DOTNET7
popos@pop-os PSXPackager (master) $ sudo apt install dotnet7 Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: aspnetcore-runtime-7.0 aspnetcore-targeting-pack-7.0 dotnet-apphost-pack-7.0 dotnet-host-7.0 dotnet-hostfxr-7.0 dotnet-runtime-7.0 dotnet-sdk-7.0 dotnet-targeting-pack-7.0 dotnet-templates-7.0 netstandard-targeting-pack-2.1-7.0 The following packages will be REMOVED: dotnet-host netstandard-targeting-pack-2.1 The following NEW packages will be installed: aspnetcore-runtime-7.0 aspnetcore-targeting-pack-7.0 dotnet-apphost-pack-7.0 dotnet-host-7.0 dotnet-hostfxr-7.0 dotnet-runtime-7.0 dotnet-sdk-7.0 dotnet-targeting-pack-7.0 dotnet-templates-7.0 dotnet7 netstandard-targeting-pack-2.1-7.0 0 upgraded, 11 newly installed, 2 to remove and 0 not upgraded. Need to get 135 MB of archives. After this operation, 470 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet-host-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [178 kB] Get:2 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 netstandard-targeting-pack-2.1-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [1,405 kB] Get:3 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet-hostfxr-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [163 kB] Get:4 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet-runtime-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [24.5 MB] Get:5 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 aspnetcore-runtime-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [7,812 kB] Get:6 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 aspnetcore-targeting-pack-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [1,584 kB] Get:7 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet-apphost-pack-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [3,756 kB] Get:8 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet-targeting-pack-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [2,748 kB] Get:9 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet-templates-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [2,848 kB] Get:10 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet-sdk-7.0 amd64 7.0.105-0ubuntu1~22.04.1 [90.4 MB] Get:11 http://apt.pop-os.org/ubuntu jammy-updates/universe amd64 dotnet7 amd64 7.0.105-0ubuntu1~22.04.1 [28.4 kB] Fetched 135 MB in 13s (10.1 MB/s)
dpkg: dotnet-host: dependency problems, but removing anyway as you requested: dotnet-templates-6.0 depends on dotnet-host; however: Package dotnet-host is to be removed. Package dotnet-host-7.0 which provides dotnet-host is not installed. dotnet-hostfxr-6.0 depends on dotnet-host; however: Package dotnet-host is to be removed. Package dotnet-host-7.0 which provides dotnet-host is not installed.
(Reading database ... 309252 files and directories currently installed.) Removing dotnet-host (6.0.116-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-host-7.0. (Reading database ... 309186 files and directories currently installed.) Preparing to unpack .../dotnet-host-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-host-7.0 (7.0.105-0ubuntu1~22.04.1) ... dpkg: netstandard-targeting-pack-2.1: dependency problems, but removing anyway as you requested: dotnet-sdk-6.0 depends on netstandard-targeting-pack-2.1.
(Reading database ... 309251 files and directories currently installed.) Removing netstandard-targeting-pack-2.1 (6.0.116-0ubuntu1~22.04.1) ... Selecting previously unselected package netstandard-targeting-pack-2.1-7.0. (Reading database ... 309120 files and directories currently installed.) Preparing to unpack .../0-netstandard-targeting-pack-2.1-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking netstandard-targeting-pack-2.1-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-hostfxr-7.0. Preparing to unpack .../1-dotnet-hostfxr-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-hostfxr-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-runtime-7.0. Preparing to unpack .../2-dotnet-runtime-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-runtime-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package aspnetcore-runtime-7.0. Preparing to unpack .../3-aspnetcore-runtime-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking aspnetcore-runtime-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package aspnetcore-targeting-pack-7.0. Preparing to unpack .../4-aspnetcore-targeting-pack-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking aspnetcore-targeting-pack-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-apphost-pack-7.0. Preparing to unpack .../5-dotnet-apphost-pack-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-apphost-pack-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-targeting-pack-7.0. Preparing to unpack .../6-dotnet-targeting-pack-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-targeting-pack-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-templates-7.0. Preparing to unpack .../7-dotnet-templates-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-templates-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-sdk-7.0. Preparing to unpack .../8-dotnet-sdk-7.0_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-sdk-7.0 (7.0.105-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet7. Preparing to unpack .../9-dotnet7_7.0.105-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet7 (7.0.105-0ubuntu1~22.04.1) ... Setting up aspnetcore-targeting-pack-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet-host-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet-templates-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet-targeting-pack-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet-apphost-pack-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up netstandard-targeting-pack-2.1-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet-hostfxr-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet-runtime-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up aspnetcore-runtime-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet-sdk-7.0 (7.0.105-0ubuntu1~22.04.1) ... Setting up dotnet7 (7.0.105-0ubuntu1~22.04.1) ... Processing triggers for man-db (2.10.2-1) ...
DOTNET BUILD
popos@pop-os PSXPackager (master) $ dotnet build MSBuild version 17.4.3+7e646be43 for .NET Determining projects to restore... Restored /home/popos/PSXPackager/DiscUtils.Streams/DiscUtils.Streams.csproj (in 345 ms). Restored /home/popos/PSXPackager/Popstation/Popstation.csproj (in 156 ms). Restored /home/popos/PSXPackager/PSXPackager.Tests/PSXPackager.Tests.csproj (in 569 ms). Restored /home/popos/PSXPackager/Popstation.Database/Popstation.Database.csproj (in 101 ms). Restored /home/popos/PSXPackager/PSXPackagerGUI/PSXPackagerGUI.csproj (in 555 ms). Restored /home/popos/PSXPackager/DiscUtils.Iso9660/DiscUtils.Iso9660.csproj (in 6 ms). Restored /home/popos/PSXPackager/PSXPackager.Common/PSXPackager.Common.csproj (in 26 ms). Restored /home/popos/PSXPackager/DiscUtils.Core/DiscUtils.Core.csproj (in 8 ms). Restored /home/popos/PSXPackager/PSXPackager/PSXPackager.csproj (in 3.86 sec). /usr/lib/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1226,3): error MSB4019: The imported project "/usr/lib/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/lib/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk. [/home/popos/PSXPackager/PSXPackagerGUI/PSXPackagerGUI.csproj] DiscUtils.Streams -> /home/popos/PSXPackager/DiscUtils.Streams/bin/Debug/net6.0/DiscUtils.Streams.dll DiscUtils.Core -> /home/popos/PSXPackager/DiscUtils.Core/bin/Debug/net6.0/DiscUtils.Core.dll DiscUtils.Iso9660 -> /home/popos/PSXPackager/DiscUtils.Iso9660/bin/Debug/net6.0/DiscUtils.Iso9660.dll Popstation.Database -> /home/popos/PSXPackager/Popstation.Database/bin/Debug/net6.0/Popstation.Database.dll PSXPackager.Common -> /home/popos/PSXPackager/PSXPackager.Common/bin/Debug/net6.0/PSXPackager.Common.dll Popstation -> /home/popos/PSXPackager/Popstation/bin/Debug/net6.0/Popstation.dll PSXPackager.Tests -> /home/popos/PSXPackager/PSXPackager.Tests/bin/Debug/net6.0/PSXPackager.Tests.dll PSXPackager -> /home/popos/PSXPackager/PSXPackager/bin/Debug/net6.0/PSXPackager.dll
Build FAILED.
/usr/lib/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1226,3): error MSB4019: The imported project "/usr/lib/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" was not found. Confirm that the expression in the Import declaration ";/usr/lib/dotnet/sdk/7.0.105/Sdks/Microsoft.NET.Sdk/targets/../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.targets" is correct, and that the file exists on disk. [/home/popos/PSXPackager/PSXPackagerGUI/PSXPackagerGUI.csproj] 0 Warning(s) 1 Error(s)
Time Elapsed 00:00:13.41 popos@pop-os PSXPackager (master) $ dotnet --version 7.0.105
NOTES:
Same issue with dotnet6