LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to build CVI project

I have recently upgraded my CVI installation from the 2nd Quarter 2008 Developer Suite distribution.  After making some minor changes to an existing program and successfully building the program, I attempted to build a distribution for installation on the target machine.  The build seems to start fine, but early in the process, I get a "Error copying source distributions to build location" dialog box, followed by a "Build failed" message with the following in the Build Log: "Error: Windows SDK function returned an error. (Error code -12).  The system cannot find the path specified."  I am using the same .cds file that previously worked.  Thanks.
0 Kudos
Message 1 of 9
(4,672 Views)
Please refer to the directions in this post to generate a verbose debug log of the distribution build. Post it back, and we can investigate. In the meantime, double check the distribution's output location (on the 'General' tab) to see if that is still a valid, writeable path.

Mert A.
National Instruments
0 Kudos
Message 2 of 9
(4,654 Views)
Mert,
This message didn't go through the 1st time I tried.  I got a message about an invalid file extension?   I've changed the .log to .txt.
The output path is still good; I copied a file to that location to verify.
0 Kudos
Message 3 of 9
(4,649 Views)
How about the path E:\VS2005\VS2005\Parts\Common\MStudioCommon.2005.msi? Does that file exist? The log seems to suggest that the directory was not found. If you think the path is good, is there anything else unusual about E: (i.e. mapped drive, etc)?

Mert A.
National Instruments
0 Kudos
Message 4 of 9
(4,636 Views)
The directory E:\VS2005 is on the "NI Measurement Studio Enterprise Edition" CD.  When I first attempted to build the distribution, I was prompted for that CD.  I inserted the CD and checked the box related to local caching of the files copied for future builds (this failed with an error message "unable to copy from source" (or similar).  There appears to be an extra "VS2005" in the path that CVI is looking for.  MStudioCommon.msi is present on the CD under the E:\VS2005\Parts\Common directory.
0 Kudos
Message 5 of 9
(4,629 Views)
Yes, I looked into this and found that there is a bug in the distribution building framework. Measurement Studio's installation CD is organized in a way that is pretty unique among NI installers. This organization is causing the issue. I think the best way to solve this problem is to fix up the relative paths stored in your registry by removing the leading "VS2005\".

First of all, in regedit, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\Common\Installer\Distributions. Use the right-click menu to Export that Distributions key (this is just a safety measure so that we can restore the current state if necessary) and put that backup somewhere safe. Now search under the Distributions key for "E:\VS2005\". You should find a key directly beneath Distributions that has a value called DistRoot set to "E:\VS2005\". Now for every one of its subkeys (they will all have GUID names), look at the value PartRelativePath. If the value begins with VS2005\, remove the VS2005\ from the string. For example:

PartRelativePath        VS2005\Parts\Common\MStudioCommon.2005.msi
becomes
PartRelativePath        Parts\Common\MStudioCommon.2005.msi

This should be fewer than 10 values that need to be fixed.

I'm filing a bug report as well so that this will be fixed in the future.

Let me know if you have questions, and also let me know if this solves your problem.

Mert A.
National Instruments



0 Kudos
Message 6 of 9
(4,625 Views)
I'm still getting the same error.  I removed VS2005 from the PartRelativePath keys.  After the build failed, I rechecked the registry keys and they appear to be correct.  BTW, why is the Measurement Studio CD being asked for?  I'm not using Measurement Studio.  The latest log file is attached.
0 Kudos
Message 7 of 9
(4,617 Views)
I forgot to mention that you need to restart CVI. Give that a try.

It's asking for the Measurement Studio CD because through some dependency chain, the Measurement Studio common assemblies are a runtime dependency of DAQ. I think what probably happened is that your machine had Measurement Studio at the time that you installed DAQ, which then caused the Measurement Studio DAQ API to be installed. So now when you distribute DAQ, in case you were using the Measurement Studio API, the common Measurement Studio assemblies need to be distributed, too.

Let me know if there are any further issues.

Mert A.
National Instruments
0 Kudos
Message 8 of 9
(4,613 Views)
That did the trick.  Thanks for your assistance.
0 Kudos
Message 9 of 9
(4,601 Views)