how to fix MSIX with CERT pack / install problem - visual-studio

I use visual studio 2022 (ver 17.4.2) to build msix package for program install. I ran into these strange situations:
1, During making a package: If I export certs in certmanger to .CER format, delete installed cert, then import it back, "dotnet publish" command will tell me the valid cert is not found. But if I export certs into .PFX format with a password, delete it, import it back, publish command works well and msix package is built. I'm so curious why?
2, During install the msix package: If I double click the .cer file generated by VS, or use "import" in certmanager, the msix package will tell me no valid certs is installed and the installation process is unable to continue. But if I use "certutil.exe -addstore ..." command to install the same cert file (this is also what is done in VS generated .PS1 script), MSIX package install works well. It also confuses me much.
Thanks for your explaination or any thoughts.

Related

Uninstall nuget packages installed with nuget.exe

I was having trouble with nuget Visual Studio 2017 and wanted to test if it was our proxy server or not. I downloaded nuget.exe and dropped it at the root of my C drive. I executed nuget.exe install Microsoft.AspNetCore and it asked for my proxy server username and password. I supplied it, and it proceeded to create dozens of directories in C:\ with that package and all of it's dependencies (can I get a DOH!) Problem is, there's no uninstall in nuget.exe. The package manager in VS isn't available unless you have a solution open, and the package manager console (powershell) won't uninstall unless you have a solution open. Can I just clobber all those directories and their contents? Or will that just make things different and somehow worse:
Can I just clobber all those directories and their contents? Or will that just make things different and somehow worse
Yes, you can (If you confirm that you no longer need these packages).
According to the document install command (NuGet CLI):
The install command does not modify a project file or packages.config;
in this way it's similar to restore in that it only adds packages to
disk but does not change a project's dependencies.
When you use nuget.exe install some packages, it just download those packages to the disk and not change anything in the project, this is similar to some files you downloaded from the internet.
So, if you do not need those packages any more, you can just delete them from the disk manually.
Besides, there is an option delete command (NuGet CLI), which can be used to deletes or unlists a package from a package source. The exact behavior depends on the source. For local folders, for instance, the package is deleted; for nuget.org the package is unlisted. But it only delete the file .nupkg and will keep the folders and other files of other packages, like lib folder. If you want remove the package completely, just delete those packages manually.
Hope this helps.

OpenSSL Nuget package not installing in VS 2015

I am trying to install the OpenSSL Nuget package in VS 2015.
I get the error:
Attempting to gather dependencies information for package 'openssl.1.0.2.1' with respect to project 'BLL', targeting '.NETFramework,Version=v4.5'
Package 'openssl' is not found in the following primary source(s): 'https://api.nuget.org/v3/index.json'. Please verify all your online package sources are available.
========== Finished ==========
I also tried running
Install-Package openssl
from the Package Manager Console, but it did not work. It downloaded the "openssl.1.0.2.1.nupkg" file to my packages directory, but there are no other files.
Has anyone else run into this?
The OpenSSL package used for C++ project. And I get the same issue with you when installing the version 1.0.2.1. Then I download the OpenSSL package to local and open it with NuGet Package Explorer, I don't find any content files in this package.
I have submit this issue to OpenSSL package. Please add your comments to this feedback and please waiting response from the owner patiently.
https://github.com/openssl/openssl/issues/1865
But when install the OpenSSL package 1.0.2, it doesn't get any error. So I suggest you install the version 1.0.2 in your project.

Adding a NuGet Package Source that requires credentials with VS2015

I am attempting to setup a NuGet package source that requires credentials.
Here are the instructions
I have the latest version of Visual Studio 2015 with everything up to date. I am aware of how to add a package source through the UI in VS2015, but you can't specify credentials when doing it this way.
The command they are asking me to run is:
NuGet Sources Add -Name "telerik.com" -Source "https://nuget.telerik.com/nuget" -UserName "<your login email>" -Password "<your password>"
I am aware that I need a nuget.exe to run this command, but there is a way to do this directly through VS without downloading anything isn't there?
If I download the NuGet.exe, open a command prompt and navigate to it to run that command will I then be able to see it from Visual Studio's NuGet Package Manager UI and access it from Visual Studio's NuGet Package Manager Console? I am confused on how it will integrate with Visual Studio's built in NuGet Package Manager.
I figured out that you need to download nuget.exe to your computer, open up a command prompt and navigate to it. Then run the command to add the package source with credentials:
NuGet Sources Add -Name "telerik.com" -Source "https://nuget.telerik.com/nuget" -UserName "<your login email>" -Password "<your password>"
Restart Visual Studio and the Package Source is added to the list in both the Nuget UI and Nuget Command Line.
If you are using SSO and the Windows credentials fix does not work for you, just sign out of Visual Studio, then sign back in again, and then restart Visual Studio; then, the 401 NuGet package source error will be fixed.
We can update the file Nuget.config file entry as
<add key="Telerik" value="https://nuget.telerik.com/nuget"
UserName ="<<youremail#mail.com>>"
Password ="<<password>>" />
This let me build and run.
I tried the approche Blake Rivell described in his answer. It did not work for me, so I tried to use the -StorePasswordInClearText flag. (See the instruction mentioned in the question)
Then I found out the project I started working on contained a "NuGet.Config" file. The display name of the source in this file was different to the one I added via the command line (to the global "NuGet.Config" file). (Our different projects apparently use different names for it)
So it did not work, because it was not able to associate the source with credentials with the entry in my local "NuGet.Config" file.

Aptana Install Node.js failing to download

Aptana studio 3 won't finish installing because it can't download the node.js msi file. I went and downloaded it separately, but that didn't help.
The Aptana installer creates a folder in "User name/AppData/Roaming/Appcelerator".
The folder is named "Aptana Studio 3.6.0".
In Appcelerator, create a new folder named "Aptana Studio" (without the quotation marks.)
Re-run the installer.
If it creates the node.js msi file in a subfolder, double click on it and it will install the node.
Re-run the installer. It should automatically download and install the prerequisites folder and files, including Git.
Aptana then correctly completes the install.
It appears the key to solving the install problem is creating the correct name for the install folder in "User name/AppData/Roaming/Appcelerator"
When I checked in the directory, the "Aptana Studio" folder was already there. I ended up following this thread's solution instead, and it worked.
Also, my apologies for asking an existing question: my search prior to asking came up empty, even though it should have found it. Not sure why not, though...

Add custom prerequisites to ClickOnce in VS2010

I have an application (C#, .Net4) which I'm publishing with ClickOnce. I need to verify that the machines installing it have 2 prerequisites, one is an msi file and the other is exe. I've tried the following solutions:
Use the prerequisites option in the project's properties (under Publish) while putting the msi and the exe in the installation directory - no good.
Install Bootstrapper Manifest Generator and following this tutorial, where I have a problem - the build succeeds but with Attempted to access a path that is not on the disk. warnings. It does generate the package.xml and `product.xml files, but the installation size didn't change and it does not install the prerequisites (I've also removed the app and tried to install rather than update).
I'm using VS2010, I'm not sure i this is the reason that BMG does not work.
I'd appreciate your help in solving this issue.
Thanks.
there is no Bootstrapper Manifest Generator for vs 2010 but,
you can use Bootstrapper Manifest Generator for vs 2008 follow this link
http://archive.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=bmg&ReleaseId=1567
after Boot strapper Generate your installation Package you need to copy Package
from Document(your Package)
manual to this location "Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper"
for more information
http://msdn.microsoft.com/en-us/library/ms165429%28v=vs.80%29.aspx

Resources