Feature Requests item #1934684, was opened at 2008-04-04 10:55 Message generated for change (Settings changed) made by jasongin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=642717&aid=1934684&group_id=105970
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: votive Group: None >Status: Closed Priority: 5 Private: No Submitted By: robertob (robertob1) >Assigned to: Jason Ginchereau (jasongin) Summary: enable $(var.<WixProjectRelatedVariable>) support Initial Comment: Having access to the Wix project project-related variables would be very helpful. The way we setup our sources is that we have every .csproj use the following project settings, and hopefully now .wixproj given msbuild support in the 3.0 work. <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Condition="'$(OpeningProjectSettings)' == ''" Project="..\BuildSupportFiles\anyCpu\OpeningProjectSettings.targets" /> . . . <Import Condition="'$(ClosingProjectSettings)' == ''" Project="..\BuildSupportFiles\anyCpu\ClosingProjectSettings.targets" /> </Project> The thing we do in OpeningProjectSettings is Set the $(OutputPath) property setting for all projects so that dll, exe, msi, other output all gets placed in same folder it will get placed in when we setup tfs automated execution of per checkin and daily build msbuild .proj files. The great thing about tfs automated execution of per checkin and daily build msbuild .proj files is that it automatically sets OutDir to the <build setup enlistment root>/Binaries/$(Configuration). This makes authoring wix30 msi sources nice because if we could access wix project related variables we could then set the Source attribute for all File entries to use Source=”$(var.OurDir)” and not have to worry about baking source tree build output hierarchy knowledge into our wix sources. For the cases where the wix project itself has source files that need to be referenced, e.g. ReadMe.txt and Other stuff not coming for other solution build output, I’d want to be able to use Source=”$(var.ProjectDir)…” references. ------------------------------------- From: Jason Ginchereau Sent: Friday, April 04, 2008 8:31 AM To: Robert O'Brien; '[EMAIL PROTECTED]' Subject: RE: [WiX-users] is there a way to access wixproj macro values from within wix sources The project-related variables are only generated for project references. You don't get project variables for the WiX project itself. (Hmm... would that be a nice feature to have?) So you need to add a reference from your WiX project to another application project to get variables for that project. And as the documentation says, you need to include the project name in the variable, for example: $(var.MyAppProject.TargetPath) If you examine at the Output window of VS when you build, you can see all the available project/solution variables where they are passed on the command-line to candle.exe. ------------------------------------- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert O'Brien Sent: Friday, April 04, 2008 8:13 AM To: '[EMAIL PROTECTED]' Subject: Re: [WiX-users] is there a way to access wixproj macro values from within wix sources I removed the <DefineSolutionProperties>false</DefineSolutionProperties> <PropertyGroup> setting from my wixproj file which I had added earlier to address the following warning “(default target) (1) ->(AddSolutionDefineConstants target) -> C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.0\Wix.targets : warning : Solution properties are only available during IDE builds or when building the solution file from the command line. To turn off this warning set <DefineSolutionProperties>false</DefineSolutionProperties> in your .wixproj file.” that was getting generated when I built from the command line using “msbuild myservicedeliverable.wixproj” After making that change I can now leverage $(var.Solution*) macros, e.g. Source="$(var.SolutionDir)..." but get still get the compiler error mentioned earlier if I try and use wix project macros such as $(var.ProjectDir), $(var.OutputPath), $(var.OutDir) and $(var.TargetPath). So are these ones basically n/a but if I reference a non-wix project like a csproj generated dll then I should expect that $(var.<ReferencedProjectName>.<StandardIssueProjectMacro>) variable references will work? ---------------------------------------------------------------------- >Comment By: Jason Ginchereau (jasongin) Date: 2008-05-21 09:07 Message: Logged In: YES user_id=2086430 Originator: NO I implemented this a few weeks ago. The following variables related to the current project are now supported: Configuration OutDir Platform ProjectDir ProjectExt ProjectFileName ProjectName ProjectPath TargetDir TargetExt TargetFileName TargetName TargetPath ---------------------------------------------------------------------- Comment By: robertob (robertob1) Date: 2008-04-09 18:03 Message: Logged In: YES user_id=2025042 Originator: YES One Solution and/or Project macro that would be great to have access to enabled if possible is $(var.OutDir) and $(var.OutputPath). The reason being is that in the case of Tfs automated building of msbuild .proj defined build types it sets the OutDir macro for all projects being built to the same destination which would make it possible to use wix Source="$(var.OutDir)\<referenced assembly != var.<projectName>.TargetPath>" and have that work in both IDE and Tfs automated build cases. Also when tfs automated build executes it creates this interesting folder in the OutDir destination called "_PublishedWebsites" which contains a property structured drop of any web application type build output. Therefore having OutDir macro access would make it possible to do non source tree hierarchy specific wix source= references Source="$(var.OutDir)_PublishedWebsites\SomeWebApp\web.config" and Source="$(var.OutDir)_PublishedWebsites\SomeWebApp\SomeWcfService.svc". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=642717&aid=1934684&group_id=105970 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-devs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-devs
