How to fetch an asset folder in Flutter windows - flutter-windows

I used listAsync() to fetch files from an asset folder. It worked when I debugged the application on Windows in Android Studio. But when I run the application after building, I have an error because of listing the folder.
I expect to find a solution quickly.

Related

How to turn visual studio files into actual app that can be sent/ downloaded and run by another user?

I have a finished project with a bunch of different winform files. They are linked between eachother through a menu file. How do I go from having this project as a visual studio application file to an actual application, with customized icon and that can be opened by a user from another PC (which doesn't have Visual studio). I don't want to just zip them.
I didn't try anything and this might be a newbie question but what I expect is basically to have an actual app instead of a bunch of files.
When you compile the winforms project you get a bin folder and a Debug/Release folders inside.
A simple way to deliver the app is just copy the Debug folder that have the .exe and dll files to the dest PC.
The best way is to follow this guide:
https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-using-clickonce-folder?view=vs-2022
Or make an autoinstaller

VS2019-Generated Published App Package contains file locations on my computer

I am new to Xamarin and am trying to publish my application as a side loading package. I use VS2019 to publish the UWP application. The problem I have is that the AppInstaller file that Publish generates contains explicit references to folders on my computer. This, of course, works on my computer, but does not on anyone elses' computer. Here is an example from the AppInstaller file:
Uri="file:///c:/SpectrumApp/SpectrumApp.UWP.appinstaller"
I can write a powershell script to modify the App Installer file to contain the correct file path for a given system, but that seems like a workaround to some basic thing that I am doing wrong with the Publish capability built into VS2019.

UWP publish output always in test folder

Why is it that even though I have the build setting in Visual Studio set to Release everything I create within a side-loaded UWP distribution is placed within a folder with _test on the end? Is it because MS assumes a side-loaded app is always a test app?
I place my appxbundle files within AppCenter and I'm using AppCenter to distrubute our internal production apps to our internal employess using AppCenter.
Here is the main reason I'm even asking. I have tried to publish an appxbundle to the AppCenter for my employees to download and install. Problem is, these target laptops don't have the Microsoft Store installed (don't ask) so the appxbundle won't auto-install. So, when I try to install via a powershell script I can clearly see that the dependency for Microsoft.NET.Native.Runtime.2.0 isn't being met and the install fails. When I extract the appxbundle for my app I see no dependencies are included. But, if I explore the root folder that my app is published to, I can find the Microsoft.NET.Native.Runtime.2.0 is there, it's just not making it into the appxbundle file. In order to install this app on these laptops I have to enable developer mode, I have to zip up the entire published folder, send this zip file to the user, have them extract it, then have them run the powershell script within the root folder. This powershell script installs my appxbundle, cert, and includes all dependencies.
I read HERE the following:
App Center always generates an app bundle. However, Debug builds are
not meant to be used for sideloading. ...and the provided .appxbundle
files in the Test folder do not contain required dependencies.
Since my dependencies are not included within the appxbundle and based on what Microsoft said, it appears my app is being generated as a Debug build even though I'm selecting Release within my IDE before publishing.
Sadly it's hard-coded in the msbuild file "Microsoft.AppxPackage.Targets"
Location for VS2019 C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\AppxPackage\Microsoft.AppxPackage.Targets
Or as MSFT UWP Engineer Nico Zhu said in the comments: "it is by design"
See also: Customizing Visual Studio MSIX packaging project output

Can I exclude/ignore files from Multi-Device Hybrid App build? (In order to prevent EBUSY error when building)

I'm getting this error when building my Multi-Device Hybrid App.
EXEC : error : EBUSY, resource busy or locked 'C:\path\to\project\bld\Debug\www\.svn\wc.db'
Suspected cause:
From what I can gather, when the Multi-Device Hybrid Apps Visual Studio extension builds the app it seems to grab all files in the project directory (except for some specific files/folders e.g. bld/bin directories and the .jsproj file) and add them to the package. That's ok, but not ideal, it really should only be grabbing the files in the VS project. The problem I'm experiencing is becuase it's grabbing my SVN .db file and adding it to the package, TortoiseSVN status cache then picks up this file and locks it - resulting in my error.
This is my specific issue, but I believe others could experience similar issues if they have any other files in the directory that they don't want included in the app bundle. I'd suggest it could be fixed by somehow setting excluded files/folders from the build or by the build script not grabbing everything, only those files included in the visual studio project. I'm not sure how to request that, so hopefully the developers will see this post...
So, my question is: Does anyone know of any way to tell the Multi-Device Hybrid Apps Visual Studio extension build process (or vs-mda\vs-cli) to ignore certain files or folders?
Or, does anyone have any suggestions as to how to make SVN and this VS extension play nice?
Unfortunately Visual Studio includes all the files under project directory except bin\bld folder. Currently only simple workaround would be to keep the files which you want to be excluded from package outside project directory. You can add the file to solution explorer by using Add --> Existing Item --> Add as link in case you want the file to appear in solution explorer but not included for build or packaging.
it seems folder with test as its name will be considered differently, and it will be excluded from package.

How to publish console app into executable

When I publish my console app I get three files:
Application Files (Folder)
ClickOnce Application
setup
There has to be a way that gives me just a .exe that has everything the app needs to run within in.
I'm using Visual Studio 2010, and don't see any obvious options that would allow me to do this.
Note: Using the setup file appears to just make a shortcut to the ClickOnce Application that I already have.
Look in the bin directory of the application, it should have published an executable for you.

Resources