简体   繁体   中英

Windows Installer Project in Visual Studio 2017

I've been learning about deployment of various application types (eg. console applications, windows service applications, windows forms, wpf etc) built using Visual Studio 2017.

In particular I was looking at what I understand are referred to as Setup and Deployment Projects or Windows Installer Setup Projects: https://msdn.microsoft.com/en-au/library/wx3b589t(v=vs.100).aspx

I couldn't locate the Setup and Deployment Projects in Visual Studio 2017 at first. However I located an extension to Visual Studio from Microsoft called Microsoft Visual Studio 2017 Installer Projects https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects

After installing the extension for Visual Studio I could locate Visual Studio Installer under Other Project Types in the Add New Project window. I haven't been able to successfully build an installer however for a project however.

On different occasions and with different solutions using a standard default Windows Form project or a default console application, when I right click the Setup project in the Solution Explorer Window and select build the following happens:

  1. A dialog window relating to SQL Management Studio appears with the following

    Please wait while Windows configures SQL Server 2008 R2 SP2 Management Studio.

  2. On top of that dialog window a further dialog window appears with:

    0: Watson 1: 1304 2: STreamSupportFiles 3:streamBinaryToDisk 4:5 5:e:\\sql10_main_t\\sql\\setup\\darmwin\\sqlcastub\\streamca.cpp 6:238 7:sqlcastub.dll 8:sqlrun.msi

    and an ok button.

  3. If i pres the ok button on the dialog identified in 2 I end up with a further dialog with a title of SQL Server 2008 R2 SP2 Management Studio. The content of the window is:

    Error writing to file: Access is denied. Verify that you have access to that directory. An OK button appears in the window.

I'm not sure what "that" directory actually refers to in this context as it wasn't expected.

  1. If I click Ok on the dialog window then I see a Windows Installer dialog window with the message "Preparing to Install" and a cancel button.

  2. After a prolonged period with nothing seemingly occurring, and the Visual Studio main window now having (not responding) as part of its title I ultimately end up clicking the cancel button on the Windows installer dialog. This results in the installer freezing and ultimately either Visual Studio crashes or has become so unresponsive that I end up terminating it with the task manager.

I watched a video in which someone had built a Setup Project for a Windows Service and at no stage did i see the Windows relating to SQL Server or the Windows Installer Preparing to Install window. I didnt expect to receive any of the mentioned windows, nor Visual Studio to become unresponsive and essentially crash.

I went to Tools > Options > Projects and Solutions and changed the MS build output and log verbosity to Diagnostic, but didnt find anything related to SQL Server 2008.

Does anyone have any thoughts as to what may be causing this and how I could resolve?

Further, should I perhaps be looking at some other solution/tool to be used for deployment purposes instead of the Setup and Deployment projects? Given the nature of the question instead of leaving it at just this perhaps some other questions : 1. Are Setup and Deployment projects still a tool/solution actively used by other developers? If so, are they extensively used? Or how extensively are they used relatively to other technologies/tools/solutions for deployment?

The problem was resolved on an x64 system by running:

regsvr32.exe /u "C:\Program Files (x86)\Common Files\microsoft shared\MSI Tools\mergemod.dll"
regsvr32.exe "C:\Program Files (x86)\Common Files\microsoft shared\MSI Tools\mergemod.dll"

I have the same problem. But I am a new developer. Can you explain to me a little more the solution please?

Gilles Payette

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM