Could not open key: HKEY_CURRENT_USER\Software\Classes\MyAppAssembly - windows-xp

I created setup for my applicaiton using WIX 3.5. Installer works fine for first time. But after uninstalling application and then reinstalling again on same machine, I get following error message:
"Could not ope key: HKEY_CURRENT_USER\Software\Classes\XMyapp...\myapp. Verify that you have sufficeint access to that key or contact your support personnel."
During installation my msi is supposed to install this assembly. After uninstall i see that these registry enntries are removed...which is same as what it should be during first time install.
I am confused as why the installer is trying to open this registry entry??
I created 2 more installers using WIX 3.5 for Windows 7 and Windows Server 2008 but never found this problem. This is only with Windows XP SP3 box.
Please suggest any solution to this problem.
Following is partial code from my .wxs file generated by Heat.exe. I am getting error for TimeLimitPlugin class below
<Directory Id="dirE6F61FBBE33D607D42934C479509E1A7" Name="bin">
<Component Id="cmp8862A7C3908D1BE33925BE0E72222A47" Guid="{EC21FA8F-ADAE-4608-8CB0-49B9EE7F5A37}">
<File Id="fil143DAAA17C8B9650C00B50AB55BE85D3" KeyPath="yes" Source="..\OneApp31_deploy\Debug\bin\AjaxControlToolkit.dll" />
</Component>
<Component Id="cmp120CF12CD801404A02CE3906AD63E471" Guid="{46428AEB-4AD5-4230-A0DD-284C35682C0C}">
<Class Id="{0155BEAB-D46E-3EC9-9535-263A90812041}" Context="InprocServer32" Description="TimeLimitPlugin" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="TimeLimitPlugin" Description="TimeLimitPlugin" />
</Class>
Thanks!

You probably have a per-user package (Package/#InstallScope="perUser" instead of Package/#InstallScope="perMachine"). When you install the Class element is writing to the HKCU CLSID registration location. I doubt it is the exact snippet above causing the issue but some other registration in your package.

Related

How do I get Hellow Quantum world to run in Visual Studio 2019

This is my first attempt at Q#. I followed the instructions here: How do I get the missing dependencies? Please see my screen shot
https://learn.microsoft.com/en-us/azure/quantum/install-command-line-qdk?tabs=tabid-vs
Have you tried just building the program? Nuget dependencies are typically downloaded the first time you build the program?
Looks like you're using the most recent version of the QDK (0.17.2105.144881), so you can open your .csproj file and confirm that it's using it. You should see this on the first line:
<Project Sdk="Microsoft.Quantum.Sdk/0.17.2105144881">
You can also confirm that the NuGet.config file in your machine has the public feed in it:
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
If you still get NuGet restore issues, I would also recommend installing .Net Core SDK 3.1.409 (Link). I see that you are using .Net 5.0, but you can have multiple versions side by side.
I hope this information is useful.
It seems like there is an issue with NuGet. If you in Visual Studio select Tools=>Nuget Package Manager=>Package Manager Console and in that write the command: dotnet restore.
And you then get an error similar to:
The package is missing the required nuspec file. Path:
C:\Users\x\.nuget\packages\x.x.x
Then there is something broken with your local NuGet cash, empty it by removing everything inside the packages folder. and then run the command dotnet restore again.
also includes the error messages, since image-texts isn't searchable (so that others also can find this):
No namespace with the name "Microsoft.Quantum.Canon" exists.
No namespace with the name "Microsoft.Quantum.Intrinsic" exists.
No type with the name "EntryPoint" exists in any of the open namespaces.
No identifier with the name "Message" exists. Assets file
'c:\User…\obj\project.assets.json' not fount. Run a Nuget package
restore to generate this file.

wix toolset: How can I run or not run PowerShell depending on the result of DirectorySearch

I am creating a MSI package including Visual Studio Code exe file.
I wrote directory search to check whether the windows PC has VS code or not. Then, if the PC does not have it, I would like to run PowerShell to install VSCode and install a couple of extensions.
Right now, I confirmed that Directory Search and PowerShell are working. However, I am having a hardtime figuring out creating a conditional statement based on Directory Search then, run PowerShell.
This is my code so far:
DirectorySearch:
<Property Id="VSCODEEXE">
<DirectorySearch Id="ProgramFolderVScode64bi" Path="c:\Program Files\Microsoft VS Code\bin">
<FileSearch Id="ProgramVScode64bit" Name="code.cmd" />
</DirectorySearch>
<DirectorySearch Id="ProgramFolderVScode32bit" Path="c:\Program Files (x86)\Microsoft VS Code\bin">
<FileSearch Id="ProgramVScode32bit" Name="code.cmd" />
</DirectorySearch>
<DirectorySearch Id="LocalAppDataProgramFolderVScode" Path="[LocalAppDataFolder]\Programs\Microsoft VS Code\bin">
<FileSearch Id="LocalAppDataProgramVScode" Name="code.cmd" />
</DirectorySearch>
</Property>
PowerShell:
<powershell:File Id="InstallVSCode" File="[#InstallVSCode]" Arguments="-ErrorAction SilentlyContinue -AdditionalExtensions "[#VSCodeExtension]", ms-azuretools.vscode-docker, ms-vscode.azurecli" />
This is the conditional code of block I have now. It seems that powershell:File is not expected child element of Feature..... But I need Feature to set the Level to use Condition..... Is there any other way to achieve this??
<Feature Id="VSCodeInstalledOrNot" Level="1">
<powershell:File Id="InstallVSCode" File="[#InstallVSCode]" Arguments="-ErrorAction SilentlyContinue -AdditionalExtensions "[#VSCodeExtension]", ms-azuretools.vscode-docker, ms-vscode.azurecli" />
<Condition Level="0">VSCODEEXE</Condition>
</Feature>
Thank you very much,
A word of caution. While this is not legal advice, a quick search of github issues indicates that Microsoft doesn't extend binary redistribution rights to VSCode. You may be limited to using AppSearch and LaunchConditions to block installation of your MSI if VSCode isn't installed and give the user instructions on how to install it themselves.
Also generally it's better to use WiX Burn Bootstrappers to detect if an application is missing and install it then it is to have a custom action inside your MSI. This is especially true for MSI installs as a Windows Installer Mutex blocks one install from installing another. VS Code doesn't seem to be an MSI though.

dotnet new --install is looking at wrong NuGet server

Running:
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
Generates the below error:
C:\Program Files (x86)\dotnet\sdk\1.0.4\Nuget.targets(97,5): error : Unable to laod the service index for source https://MYNugetFeed.pkgs.visualstudio.com/_packaging/Project/nuget/v3/index.json. \r [C:\Users\me\.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj]
C:\Program Files (x86)\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Response status code does not indicate success: 401 (Unauthorized).
So my questions is why is it looking at that NuGet feed and not the standard (assuming that's where these templates are) and how do I change the configuration for dotnet cli? I know this is environment related in some way.
Cause
When you set up NuGet servers in Visual Studio (and perhaps other tools), they are saved on a per-user basis in NuGet.config. Dotnet new -install tries to make use of them. Unfortunately, one of my nuget servers (Telerik) requires authentication, and it failed so hard that it stopped all the other sources from even being tried.
Solution
On both Windows 10 and 8.*, you can find NuGet.Config here:
Go to C:\Users\[User Name]\AppData\Roaming\NuGet\NuGet.Config
Under <packageSources>, there will be a list of servers, like this:
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="REDACTED" value="http://REDACTED:8080/guestAuth/app/nuget/v1/FeedService.svc/" />
<add key="REDACTED" value="http://REDACTED/nuget" />
<add key="Telerik (Kendo)" value="https://nuget.telerik.com/nuget" />
</packageSources>
To make this work, I reduced that down to the core nuget.org server:
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
...And then template installation started working.
It sounds like your computer has a global nuget configuration that points to that feed. You can change that behaviour for a specific directory and it's children by creating a new nuget.config file.
You can find out how the local files override global ones on the Configuring Nuget Behavior page of the Nuget documentation.
I had, presumably, the same problem Brian MacKay encountered with Telerik. However, I am actively working a project that needed the Telerik source, so I wasn't keen to remove everything from my Nuget.Config
However, by specifying the specific nuget source in the command, I was able to install the desired templates - in my case IdentityServer4 templates. So this command worked:
dotnet new -i IdentityServer4.Templates --nuget-source https://api.nuget.org/v3/index.json
Assuming that the OP is correct and the templates mentioned are in the standard Nuget registry, I imagine a similar call would work there.

Not able to get MongoDB.driver nuget for Webapi project

I am new to MongoDB and is trying to get this new Database connected with my Web api application ..But i am not able to add MongoDB.driver nuget for my Webapi project.Please refer screen shot.
My search is struck on this window for like forever.,have even restarted my project for a couple of times now.
I also tried installing this package through
PM>Install-Package MongoDB.Driver
But then this is shown
Am I doing something wrong ..?
i tried opening this url"api.nuget.org/v3/index.json"...but it says this site cant be reached..what does that mean?
Since the you could not open the url in browser directly, there should be some internet limitations in your internet environment. If you are work in the company, I suggest you contact your office IT to confirm whether they add any limitations and whether used any proxy. If they are using some proxy, you need to set the proxy settings in NuGet.Config file which store in C:\Users\user name\AppData\Roaming\NuGet as below settings. Detailed information please refer to the Proxy settings part in Nuget Config Section & Nuget Proxy Settings.
<add key="http_proxy" value="host" />
<add key="http_proxy.user" value="username" />
<add key="http_proxy.password" value="encrypted_password" />
Besides, you can chech the proxy in your machine: Open "System Properties" > Advanced > Environment Variables. Find the http_proxy var (in System variables), select and delete it.

How to uninstall Umbraco 7

I installed Umbraco 7.2.2. from the latest nuget package. However, annoyingly I just clicked install from the initial install wizard, as shown below.
Unknowingly it wouldnt ask me for the DB connections. So my question is. Is there a clean way to revert the installation and start again. Or am I just best to delete the project and install the NuGet package again?
Im aware of earlier versions that I could just remove the appsetting value below and it would start the installer again.
<add key="umbracoConfigurationStatus" value="7.2.2" />
EDIT:
This is no longer the case. Removing the value from the above app settings only looks to upgrade the installation.
However I dont want to be left with a bloated Umbraco install with redundant files, like the .sdf DB etc. Or is it the case that the normal install doesnt actually include many additional files than the custom install? And its just the SDF?
The more I write this the more it makes sense to just start again with a fresh project. :)
Keen to hear an opinion regardless.
Start with the current site as it is installed now and go to the backoffice (http://yoursite.local/umbraco). Go to the developer section > Packages > Installed Packages > Fanoe. Go to the Uninstall Package tab and confirm the uninstall.
In your web.config set umbracoConfigurationStatus to an empty string:
<add key="umbracoConfigurationStatus" value="" />
And set the connection string to the default empty values:
<remove name="umbracoDbDSN" />
<add name="umbracoDbDSN" connectionString="" providerName="" />
After saving this file, your application pool will recycle and you can delete the umbraco.sdf file from the App_Data folder. In fact you can delete everything in App_Data.
As you said, it would be much easier to delete the current site and just start over, choosing "Customize" during the next install.