Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

--self-contained false is ignored when PublishNativeAot=true #31477

Closed
richlander opened this issue Mar 28, 2023 · 2 comments
Closed

--self-contained false is ignored when PublishNativeAot=true #31477

richlander opened this issue Mar 28, 2023 · 2 comments
Labels
untriaged Request triage from a team member

Comments

@richlander
Copy link
Member

richlander commented Mar 28, 2023

This is what I see.

$  dotnet --version
7.0.202
$ cat /etc/os-release | head -n 1
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
$ rm -rf bin obj
$ dotnet publish /p:PublishNativeAot=true --self-contained false
MSBuild version 17.5.0+6f08c67f3 for .NET
  Determining projects to restore...
  Restored /app/app.csproj (in 72 ms).
  app -> /app/bin/Debug/net7.0/app.dll
  app -> /app/bin/Debug/net7.0/publish/
$ ls -l /app/bin/Debug/net7.0/publish/
total 208
-rwxr-xr-x 1 root root 181016 Mar 28 02:37 app
-rw-r--r-- 1 root root    379 Mar 28 02:37 app.deps.json
-rw-r--r-- 1 root root   4608 Mar 28 02:37 app.dll
-rw-r--r-- 1 root root  10460 Mar 28 02:37 app.pdb
-rw-r--r-- 1 root root    139 Mar 28 02:37 app.runtimeconfig.json
$ rm -rf bin obj
$ dotnet publish /p:PublishNativeAot=true
MSBuild version 17.5.0+6f08c67f3 for .NET
  Determining projects to restore...
  Restored /app/app.csproj (in 78 ms).
  app -> /app/bin/Debug/net7.0/app.dll
  app -> /app/bin/Debug/net7.0/publish/
$ ls -l /app/bin/Debug/net7.0/publish/
total 208
-rwxr-xr-x 1 root root 181016 Mar 28 02:37 app
-rw-r--r-- 1 root root    379 Mar 28 02:37 app.deps.json
-rw-r--r-- 1 root root   4608 Mar 28 02:37 app.dll
-rw-r--r-- 1 root root  10460 Mar 28 02:37 app.pdb
-rw-r--r-- 1 root root    139 Mar 28 02:37 app.runtimeconfig.json
$

I would expect a different result or error (like with PublishTrimmed=true) when --self-contained false.

I'm using the console template with the .NET 7 SDK.

Related to #30104

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Mar 28, 2023
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@richlander
Copy link
Member Author

I was wrong.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant