SOLVED

Is It Possible To Use Publish Single File In .Net Core 3 With AppInstaller/MSIX?

%3CLINGO-SUB%20id%3D%22lingo-sub-1023513%22%20slang%3D%22en-US%22%3EIs%20It%20Possible%20To%20Use%20Publish%20Single%20File%20In%20.Net%20Core%203%20With%20AppInstaller%2FMSIX%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1023513%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20I%20work%20we%20have%20a%20WPF%20application%20that%20we%20converted%20to%20.NET%20Core%203.0%20and%20migrated%20to%20MSIX%2FAppInstaller%20from%20ClickOnce.%26nbsp%3B%20I%20noticed%20that%20.NET%20Core%203.0%20has%20the%20ability%20to%20publish%20as%20a%20single%20file.%20However%20if%20I%20add%20this%20setting%20to%20my%20.csproj%20for%20my%20WPF%20application%20and%2For%20make%20modifications%20to%20the%20.wapproj%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%3CITEMGROUP%3E%0A%20%20%20%20%3CPROJECTREFERENCE%20include%3D%22..%5C..%5CApplication%5CMyWpfDotNetCore3App.csproj%22%3E%0A%20%20%20%20%20%20%3CDESKTOPBRIDGESELFCONTAINED%3ETrue%3C%2FDESKTOPBRIDGESELFCONTAINED%3E%0A%20%20%20%20%20%20%3CDESKTOPBRIDGEIDENTIFIER%3Ewin-x64%3C%2FDESKTOPBRIDGEIDENTIFIER%3E%0A%20%20%20%20%20%20%3CPROPERTIES%3ESelfContained%3D%25(DesktopBridgeSelfContained)%3BRuntimeIdentifier%3D%25(DesktopBridgeIdentifier)%3BPublishReadyToRun%3Dtrue%3C%2FPROPERTIES%3E%0A%20%20%20%20%20%20%3CSKIPGETTARGETFRAMEWORKPROPERTIES%3ETrue%3C%2FSKIPGETTARGETFRAMEWORKPROPERTIES%3E%0A%20%20%20%20%3C%2FPROJECTREFERENCE%3E%0A%20%20%3C%2FITEMGROUP%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EAnd%20then%20publish%20or%20build%20the%20MSIX%20and%20AppInstaller%20files%20(either%20using%20VS%20or%20Azure%20Devops)%2C%20the%20MSIX%20bundle%20still%20contains%20all%20of%20the%20loose%20files%20for%20the%20app%20and%20its%20dependencies.%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20isn't%20really%20an%20issue%2C%20but%20I%20would%20just%20like%20to%20know%20if%20MSIX%2FAppInstaller%20currently%20supports%20this%20functionality%20or%20if%20I%20am%20doing%20something%20wrong%3F%20%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1023513%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Eappinstaller%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMSIX%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1031901%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20It%20Possible%20To%20Use%20Publish%20Single%20File%20In%20.Net%20Core%203%20With%20AppInstaller%2FMSIX%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1031901%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F450349%22%20target%3D%22_blank%22%3E%40StephenJeffreyWhite%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20using%20the%20Windows%20Application%20Packaging%20Project%20with%20.NET%20Core%203%20it%20creates%20an%20app-local%20.NET%20Core%20package%20which%20is%20fully%20self%20contained.%20The%20single%20file%2C%20is%20currently%20not%20supported.%20I've%20forwarded%20your%20feedback%20to%20the%20Visual%20Studio%20team.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECheers%2C%3C%2FP%3E%0A%3CP%3ETanaka%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040085%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20It%20Possible%20To%20Use%20Publish%20Single%20File%20In%20.Net%20Core%203%20With%20AppInstaller%2FMSIX%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040085%22%20slang%3D%22en-US%22%3EHi%20Tanaka%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20letting%20me%20know%20about%20this%2C%20I%20appreciate%20the%20response%20and%20clearing%20the%20air%20on%20this%20question.%20I%20hope%20you%20have%20a%20good%20weekend!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1109382%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20It%20Possible%20To%20Use%20Publish%20Single%20File%20In%20.Net%20Core%203%20With%20AppInstaller%2FMSIX%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1109382%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F450349%22%20target%3D%22_blank%22%3E%40StephenJeffreyWhite%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20also%20try%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fpartners%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Epartner%20solutions%3C%2FA%3E%2C%20like%20our%20%3CA%20href%3D%22https%3A%2F%2Fwww.advancedinstaller.com%2Fvisual-studio-extension.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVS%20extension%3C%2FA%3E%20which%20can%20build%20an%20MSIX%20and%20MSI%20from%20the%20same%20project%2C%20if%20you%20need%20to%20target%20different%20users.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20extension%20also%20supports%20debugging%20apps%20inside%20the%20msix%20container.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi,

 

Where I work we have a WPF application that we converted to .NET Core 3.0 and migrated to MSIX/AppInstaller from ClickOnce.  I noticed that .NET Core 3.0 has the ability to publish as a single file. However if I add this setting to my .csproj for my WPF application and/or make modifications to the .wapproj:

 

 

  <ItemGroup>
    <ProjectReference Include="..\..\Application\MyWpfDotNetCore3App.csproj">
      <DesktopBridgeSelfContained>True</DesktopBridgeSelfContained>
      <DesktopBridgeIdentifier>win-x64</DesktopBridgeIdentifier>
      <Properties>SelfContained=%(DesktopBridgeSelfContained);RuntimeIdentifier=%(DesktopBridgeIdentifier);PublishReadyToRun=true</Properties>
      <SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
    </ProjectReference>
  </ItemGroup>

 

 
And then publish or build the MSIX and AppInstaller files (either using VS or Azure Devops), the MSIX bundle still contains all of the loose files for the app and its dependencies.

This isn't really an issue, but I would just like to know if MSIX/AppInstaller currently supports this functionality or if I am doing something wrong?
2 Replies
Highlighted
Best Response confirmed by StephenJeffreyWhite (Occasional Contributor)
Solution

Hi @StephenJeffreyWhite 

 

When using the Windows Application Packaging Project with .NET Core 3 it creates an app-local .NET Core package which is fully self contained. The single file, is currently not supported. I've forwarded your feedback to the Visual Studio team.

 

Cheers,

Tanaka 

Highlighted
Hi Tanaka,

Thanks for letting me know about this, I appreciate the response and clearing the air on this question. I hope you have a good weekend!