Why do strings not show in the event log for my custom log events? - .net-4.5

I am using the new .NET EventSource API from nuget. I have built my application, and installed the manifest and resource DLL using wevtutil.exe. My event log entries include the following text when I view them in Event Viewer:
The description for Event ID 1 from source XXXX cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
the message resource is present but the message is not found in the string/message table
The last part of the message seems especially notable: "the message resource is present but the message is not found in the string/message table."
Why is my resource DLL not working?

Eureka! I had installed the manifest wrongly, thinking that, of the two switches for wevtutil, one repeated the manifest filename and the other contained the DLL filename. Actually, both should refer to the DLL.
I'm now doing this in WiX using this markup:
<Component Id="etwManifest.man" Guid="*">
<File Id="File.etwManifest.man"
Source="$(var.Project.TargetDir)EventSource.Provider-Name.etwManifest.man"
KeyPath="yes" Vital="yes">
<util:EventManifest MessageFile="[#File.etwManifest.dll]"
ResourceFile="[#File.etwManifest.dll]" />
</File>
</Component>

Related

Wix not able to find the .NET 6 exe

I have a console application that has <TargetFramework>net6.0</TargetFramework>. I am trying to use the exe of this console application in the wix project for creating the setup as shown below:
<Component Id="_COMP_ConsoleApp_exe" Guid="{34407E06-98A0-4CF3-8021-F9533CFE537D}">
<File Id="_FILE_ConsoleApp_exe" Name="ConsoleApp.exe" KeyPath="yes" Source="$(var.ProjectSourceDir)\ConsoleApp.exe" />
</Component>
But during the build it gives the error "The system cannot find the file ..\Release\ConsoleApp.exe". The ConsoleApp.exe is getting created in the Release folder.
That error indicates the file is not in the location you specified. To debug, try putting the full path to the file on your computer in the File/#Source attribute. Once you know you have the right path, then try using BindPaths or, if you must, preprocessor variables to make the location more generic.
I expect you'll find the folder ..\Release\ is not the one you thought it was.
Note: the Name and KeyPath attributes are unnecessary as they will default to those values.

can't upload custom process template in Azure DevOps Server 2020

I'm trying to create a custom process template in Azure DevOps Server 2020. I'm using the on-premises XML process model. When I upload my custom process template I keep getting 'You can't update a system process' error.
These are the steps I took:
Downloaded the Agile system process by going to Collection Settings->Process, clicking on Agile and choosing 'Export'.
I unzipped the downloaded folder and opened it in Visual Studio.
I made changes to field names and added new states for bugs.
I changed the name and version in the ProcessTemplate.xml like so:
<metadata>
<name>CustomProcess</name>
<description>This is a custom process template based on the Agile process</description>
<version type="ADCC42AB-9882-485E-A3ED-7678F01F66BC" major="1" minor="0" />
I renamed the folder to CustomProcess and zipped it.
In Collection Settings->Process, I clicked on 'Upload process template' and tried to upload my CustomProcess zipped folder. I get the error 'You can't update a system process'.
I made sure to update the name and version as suggested in a previous Stackoverflow post but I still get an error. Is there something else I need to modify in the XML files?
Check this answer: https://developercommunity.visualstudio.com/content/problem/310354/cant-upload-a-custom-process-template-to-tfs-2018.html
You have to change the name and the version of the template
I looked at some more related Stackoverflow posts and found this one helpful. The issue was I need to generate a new GUID for the version. I went into Visual Studio, go to Tools -> Create GUID. Choose the number 6 option for the GUID format. Paste the GUID into the version type: <version type="[paste GUID here]" major="1" minor="0" />
Hopefully this will help someone else with a similar issue. The official documentation doesn't mention any of this which is very disappointing.

WiX tool packaging, avoid ovewrite file on major upgrade

I have a problem with WiX when I try to generate an MSI (WiX v3.11).
My product is a windows service that must be installed, and during this installation process, I launch a form that collects information for connection to database. This information is stored in a .config file that is installed in the same application folder.
The problem is that if I do an update of the package, I must keep the configuration file, but if I uninstall the application, it should delete the configuration file.
The configuration file can be modified after or during installation.
<MajorUpgrade Schedule="afterInstallInitialize" />
<ComponentGroup Id="ConfigFiles" Directory="INSTALL_SERVICE">
<Component Id="ConfigFile" Guid="11FDDC05-F4D2-4418-82E8-0CB3B3784300" Win64="$(var.Win64)" NeverOverwrite="yes" >
<File Id="F.config" Name="service.config" DiskId="1" Vital="yes" KeyPath="yes" Source="..\Resources\service.config" />
<RemoveFile Id="CleanUpLogFile" On="uninstall" Name="service.config"/>
</Component>
</ComponentGroup>
With this I have managed to delete in the uninstall process and not be modified during the update, but the update process fails.
I have tried and read many solutions on the web but I do not get any of them working.

Symbol Server Delete Command Doesn't Work

I'm preparing to host an internal symbol server for some internal libraries using SymbolSource Community Edition. While testing the workflow of adding and updating packages, I also tested the ability to delete symbols from the server. I'm using NuGet.exe to execute commands against the symbol server. Although the NuGet delete command says that it completed successfully, the files are still on the internal symbol server. The command that I'm using is:
D:\>nuget delete <package name> 0.1.0-alpha <GUID>
-Source http://localhost/SymbolServer/NuGet/
The output from the command is:
<package name> 0.1.0-alpha will be deleted from the 'http://localhost/SymbolServer/NuGet/'.
Would you like to continue? (y/N) y
Deleting <package name> 0.1.0-alpha from the 'http://localhost/SymbolServer/NuGet/'.
<package name> 0.1.0-alpha was deleted successfully.
Delete functionality (via NuGet) for symbols hosted on SymbolSource.org is mentioned at http://www.symbolsource.org/Public/Blog/View/2011-06-27/Deleting_packages_from_SymbolSource. This functionality really wasn't "delete" functionality, but rather was like a "hide" command. However, there is a thread at https://groups.google.com/forum/#!searchin/symbolsource/delete/symbolsource/Z63nIr_s-DY/V2rDBdsDI2IJ from 2011 that also mentions implementing "full" delete functionality was at the top of the priority list at that point in time. Anyone know if this functionality was actually implemented? I can't seem to find any further references to it on the SymbolSource.org site.
When I run Process Monitor on the server to monitor file activity corresponding to executing the NuGet delete command, I can see activity - but the bulk of the activity entries have the status "PATH NOT FOUND" and "NAME NOT FOUND". The directory that is being referenced in the Process Monitor logs isn't what I would expect. The primary directory being referenced is:
D:\path\to\SymbolSourceApp\NuGet
The symbol files, however, are in the directory:
D:\path\to\SymbolSourceApp\Data
I think I either have to be missing something, or the delete command was never implemented. Anyone know which might be the case?

How to define a package that uninstalls old code in CQ5?

Has anybody been able to successfully use the Replace dependency filter in the CQ5 Package Manager to uninstall/delete old code? http://dev.day.com/docs/en/crx/current/how_to/package_manager.html
I've recently restructured my directories and I'm trying to find an easy way to uninstall the old branches.
In other words, I am currently working with:
/apps/myproject/old_directory
but want to transition to:
/apps/myproject/new_directory
Like I said, I tried setting the Replace Dependency Filter with the old package name. It appears to be working because it says "Replaces my_packages:oldPackage:1" which is a valid link. However, running the install does nothing to the pre-existing code base.
I realize that I can just uninstall the original package manually, but this will be added to the Package Share, so I'd like to ensure that any current users can just install the upgrade without worrying about unused code.
I'm currently using CQ 5.4
To remove a content branch using a CQ5 package you need a package:
with a filter definition pointing at the content branch to be removed
without any content in that branch
In other words, you can create an empty package with filter definition pointing to areas you want removed. You can do that either on an empty instance, or by manually editing the filter.xml entry to something like:
<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/myproject/new_directory"/>
</workspaceFilter>
Installing such package wipes content under the specified path(s). This operation cannot be undone. This works consistently on all CQ5 versions.