After that delete bin and obj folders, then restart VS to add those packages back using nfig format.Ģ.If you continue to use PackageReference format. to true.Ĭlean all nuget cache and click ok. Uninstall all PackageReference format packages, and go Tools=>Nuget Packages Manager=>Nuget Package Manager to set the Allow format selection. And I've checked the setup project can recognize this format well. So you can try using nfig format in your application. I'm not sure if the Setup project fully support for it.ġ.I found this issue only occurs when using PackageReference format. PackageReference format is the new nuget package manage format after VS2017. I can reproduce same situation and I found this issue only occurs when I use PackageReference format to manage nuget packages in my application.(.net 4.7.2) This strange behavior may have something to do with Setup project. So what I want toĭo is to make installer work consistently with build. The correct \lib folder and application works fine. The build after Nuget package upgrade continues to pull packages from (I guess something corrupts the process when VS recognize your assembly version cause in most machines it displays 4.0.3 while in one machine, it displays 4.0.2, quite strange.) And I think it contains the assembly version 4.0.3 instead of 4.0.2. I can only find it with latest 4.5.0 here. When I upgrade nuget package to version 4.6 (and assembly to 4.0.3) Which way do you reference that package? I can only reproduce this issue when I add reference manually.(Right-click project=>Add reference=>Browse.) If you're doing so, please remove that reference, and add that reference back by Nuget Package Manager UI. Install retrieves assembly from: C:\Program Files (x86)\ReferenceĪssemblies\Microsoft\Framework.NETFramework\v4.7.2\Facades\ So what I want to do is to make installer work consistently with build. The build after Nuget package upgrade continues to pull packages from the correct \lib folder and application works fine. Reference assemblies are not meant to be installed and cause errors BadImageformatException. If you look closer, you will notice path above has \ref folder and it contains "reference" assembly. While install based on 4.0.2 creates a concern but works, when I upgrade nuget package to version 4.6 (and assembly to 4.0.3) install switches to using assembly C:\Users\vgdev.nuget\packages\system.valuetuple\4.5.0\ref\net47\ Typical example is (4.0.2)Ĭ:\Users\.nuget\packages\system.valuetuple\4.5.0\lib\net47\Ĭ:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\Facades\ Why is it doing that and how can I make it to chose assemblies consistent with build assemblies? After setup is executed it installs Nuget package assemblies that are different from the assemblies generated during build. vdproj file - which lets the installer run, but it won't install because it says a newer version is installed: I've tried generating new GUIDs and manually updating the existing ones, but without success.I created a setup project using Microsoft Visual Studio Installer Projects (0.9.3, this is latest for Visual Studio 2019). I've tried manually changing the product code and package code in the. The old way would have been to update the product code, but I cannot find a way to do that now in the interface. So how do I create an update installer? There is no "Publish" menu option on the deployment project, and "Publish" is unavailable on the main menu for the project. I've updated the AssemblyFileVersion and AssemblyVersion properties in the output assembly, but this doesn't help. I'm using VS 2019: if I choose "Install" from the project deployment menu then the new version is installed locally, but if I build it and run the MSI then I get "Another version of this program is already installed…" and will I have to ask my customer to uninstall and reinstall the app. I'm using the Microsoft Visual Studio Installer Projects extension to build a new installer for an update to a 10 year old project, but I cannot seem to create an installer that doesn't require the old version to be removed first. I asked this on the deployment projects QNA
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |