MSIX Include Additional Required Files - winforms

I have a simple WinForms app that I'm trying to package with MSIX. The app itself requires additional files that when I build the MSIX App Project doesn't copy/include.
Specifically this LIBVLC folder that gets included during the WinForms app build itself.
If I manually copy that folder over into the AppX build folder, everything works. Obviously I'm trying to automate including that folder.
Folder manually copied over in screenshot below:
How can I accomplish this? GitHub minimal repo:
https://github.com/aherrick/MSIXWinFormsLIBVLC

I suspect that this line is your issue : https://github.com/aherrick/MSIXWinFormsLIBVLC/blob/0e717828a16e796a7a27e415cf45d33a50327da9/MSIXWinFormsLIBVLC.AppPackage/MSIXWinFormsLIBVLC.AppPackage.wapproj#L80
The nuget package isn't really well understood by the build tools as those are native files that we collect "before build". It seems to cause issues when a project references a project that references the nuget package, and the usual workaround is to reference the nuget package directly in the topmost project.
Is it possible to reference a nuget package in a .wapproj ?
If it isn't, that's an issue for this repository https://code.videolan.org/videolan/libvlc-nuget/ . Contributions welcome

Related

Where can I download RiaServices.msi nowadays?

Where can I download RiaServices.msi from the web, after Microsoft removed it?
I need to prepare a new virtual machine to host a legacy Silverlight application.
Thanks!
As far as I know, downloading ria.services separately may not be easy to find at the moment, you can use NuGet to install it.
After the hint from #Jiayao, I decided to forget about the RiaServices.msi installer and manually copy the necessary files to the target host machine, where the Silverlight app was published.
Luckily the files simply need to be copied to the silverlight "bin" folder.
The files I copied were:
System.ServiceModel.DomainServices.Client.dll
System.ServiceModel.DomainServices.Client.Web.dll
System.ServiceModel.DomainServices.Hosting.dll
System.ServiceModel.DomainServices.Server.dll
These libraries are available in the "lib" folder of riaservices.silverlight.4.2.0 and riaservices.server.4.2.0 NuGet packages. You can download the packages, rename the .nupkg files to .zip and extract them.
If I have the chance to compile the Silverlight application from the source, I plan to add these NuGet packages as dependencies of the project, so they can be normally deployed within the Silverlight application.

How to remove published package from the qooxdoo repository?

I've published a package to qooxdoo, but found that I want remove this.
What is the command to remove a package from the qooxdoo repository?
I was advised by the core team to add "(deprecated)" to the About section of the Github project that i wanted removed from the package system. See here for an example: https://github.com/sqville/sqv-qxthemes
Adding this successfully removed this project from qooxdoo.org's package browser site

Netbeans JSF - Creating executable JAR file

I'm working at the moment on an JSF Project project. Everything is working fine. Creating .war-file, deploying it.
What I actually want is, to create a executable JAR-file for a single Class. In this Class I have a Main-method that sends an email after executing it.
I the past I have worked with Eclipse. And that was very easy.
Now I am working with Netbeans. I have red a lot of posts with the information to clean and build the project. Next to that checking the .dist folder for the JAR-files.
I have either the .dist folder, or any JAR-files in my Project folder for that correlate file.
How can I easily create that JAR-file in Netbeans?
Assuming you are using a native NetBeans project rather than Maven:
The build artefact of a project is defined by it's project type. A JSB/Web project is always build into a WAR file.
If there is one class in your project that you want to put into a JAR file, the clean solution would be to create a new "Java" project with that class (as your class clearly has no dependencies to your Web Application this should work).
For such a project NetBeans will automatically create a runnable JAR file if you configure the main method.
In your JSF project you can simply include that project as a library. If you enable "Build projects on classpath", the jar will automatically be build when you build the web application.
Another approach would be to customize the Ant script NetBeans uses internally and add a target that builds your executable JAR file from that single class.
Details on how to customize the IDE generated Ant script can be found in the manual:
https://docs.oracle.com/netbeans/nb82/netbeans/NBDAG/create_japps.htm#CHDDAHEB

node_modules breaks build in Visual Studio

Working to add Angular (v4) to an existing ASP.NET MVC 4 application. One of the projects it has includes Selenium Web Driver which has a web.config file included.
node_modules\selenium-webdriver\lib\test\data\web.config
This folder is NOT included in the project but is in my web application folder
myapplication\node_modules
myapplication\Controllers
myapplication\Views
myapplication\web.config
etc...
The web.config in the selenium-webdriver folder causes the build to break with the following error:
It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS.
Pretty common error and easily fixed when it is your own mistake, but since this is a library I'm using I don't have control over the file. So my question is a bit leveled based on my research:
Can I make the "test" folder of selenium-webdriver go somewhere else?
Should my node_modules folder not be at the root of my web application?
In general.. how do I fix this?
install the rimraf package
npm install rimraf
then in package.json use rimraf command
'script': {
'postinstall': 'rimraf node_modules/**/web.config'
}
Please note that first time you will have to delete it manually, as the package is already installed and postinstall command will not run.
But for all your future installs + for your teammates, it will be taken care of automatically as postinstall command runs after every npm install
Please do read more about npm pre & post hooks
Its more of a work-around, but my making your node_modules folder hidden it won't show up in your solution explorer and Visual Studio will run your project as normal. As far as I could see, this doesn't affect running your web application.

Nuget Update is not working propelry

I want to update the Nuget packages used in the solution file and currently, I am using the following command to update the Nuget packages.
NuGet restore <projectPath> [options]
Reference: https://learn.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference#restore
If no solution file, packages.config, or project.json is found, NuGet gives an error.
Reference: https://learn.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference#remarks
But the problem is I am using the packages.ProjectName.Config instead of packages.config file.So the NuGet update is not properly working.
Note: Similarly if the folder contains multiple project and solution files the NuGet update is not working.
Please suggest how to overcome this issue?
Edit:
Initially I thought the packages.[projectname].config usage in my source is the reason for NuGet packages restoring but later I found that NuGet packages are not even properly restored with packages.config files.
I have more than solution and project file in my source, After deleting the other projects, The NuGet restore is working properly in my source.
Is having more than one solution file is the reason for Nuget not updating? Anyone faced the problems , Any help to overcome this issue will be useful.
Nuget restore requires a Visual Studio solution file, a packages.config file or a project.json file.
See the remarks for it's beavior.
Looks like you can't specify an arbitrary name but you should be able to accommodate your scenario as of NuGet 2.8. The project names just need to match the filenames - I don't imagine spaces are allowed.
NuGet release notes;
Individual packages.config Files for Different Platforms
When developing applications for multiple target platforms, it is common to have different project files for each of the respective build environments. It is also common to consume different NuGet packages in different project files, as packages have varying levels of support for different platforms. NuGet 2.8 provides improved support for this scenario by creating different packages.config files for different platform-specific project files.
Looks like ReactiveUI do this, so worth checking their repo;
ReactiveUI Github

Resources