C
C#12mo ago
Haxo

Publish fails with --self-contained/--sc switch

What I'm doing wrong?
No description
28 Replies
kailash T.
kailash T.12mo ago
Install .net core
Haxo
HaxoOP12mo ago
it is installed
No description
ZacharyPatten
ZacharyPatten12mo ago
please share dotnet --info also, I assume this is from VSC? if you use VS you will have an easier time
Haxo
HaxoOP12mo ago
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6a1e483a

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100\

.NET workloads installed:
Workload version: 8.0.100-manifests.6a1e483a
There are no installed workloads to display.

Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71

.NET SDKs installed:
6.0.417 [C:\Program Files\dotnet\sdk]
7.0.401 [C:\Program Files\dotnet\sdk]
8.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set
.NET SDK:
Version: 8.0.100
Commit: 57efcf1350
Workload version: 8.0.100-manifests.6a1e483a

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.100\

.NET workloads installed:
Workload version: 8.0.100-manifests.6a1e483a
There are no installed workloads to display.

Host:
Version: 8.0.0
Architecture: x64
Commit: 5535e31a71

.NET SDKs installed:
6.0.417 [C:\Program Files\dotnet\sdk]
7.0.401 [C:\Program Files\dotnet\sdk]
8.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set
global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
yes
ZacharyPatten
ZacharyPatten12mo ago
can you share your .csproj?
Haxo
HaxoOP12mo ago
Haxo
HaxoOP12mo ago
should I just copy paste the content of file here so you don't have to download it?
ZacharyPatten
ZacharyPatten12mo ago
have you restarted VSC since you installed .NET 8?
Haxo
HaxoOP12mo ago
um... I used that command outside IDE (in cmd) should I do it inside IDE?
ZacharyPatten
ZacharyPatten12mo ago
no. what I'm asking is have you had VSC running since before you installed .NET 8? because if you have not closed VSC since you did that install, it may just need to be restarted (try restarting VSC)
Haxo
HaxoOP12mo ago
nope. I had VSC closed while installing
ZacharyPatten
ZacharyPatten12mo ago
well crap. I'm not seeing the issue then. is the code open source? if yes link it please. if not, because I don't see the issue yet.... my best advice would be to install VS
Haxo
HaxoOP12mo ago
it is only on my computer. I'm sure there's no issue with code cuz it works when I don't use --sc switch but if you wish i can send code here
Haxo
HaxoOP12mo ago
Haxo
HaxoOP12mo ago
i might be wrong idk
ZacharyPatten
ZacharyPatten12mo ago
I was able to run the command on my end and it worked even with --sc. sorry I don't see the issue yet. Hopefully someone else will spot the issue or have advice. As mentioned, if you install VS that will probably fix your issue.
Haxo
HaxoOP12mo ago
ok I will try to build it on vs. Thanks for trying. have nice day
ZacharyPatten
ZacharyPatten12mo ago
good luck
Haxo
HaxoOP12mo ago
the same error in vs
No description
ZacharyPatten
ZacharyPatten12mo ago
did you install the .NET desktop develpoment workload?
ZacharyPatten
ZacharyPatten12mo ago
No description
ZacharyPatten
ZacharyPatten12mo ago
when you installed VS? you can add it by launching the Visual Studio Installer and clicking "modify" on your installed version of VS
Haxo
HaxoOP12mo ago
No description
ZacharyPatten
ZacharyPatten12mo ago
and still error? dang... not sure. sorry. hopefully someone else will chime in
Haxo
HaxoOP12mo ago
maybe it about these
No description
SinFluxx
SinFluxx12mo ago
Have you checked the possible solutions for that error code? https://learn.microsoft.com/en-gb/nuget/reference/errors-and-warnings/nu1100
NuGet Error NU1100
NU1100 error code
Haxo
HaxoOP12mo ago
I solved the problem nvm. I just touched something that I didn't understood and that was the issue
Want results from more Discord servers?
Add your server