How To Publish a Single File .NET Application

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ย. 2024

ความคิดเห็น • 61

  • @trader_iks
    @trader_iks 2 ปีที่แล้ว +13

    "Hello World!" - 60 MB... Good xD)

  • @livvy94
    @livvy94 3 ปีที่แล้ว +39

    For future reference:
    *dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=true --output "C:\yourFolderPathHere"*

    • @jabrielboy8863
      @jabrielboy8863 3 หลายเดือนก่อน

      and I love you for that

  • @conwaydante4155
    @conwaydante4155 3 ปีที่แล้ว +3

    I can't wait for this self-paced course to drop so I can get after it!

  • @shanecorthum5060
    @shanecorthum5060 3 ปีที่แล้ว +1

    The real shane is back

  • @Maladringe666
    @Maladringe666 3 ปีที่แล้ว +10

    Hey this was able to be done a while before .net 5. you did need .net installed on the computer however.
    Single command line to run from command prompt for visual studio developer
    dotnet publish -r win-x64 -p:PublishSingleFile=True --self-contained false

    • @CoderFoundry
      @CoderFoundry  3 ปีที่แล้ว +2

      Yeah with .net Core it was possible. The final version we showed gives you everything you need to run the app.

    • @paulsonhanel6369
      @paulsonhanel6369 3 ปีที่แล้ว

      with this version does it also increase the file size a lot ?

  • @iandrake4683
    @iandrake4683 3 ปีที่แล้ว

    I remember using Thinstall 15 years ago to do this. Glad MS is catching on.

  • @thedduck
    @thedduck 3 ปีที่แล้ว +1

    Bruh I just noticed the two framed Marvel comic front cover poster in the background.. noice!! 😄

    • @CoderFoundry
      @CoderFoundry  3 ปีที่แล้ว

      Thanks for noticing. I love Marvel!

  • @paulsonhanel6369
    @paulsonhanel6369 3 ปีที่แล้ว +2

    This is awesome! A question though: what would the tag be for adding an image into the single exe file in the command window? (if this is where you could do such)

  • @KATalyzt_
    @KATalyzt_ ปีที่แล้ว +1

    It generates 3 files "Setup.exe", "appname.application" and the same folder as you "Application Files" but never generates the exe "appname.exe".... If I'm not mistaken, I followed the steps to the letter, I don't understand why it doesn't work for me :(

  • @Dharokko17
    @Dharokko17 2 ปีที่แล้ว

    Thx for this easy sigle build guide

  • @samuelcatlow
    @samuelcatlow 3 ปีที่แล้ว +1

    I just had this question today. 🤣

  • @siddiqhabib9627
    @siddiqhabib9627 2 ปีที่แล้ว

    Thank you, for sharing the knowledge.

  • @mauricepheyton1386
    @mauricepheyton1386 3 ปีที่แล้ว +1

    Nice video! Love it 👌

  • @landonmackey1091
    @landonmackey1091 3 ปีที่แล้ว

    How do we have the exact same desktop wallpaper? My coding career must be on a good trajectory

  • @dabalciunas
    @dabalciunas 2 ปีที่แล้ว +1

    How to publish single-file x64 windows forms?

  • @alantinoalantonio
    @alantinoalantonio 3 ปีที่แล้ว

    Bobby, how will the course help after you get hired? Does it help with transitioning from junior to mid-senior level developer? Sorry for the simple q's. Im completely new.

    • @CoderFoundry
      @CoderFoundry  3 ปีที่แล้ว +2

      Our platform will continue to add new ways to build applications. For example this fall we will add React and Blazor to the platform. In Jan 2022. We will release the .net 6 versions of our apps and the new .Net Maui! This is used to build cross platform applications from IOS, Android to native Desktop apps! So as you grow you can come to use to learn new things that help you as your career progresses.

    • @alantinoalantonio
      @alantinoalantonio 3 ปีที่แล้ว

      @@CoderFoundry excellent! Thank you and everyone at CF! Looking forward to a new career!

  • @_crowdhead
    @_crowdhead 2 ปีที่แล้ว

    How to do this, a framework-independent publication but with a smaller size?

  • @Eagles_Eye
    @Eagles_Eye 2 ปีที่แล้ว

    help, ive used visual studio for a while now,
    i just created a new program and i try to publish it but its forcing me to do it online?? and people have to use disc / download?
    i cant make an EXE?

  • @KearlHat
    @KearlHat 3 ปีที่แล้ว

    Thanks for "publishing" this ;D

  • @maxalm3318
    @maxalm3318 8 หลายเดือนก่อน

    thank you so much

  • @GameOver-ge2hr
    @GameOver-ge2hr 2 ปีที่แล้ว +4

    2022 it's not working :(

  • @sungjinkim7730
    @sungjinkim7730 7 หลายเดือนก่อน

    my lord

  • @noahyannis2465
    @noahyannis2465 5 หลายเดือนก่อน

    Danke!

    • @CoderFoundry
      @CoderFoundry  5 หลายเดือนก่อน

      Thanks for the Super Thanks! Much appreciated ❤

  • @HashimWarren
    @HashimWarren 3 ปีที่แล้ว +2

    Jason!

  • @Cloud-1983
    @Cloud-1983 3 ปีที่แล้ว

    It works fine with a console application, but it doesnt work in a wpf project. The error message says, that it need a "RuntimeIdentifier". How can i solve this problem?

    • @Cloud-1983
      @Cloud-1983 3 ปีที่แล้ว +1

      I think, i solved this problem: I have to write: dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:RuntimeIdentifiers=win-x64 --output "C:\Temporary\RealSingleFileDeploy"

  • @regal_7877
    @regal_7877 2 ปีที่แล้ว

    Don't know why but i don't get the same "publish" wizard as yours. Completely different and lacking almost all the features shown here. Super frustrating. I'm using .NET Framework for my app instead of .NET Core, and am on VS 2022

    • @CoderFoundry
      @CoderFoundry  2 ปีที่แล้ว

      Pretty sure it's the framework version.

    • @rayouu.3532
      @rayouu.3532 2 ปีที่แล้ว

      @@CoderFoundry what is your frmwork version?

  • @zerosandones7547
    @zerosandones7547 3 ปีที่แล้ว

    can we do this with wpf with sql server as a database?

  • @deepakbhagat811
    @deepakbhagat811 3 ปีที่แล้ว +3

    can this single file exe be able to run, on other os where dotnet runtime is not installed?

    • @CoderFoundry
      @CoderFoundry  3 ปีที่แล้ว +5

      Yes. .net is cross platform. You have to choose your target os during the build. .net 6 released later this year will make cross platform desktop apps a reality as well.

  • @ozzu2000
    @ozzu2000 3 ปีที่แล้ว

    Awesome! Can you do the same for a Windows Forms application?

  • @paulsonhanel6369
    @paulsonhanel6369 3 ปีที่แล้ว

    also a 3MB file goes to 150MB, is that normal ??? it is a windows forms application.

    • @Saleh07BR
      @Saleh07BR 2 ปีที่แล้ว

      Yes if it contains pictures or embedded ui

    • @paulsonhanel6369
      @paulsonhanel6369 2 ปีที่แล้ว +1

      @@Saleh07BR I figured out it was dotnet. If u set self contained to false then it relys on OS for the dotnet stuff

    • @Saleh07BR
      @Saleh07BR 2 ปีที่แล้ว

      @@paulsonhanel6369 weird

  • @hdstudio1875
    @hdstudio1875 2 ปีที่แล้ว +1

    This single file is not platform independent.

  • @zerosandones7547
    @zerosandones7547 3 ปีที่แล้ว

    does anyone know how to do this with a service-based database?

  • @ehabalborm2295
    @ehabalborm2295 2 ปีที่แล้ว

    error "Specify a project or solution file"

  • @hamidmohseni9169
    @hamidmohseni9169 ปีที่แล้ว

    tanx mean