How do I hide/integrate dll files using Visual Studio Installer? - wpf

Using Visual Studio Installer, I created the .msi file for the WPF project and the class library for the custom action. Everything works fine, but there are many dll assembly files associated with the project in C:\Program Files (x86)\Publisher\Program.
I applied Fody.Costura to WPF project after researching when building the WPF project. Therefore, it is working properly in the release/debug folder of the WPF project. When I tried adding a WPF project with 'project out...' to Visual Studio Installer, regardless of Fody.Costura, dlls appeared. On the client-side, there are still dlls. Can they be hidden under the program files folder?
FYI. WPF project is built on .NET Framework 4.8.

I found a way to hide dll files using the Hidden property. By setting this property to 'True', DLL files become hidden but still exist. If you have other ways, feel free to leave your comment.

Related

Using Mahapps.Metro Flyouts in Elementhost

I'm writing a SolidWorks addin, where I can host WPF only within an Winforms Elementhost. Now I want to use a Flyout from Mahapps.Metro, which depens on being hosted in a MetroWindow. Is there any way I can use the Flyout from within a WPF Usercontrol? I'm using .NET 4.6.2, Mahapps.Metro 1.6 and SolidWorks 2018.
Looks like the Information I found here and here is obsolete. I just installed the NuGet Packages Mahapps.Metro and Mahapps.Metro.Iconpacks and everything is working as expected.
If someone is trying to do it in a SolidWorks Addin too, make sure to manually load a new version of System.Windows.Interactivity, because Solid is loading an old version from the application base directory, which is not compatible with Mahapps.Metro!
Be very careful when you are working with .NET add-ins for solidworks. If your application uses some third-party UI lib, you need to copy those referenced assemblies to the host application (sldworks.exe) directory. For some reason, the domain application is that of hosting exe and not the dll. CLR will look for references in the sldworks.exe's directory and it doesn't find, the application throw some nasty exception that will crash your SOLIDWORKS.

Merging multiple dlls into single dll in a wpf application

I am looking for the solution for merging multiple dlls into a single dll for a wpf application. Is there an utility or some way to do this?
I already checked with ilmerge and costura fody where ilmerge don't support wpf dlls and costura embed dlls into an exe not into dll.

VS 2013 Ultimate: Add new Elements, Windows Form missing

When creating a new project I can select a new Windows Forms Project. It will open me a new project with a new windows form. When right clicking my opened project and going for add => Windows Form it will only open the "new element" mask, where Windows Forms, WPF and other templates are missing.
I already tried Visual Studio C# Can't make new windows form project devenv /installvstemplates, but it didn't work out telling me the templates were missing.
The following files were passed with the commandline:
\installvtemplates
These files were not found and could not be load.
What do I have to do, to get my WinForm templates back and where can I configure those? I can not just reinstall Visual Studio 2013 Ultimate, because I do not have an installation medium nor they key (Like nobody in my company can tell where to find it).
In the screenshot below you can see the mask, where I used to have a lot more templates. In this case we only have Inherited Forms and Inherited User Control as avaliable templates.
This is what I get when I go for new project, Windows Forms is avaliable here.
( Win Forms Objects not avaliable )
The template files are avaliable at C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\VisualBasic so I am pretty sure it has to be an option somewhere in the settings. Any ideas?
After a few hours of trying I found a solution myself. It might not be the official way, but it seems to be working. I did the following steps:
Go to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\VisualBasic and check if the templates are avaliable
If they are avaliable copy the directory Windows Forms
Paste the copied directory to C:\Users\%USERNAME%\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual Basic
Start Visual Studio
Go into a project and try to add a new element. This step will take a while loading. I think visual studio now detects the new templates in your documents folder and refreshes all templates.
When it has finished loading you will see almost all templates twice. That's good news!
Close Visual Studio and delete the directory in C:\Users\%USERNAME%\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual Basic\ we just pasted.
Restart Visual Studio
Profit
Tested on Windows 10 / Visual Studio 2013 Ultimate

How can I localize strings in Xaml files for WPFLocalizationExtension

I'm using WPFLocalizationExtension to localize my WPF application. I'm very happy with the run-time behavior, but extracting string properties manually to ResX files is very tedious.
Is there a way to automate this? I used to have a tool called Xaml Localizer Addin that did exactly this (screenshot below), but it only works with VS2008 and I couldn't find a newer version.
If you're using visual studio 2010, you may want to check out Xaml Localization Tool. It's an extension for vs2010 to localize xaml application, and generate .resx files from xaml.
Another idea is to download XAML Localize Source Code and build your own visual studio add-in or tool that is compatible with your version of .net.

putting some WPF windows in DLL

I have a WPF project, and there is one dialog that I will re-use in different applications. I want to put it in its own DLL, but when I use the New Project wizard in Visual Studio 2008 it only lets me create WinForm C# DLLs. Am I missing something?
You should be able to create a WPF Custom Control Library project.
To add to this, this particular project does not actually show up unless you specifically choose Classic Desktop projects.

Resources