Publish .net core console App as FDD not an option?
I have multiple small helper console apps written in C# using .net core. When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it. This makes so the output includes runtimes which I do not need.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
I have tried to update the .net core SDK and app to 2.2, which did not give me more options and Google is no help either.
Following is a csproj of one of the console apps:
.csproj file
Following is my publish options in VS 2017:
publish options
I have searched google for countless hours trying to find a solution. But every solution I have tried still includes the runtimes when publishing.
So this is my last resort and really hope that someone here has a solution.
.net publishing
migrated from superuser.com Feb 13 at 6:54
This question came from our site for computer enthusiasts and power users.
add a comment |
I have multiple small helper console apps written in C# using .net core. When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it. This makes so the output includes runtimes which I do not need.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
I have tried to update the .net core SDK and app to 2.2, which did not give me more options and Google is no help either.
Following is a csproj of one of the console apps:
.csproj file
Following is my publish options in VS 2017:
publish options
I have searched google for countless hours trying to find a solution. But every solution I have tried still includes the runtimes when publishing.
So this is my last resort and really hope that someone here has a solution.
.net publishing
migrated from superuser.com Feb 13 at 6:54
This question came from our site for computer enthusiasts and power users.
add a comment |
I have multiple small helper console apps written in C# using .net core. When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it. This makes so the output includes runtimes which I do not need.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
I have tried to update the .net core SDK and app to 2.2, which did not give me more options and Google is no help either.
Following is a csproj of one of the console apps:
.csproj file
Following is my publish options in VS 2017:
publish options
I have searched google for countless hours trying to find a solution. But every solution I have tried still includes the runtimes when publishing.
So this is my last resort and really hope that someone here has a solution.
.net publishing
I have multiple small helper console apps written in C# using .net core. When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it. This makes so the output includes runtimes which I do not need.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
I have tried to update the .net core SDK and app to 2.2, which did not give me more options and Google is no help either.
Following is a csproj of one of the console apps:
.csproj file
Following is my publish options in VS 2017:
publish options
I have searched google for countless hours trying to find a solution. But every solution I have tried still includes the runtimes when publishing.
So this is my last resort and really hope that someone here has a solution.
.net publishing
.net publishing
asked Feb 3 at 16:29
KlatzenKlatzen
156
156
migrated from superuser.com Feb 13 at 6:54
This question came from our site for computer enthusiasts and power users.
migrated from superuser.com Feb 13 at 6:54
This question came from our site for computer enthusiasts and power users.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it.
Portable is (as far as I am aware) the Framework-dependent deployment (FDD) option in Visual Studio 2017.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
This official Microsoft documentation on publishing .NET Core apps with the CLI clearly identifies dotnet publish -c Release as the FDD option for the command line.
[T]he output includes runtimes which I do not need.
A bare-bones "Hello World" console application (dotnet new console) created in .NET Core 2.2 and published with dotnet publish -c Release produces four files in its publish folder (e.g. appname.deps.json, appname.dll, appname.pdb and appname.runtimeconfig.json).
In contrast, a fully Self-contained deployment (SCD) of the same default "Hello World" console application published with dotnet publish -c Release -r <RID> --self-contained true (RIDs listed here) has approximately 217+ files (212-non program .dlls) and is ~66mb.
I am uncertain if you mean these 212 .dlls when you say you have unnecessary runtimes. But if these aren't what you mean, then as a suggestion, you may wish to look into your own code (or the Enums and SharedHelpers projects, for example) for more insight into this issue.
Another option might be to simply de-duplicate any runtimes produced (e.g. use the same runtimes for multiple applications, as applicable).
Hello Anaksunaman. The problem is really that when I use the standard command "dotnet publish -c Release" it still publishes the app as an SCD, with the runtimes which I don't want. I simply cannot get it to just publish as an FDD. The enums / sharehelpers projects are just class libraries so the problem should not be there.
– Klatzen
Feb 4 at 8:01
add a comment |
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54664249%2fpublish-net-core-console-app-as-fdd-not-an-option%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it.
Portable is (as far as I am aware) the Framework-dependent deployment (FDD) option in Visual Studio 2017.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
This official Microsoft documentation on publishing .NET Core apps with the CLI clearly identifies dotnet publish -c Release as the FDD option for the command line.
[T]he output includes runtimes which I do not need.
A bare-bones "Hello World" console application (dotnet new console) created in .NET Core 2.2 and published with dotnet publish -c Release produces four files in its publish folder (e.g. appname.deps.json, appname.dll, appname.pdb and appname.runtimeconfig.json).
In contrast, a fully Self-contained deployment (SCD) of the same default "Hello World" console application published with dotnet publish -c Release -r <RID> --self-contained true (RIDs listed here) has approximately 217+ files (212-non program .dlls) and is ~66mb.
I am uncertain if you mean these 212 .dlls when you say you have unnecessary runtimes. But if these aren't what you mean, then as a suggestion, you may wish to look into your own code (or the Enums and SharedHelpers projects, for example) for more insight into this issue.
Another option might be to simply de-duplicate any runtimes produced (e.g. use the same runtimes for multiple applications, as applicable).
Hello Anaksunaman. The problem is really that when I use the standard command "dotnet publish -c Release" it still publishes the app as an SCD, with the runtimes which I don't want. I simply cannot get it to just publish as an FDD. The enums / sharehelpers projects are just class libraries so the problem should not be there.
– Klatzen
Feb 4 at 8:01
add a comment |
When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it.
Portable is (as far as I am aware) the Framework-dependent deployment (FDD) option in Visual Studio 2017.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
This official Microsoft documentation on publishing .NET Core apps with the CLI clearly identifies dotnet publish -c Release as the FDD option for the command line.
[T]he output includes runtimes which I do not need.
A bare-bones "Hello World" console application (dotnet new console) created in .NET Core 2.2 and published with dotnet publish -c Release produces four files in its publish folder (e.g. appname.deps.json, appname.dll, appname.pdb and appname.runtimeconfig.json).
In contrast, a fully Self-contained deployment (SCD) of the same default "Hello World" console application published with dotnet publish -c Release -r <RID> --self-contained true (RIDs listed here) has approximately 217+ files (212-non program .dlls) and is ~66mb.
I am uncertain if you mean these 212 .dlls when you say you have unnecessary runtimes. But if these aren't what you mean, then as a suggestion, you may wish to look into your own code (or the Enums and SharedHelpers projects, for example) for more insight into this issue.
Another option might be to simply de-duplicate any runtimes produced (e.g. use the same runtimes for multiple applications, as applicable).
Hello Anaksunaman. The problem is really that when I use the standard command "dotnet publish -c Release" it still publishes the app as an SCD, with the runtimes which I don't want. I simply cannot get it to just publish as an FDD. The enums / sharehelpers projects are just class libraries so the problem should not be there.
– Klatzen
Feb 4 at 8:01
add a comment |
When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it.
Portable is (as far as I am aware) the Framework-dependent deployment (FDD) option in Visual Studio 2017.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
This official Microsoft documentation on publishing .NET Core apps with the CLI clearly identifies dotnet publish -c Release as the FDD option for the command line.
[T]he output includes runtimes which I do not need.
A bare-bones "Hello World" console application (dotnet new console) created in .NET Core 2.2 and published with dotnet publish -c Release produces four files in its publish folder (e.g. appname.deps.json, appname.dll, appname.pdb and appname.runtimeconfig.json).
In contrast, a fully Self-contained deployment (SCD) of the same default "Hello World" console application published with dotnet publish -c Release -r <RID> --self-contained true (RIDs listed here) has approximately 217+ files (212-non program .dlls) and is ~66mb.
I am uncertain if you mean these 212 .dlls when you say you have unnecessary runtimes. But if these aren't what you mean, then as a suggestion, you may wish to look into your own code (or the Enums and SharedHelpers projects, for example) for more insight into this issue.
Another option might be to simply de-duplicate any runtimes produced (e.g. use the same runtimes for multiple applications, as applicable).
When I try to publish them through Visual Studio I only have the option "Portable" in target runtime. I cannot deselect it.
Portable is (as far as I am aware) the Framework-dependent deployment (FDD) option in Visual Studio 2017.
If I try to use the CLI to publish running only the "dotnet publish -c Release" command it still includes the runtimes.
This official Microsoft documentation on publishing .NET Core apps with the CLI clearly identifies dotnet publish -c Release as the FDD option for the command line.
[T]he output includes runtimes which I do not need.
A bare-bones "Hello World" console application (dotnet new console) created in .NET Core 2.2 and published with dotnet publish -c Release produces four files in its publish folder (e.g. appname.deps.json, appname.dll, appname.pdb and appname.runtimeconfig.json).
In contrast, a fully Self-contained deployment (SCD) of the same default "Hello World" console application published with dotnet publish -c Release -r <RID> --self-contained true (RIDs listed here) has approximately 217+ files (212-non program .dlls) and is ~66mb.
I am uncertain if you mean these 212 .dlls when you say you have unnecessary runtimes. But if these aren't what you mean, then as a suggestion, you may wish to look into your own code (or the Enums and SharedHelpers projects, for example) for more insight into this issue.
Another option might be to simply de-duplicate any runtimes produced (e.g. use the same runtimes for multiple applications, as applicable).
answered Feb 3 at 23:00
AnaksunamanAnaksunaman
20636
20636
Hello Anaksunaman. The problem is really that when I use the standard command "dotnet publish -c Release" it still publishes the app as an SCD, with the runtimes which I don't want. I simply cannot get it to just publish as an FDD. The enums / sharehelpers projects are just class libraries so the problem should not be there.
– Klatzen
Feb 4 at 8:01
add a comment |
Hello Anaksunaman. The problem is really that when I use the standard command "dotnet publish -c Release" it still publishes the app as an SCD, with the runtimes which I don't want. I simply cannot get it to just publish as an FDD. The enums / sharehelpers projects are just class libraries so the problem should not be there.
– Klatzen
Feb 4 at 8:01
Hello Anaksunaman. The problem is really that when I use the standard command "dotnet publish -c Release" it still publishes the app as an SCD, with the runtimes which I don't want. I simply cannot get it to just publish as an FDD. The enums / sharehelpers projects are just class libraries so the problem should not be there.
– Klatzen
Feb 4 at 8:01
Hello Anaksunaman. The problem is really that when I use the standard command "dotnet publish -c Release" it still publishes the app as an SCD, with the runtimes which I don't want. I simply cannot get it to just publish as an FDD. The enums / sharehelpers projects are just class libraries so the problem should not be there.
– Klatzen
Feb 4 at 8:01
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54664249%2fpublish-net-core-console-app-as-fdd-not-an-option%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
