This question already has an answer here:
How to create an installer of a browser-based system?
(1 answer)
Closed 7 years ago.
Environment: Windows 7 64, Visual Studio 2013
Prior to running iexpress I have a setup file that references a main msi, and a prerequisite msi (SlimDX). When the visual studio installer adds the prerequisite, it adds places the prereq msi in a subfolder next to setup.exe.
Now I'm using iexpress.exe to merge the setup.exe and 2 msi files. When iexpress extracts the 3 files to the temp folder, the redistributable is not in a subfolder despite the setup file still expecting it in a subfolder.
How can I force iexpress to maintain folder structure when extracting? Alternatively, when adding a prerequisite to a visual studio installer, how can I force it to place dependencies at the same folder level as the setup.exe?
SDE file
[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=0
HideExtractAnimation=0
UseLongFileName=1
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=I
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[Strings]
InstallPrompt=
DisplayLicense=
FinishMessage=
TargetName=C:\Jobs\NME\Installer\Release\NMEInstaller.EXE
FriendlyName=NME Installer
AppLaunched=setup.exe
PostInstallCmd=<None>
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="NME Installer.msi"
FILE1="setup.exe"
FILE2="SlimDXRedistributable\SlimDX Runtime .NET 4.0 x64 (January 2012).msi"
[SourceFiles]
SourceFiles0=C:\Jobs\NME\Installer\Release\
SourceFiles1=C:\Jobs\NME\Installer\Release\SlimDXRedistributable\
[SourceFiles0]
%FILE0%=
%FILE1%=
[SourceFiles1]
%FILE2%=
My understanding is that MSFT no longer recommends or supports the use of IEXpress.exe as it contains a number of security vulnerabilities that were never patched. You really should consider switching over to a proper bootstrapper such as Windows Installer XML's Burn feature. It's easier to implement and far more powerful.
I answered a question similar to this before:
How to create an installer of a browser-based system?
Essentially you want to use a batch file (or something) to copy or move the files where you need them before executing the actual setup.exe, something like:
#echo off
mkdir SlimDXRedistributable
move /y "SlimDX Runtime .NET 4.0 x64 (January 2012).msi" SlimDXRedistributable
setup.exe
Remember if you're using a batch file to call it like:
cmd /c myscript.bat
(If you just put the batch file, it will run via the old command.com, which is suboptimal.)
Related
This question already has answers here:
Qt 5.1.1: Application failed to start because platform plugin "windows" is missing
(22 answers)
Closed 3 years ago.
I read a lot of questions and answers related to this issue. However, none of them solved my problem.
I would like to point out that i am using the 5.12.2 of Qt. In addition, i tried to generate .exe files using windeployqt command (Calling it via the cmd).
So, i have two different qt application (2 .exe files). I transfer them in a different windows machine with no Qt installation. One .exe file is running correctly however the other one gives me back the error related to the qt platform plugin "Windows".
I would like also to point out, that the running exe is produced using Qt 5.12.2 (MinGW 7.3.0 64-bit). For the problematic exe, the 5.12.2 (MinGW 7.3.0 32-bit) is used.
Do you know what will be the problem?
PS. i double check that the qwindows.dll is in the platforms folder. I also tried to put this dll in the same folder as the exe file as well as in a sub-folder called plugins (based on some answers find around the web.)
Thanks a lot,
I encountered this issue with PyQt5 5.11.3, Windows 10, Python 3.7.3; I got a similar error message:
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "
This application failed to start because no Qt platform plugin could
be initialized. Reinstalling the application may fix this problem.
I set the following environment variable and then run the application. This Method had solved my question, I hope it is helpful for you:
name: QT_QPA_PLATFORM_PLUGIN_PATH
value: C:\Users\"your own user
name"\AppData\Local\Programs\Python\Python37\Lib\site-
packages\PyQt5\Qt\plugins\platforms
Are these exe files in the same folder ? If so you need to put the in 2 different folders as they will not use the same DLLs (including qwindows.dll). One exe needs 32-bit DLLs and the other one 64-bit DLLs.
If they are already in 2 seperate folders, make sure you have run the correct windeployqt on each of them.
You need to use the windployqt.exe from your "Qt 5.12.2 (MinGW 7.3.0 64-bit)" installation on the 64-bit exe. And use the windployqt.exe from your "Qt 5.12.2 (MinGW 7.3.0 32-bit)" installation on the 32-bit exe.
Also be sure to copy the Qt5Core.dll using windeployqt and not by doing a manual copy/paste. The reason is that windeployqt patches Qt5Core.dll when copying it so that it searches plugins relatively to your exe.
We are attempting to install a clean build of the newest version of Kentico (12) on Azure, using Kudu, in DEBUG configuration. We traditionally accomplish this by setting SCM_BUILD_ARGS to -p:Configuration=Debug, and all is well. But for some reason in this newer version, the project fails to compile, and I see that this is the command being run:
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "C:\Users\User\Documents\GitHub\Project\CMS\CMSApp.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="C:\local\Temp\8d6d315018f5ff9";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="C:\Users\User\Documents\GitHub\Project\.\\" -p:Configuration=Debug
Notice both Configuration=Release and Configuration=Debug. The compilation errors are things like Invalid expression term 'string' on the following line of code:
bool licenseOK = LicenseHelper.CheckLicenseLimitations(FeatureEnum.Ecommerce, out int skuCount, out int maxSKUCount);
This doesn't highlight at all in Visual Studio in Debug or Release mode. I am also able to reproduce locally (as shown in my paths above), and if I change the two configurations to both be the same (regardless of whether I choose Debug or Release), it compiles just fine.
What I know I can do is create my own custom deployment command script file as a work-around, but I guess I don't understand why the above MSBUILD command isn't working in the first place.
Any ideas as to why this would work great for all of my ASP.NET projects prior to this one? One thing I know is that Kentico recently included the Roslyn compiler, which I am unfortunately not that familiar with - could that be part of the issue?
UPDATE #1: It appears all of the compilation errors have to do with code that is only valid in C# 7.0. That could be a clue.
It all came down to the fact that the newer versions of Kentico had code that was only valid in C# 7, and required MSBuild 15 to compile. Here's how I was able to set up Kudu:
Add a file named .deployment in the root of my repo, containing only the contents below. This tells Kudu to use a custom deployment script.
Download the deploy.cmd file from my Azure App Service via FTP to the root of my repo, and update it per https://github.com/projectkudu/kudu/issues/2350#issuecomment-373817740 to use the MSBuild 15 path. Details below.
.deployment file contents
[config]
command = deploy.cmd
deploy.cmd updates
1 - Add -MSBuildPath "%MSBUILD_15_DIR%" to nuget call. Example:
nuget.exe restore "{your .sln file path}" -MSBuildPath "%MSBUILD_15_DIR%"
2 - Replace %MSBUILD_PATH% with %MSBUILD_15_DIR%\MSBuild.exe in both occurrences under step 2. Build to the temporary path
This was all that was needed in order to get the build to complete.
As Keith mentions, it was a compatibility issue with C# 7.0 that Kentico 12 uses. This SO thread mentions that you need to run MSBuild version 15 for C# 7.0 code. I ran a similar debug command for my local Kentico 12 project using MSBuild 15, and it succeeded.
I am running Windows 7 Home Premium 64-bit.
I updated my .NET Core installation to the latest version 2.1.500 a few days ago.
Shortly after, I wanted to play with the source code for MS Build, so I cloned the MS Build git repo and ran their build.cmd file as instructed.
But it kept failing telling me it wasn't able to download the per-requisite .NET Core version 2.1.401.
C:\Source\Of\MSBuild> build.cmd
dotnet-install: Downloading link:
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-sdk-2.1.401-win-x64.zip
dotnet-install: Cannot download:
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-sdk-2.1.401-win-x64.zip
dotnet-install: Downloading legacy link:
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-dev-win-x64.2.1.401.zip
Exception calling "Invoke" with "0" argument(s):
"Failed to download
https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-dev-win-x64.2.1.401.zip."
yada yada yada yada...
So I downloaded the zip file https://dotnetcli.azureedge.net/dotnet/Sdk/2.1.401/dotnet-sdk-2.1.401-win-x64.zip manually, and unzipped it to find a dotnet.exe in it.
First thinking that it was a set-up file, I double-clicked it. It appeared and disappeared quickly.
Then, after a few failed attempts, I suspected it was indeed the SDK itself and wasn't an install-able set-up. So, I checked the folders in the unzipped file and they matched exactly the folders in my C:\Program Files\dotnet folder (see the picture at the bottom of this question).
So, now, I don't know how to have this version of .NET Core that I just downloaded (v 2.1.401) co-exist with the latest version 2.1.500. I do see that the C:\Program Files\dotnet\sdk\ folder has several versions exist side by side:
C:\Program Files\dotnet\sdk>dir /b
1.0.0
1.0.0-preview2-003131
2.1.500
NuGetFallbackFolder
So, should I just go ahead and mess around with my folders manually? That is, should I just copy and paste the folders I downloaded and merge them with what I have? See below.
The contents of the two folders needn't have to be merged. One must download the .NET Core installer instead.
Two issues need to be addressed in answering this question.
I had downloaded the binaries in a zip file and not an installer. I was led to install the binaries because the URL I saw on the console when I ran the build script pointed to the binaries and not to the installer.
.NET Core comes in two kinds of packages:
a. MSI installers; and
b. Zip files containing the binaries. These are useful when you want to hold a private copy of .NET core in your application. Just like NPM packages have private installations in contrast to public/global ones. Just like you hold private assemblies (CopyLocal = True) of the .NET framework within your application in contrast with references them from the GAC or the Reference Assemblies folder.
Look at this SDK download page on the Microsoft website. It lists both, the binaries and the installers for each version of the SDK and the runtime.
A Powershell script in the MS Build build process downloads the zip file containing only the binaries and it holds this version of the .NET Core privately. The version it is looking for is mentioned in the DotNetCliVersion property in the Version.props file.
From build1.ps
function Build {
if (![string]::IsNullOrEmpty($DotNetCoreSdkDir) -and
(Test-Path -Path $DotNetCoreSdkDir)) {
$env:DOTNET_INSTALL_DIR = $DotNetCoreSdkDir
}
else {
InstallDotNetCli
}
$env:DOTNET_HOST_PATH = Join-Path $env:DOTNET_INSTALL_DIR "dotnet.exe"
...
I thought this was going to be a simple thing to fix, but after trying several solutions I found on Google (clearing temp for the system, running build through 64-bit IIS Express, and building in release mode instead of debug), I'm still getting the following error:
The command that is being run:
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\aspnet_merge.exe C:\Users\jmckinnon\AppData\Local\Temp\WebSitePublish\cv_net_2008--650083730\obj\Debug\AspnetCompileMerge\TempBuildDir -o xxxxx -copyattrs C:\Users\jmckinnon\AppData\Local\Temp\WebSitePublish\cv_net_2008--650083730\obj\Debug\AssemblyInfo\AssemblyInfo.dll -a -debug
I'm getting this error by running a publish to a zip with the following precompile settings:
A few things to note:
The WebSite is NOT a WebApplication!
The site has over 9100 files
Running .Net 4.5
Trying to build on a Windows 7 Professional 64 bit machine with 16GB of RAM
Only reason I'm trying to build into a single DLL is because I need to version the output of the package. I found out I can version the App_Code using an AssemblyInfo.vb file but the only way I can version all of the other DLLs (default no merging publish generates a DLL for each page) is to add a version directive in each page which is too much to maintain with over 1000 pages.
aspnet_merge is a 32-bit process and seems to crash when it gets to close to 2GB memory usage, which happened to our project. We fixed that by making aspnet_merge.exe large address aware using editbin.exe (included with VS2015, but not with VS2017 it seems...).
editbin /LARGEADDRESSAWARE "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\aspnet_merge.exe"
I am trying to learn how to develop apps for UWP for both Desktop and Mobile. I have been currently working on getting the Entity Framework working in my app to store application state and followed the following link:
https://learn.microsoft.com/en-us/ef/core/get-started/uwp/getting-started
It worked well for Desktop, the issue however is that when I try to run it on the Windows Mobile emulator I get the following error in debug mode when the code reaches the db.Database.Migrate() step:
Unable to load DLL 'sqlite3': The specified module could not be found
In the link I pasted above, someone else had the same issue and in the comments they recommended to try the following:
Step 1: Install SQLite VSIX pacakge for Universal Windows Platform development using Visual Studio 2015
https://www.sqlite.org/2016/sqlite-uwp-3130000.vsix
Step 2: Install NuGet package SQLite.NET-PCL
Install-Package SQLite.NET-PCL
Step 3: Add references
Add Reference -> Universal Windows ->Extensions -> Make sure the following packages have been checked: "SQLite for Universal Windows Platform" "Visual C++ 2015 Runtime for Universal Windows Platform Apps"
After that, if you get the error "Payload contains two or more files with the same destination path 'sqlite3.dll', do the following:
copy sqlite3.dll from
C:\Program Files (x86)\Microsoft SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UAP.2015\3.8.11.1\Redist\Debug\ARM\sqlite3.dll
past to (override it)
C:\Users\%USERNAME%\.nuget\packages\SQLitePCL.raw_basic\0.7.1\build\native\sqlite3_dynamic\winrt81\arm\sqlite3.dll
The problem after doing those steps is that I am now seeing the issue when doing a build for "Payload contains two or more files" however not in the SQLitePCL.raw_basic directory (I don't even seem that have that). Instead my error is the following:
Payload contains two or more files with the same destination path 'sqlite3.dll'. Source files:
C:\Users\admin\.nuget\packages\SQLite\3.13.0\runtimes\win7-x86\native\sqlite3.dll
C:\Program Files (x86)\Microsoft SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UWP.2015\3.13.0\Redist\Debug\x86\sqlite3.dll
I have been searching everywhere and am truly stumped as to how to get my UWP program working on Mobile. Thanks a lot for your help!
It seems like you got the solution for resolving the exception The specified module could not be found from #Leandro_Medeiros_Machado 's comment on this document. If you got the Payload contains two or more files with the same destination path 'sqlite3.dll' exception after you done the above three steps you may be also found the next solution from the comment.
After that, if you get the error "Payload contains two or more files with the same destination path 'sqlite3.dll', do the following:copy sqlite3.dll from
C:\Program Files (x86)\Microsoft SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UAP.2015\3.8.11.1\Redist\Debug\ARM\sqlite3.dll
past to (override it)
C:\Users\%USERNAME%\.nuget\packages\SQLitePCL.raw_basic\0.7.1\build\native\sqlite3_dynamic\winrt81\arm\sqlite3.dll
For you, you may need to copy from
C:\Program Files (x86)\Microsoft SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UWP.2015\3.13.0\Redist\Debug\x86\sqlite3.dll to(override) C:\Users\admin\.nuget\packages\SQLite\3.13.0\runtimes\win7-x86\native\sqlite3.dll.
But actually, for using EF core you don't need the above steps and I recommend you check your environment instead of using the above workaround. I created a simple EF project by following the document and without install the VSIX I can run successfully on the emulator (build 10586). My VS build is 2015 update 3, my OS version is build 14393 and the EF core version is Microsoft.EntityFrameworkCore.Sqlite 1.1.0. So please firstly check if your environment met the following requirements:
Windows 10
Visual Studio 2015 Update 3
The latest version of Windows 10 Developer Tools
And if your EF core and EF core tools versions are right.