OCX reg-free-com process with manifests - dynamic

I've a third-party lib (DLLs and a OCX) and my own app (EXE and DLLs).
Problem: Version 1.0 of my app uses lib version 1.0 and my app version 2.1 uses lib version 1.4. Both lib versions are not binary-safe. If a user has installed both app versions, only one could work, because only the last lib/ocx is registered.
Now I heard of the reg-free-com process using manifest files: https://learn.microsoft.com/en-us/previous-versions/dotnet/articles/ms973913(v=msdn.10)?redirectedfrom=MSDN
What I've done so far to have both app versions work with different libs/ocx files.
I've created a manifest file for my app: MyApp.exe.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity name="Comp.MyApp" processorArchitecture="X86" type="win32" version="1.0" />
<description>MyApp</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
<assemblyIdentity
type="win32"
name="GrinderLib.sxs"
version="1.0.0.0" />
</dependentAssembly>
</dependency>
</assembly>
Beside this one I've created the: GrinderLib.sxs
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="GrinderLib.sxs"
version="1.0.0.0" />
<file name="C:\\GrinderLib\\Grinder.ocx">
<comClass clsid="{E142C57C-55A3-4AD4-A14C-575D99574B79}" tlbid="{4A97AB7A-66EA-47FC-A420-FD83D1A7DD31}" description="Grinder Control"></comClass>
<comClass clsid="{E142C57C-55A3-4AD4-A14C-575D99574B80}" tlbid="{4A97AB7A-66EA-47FC-A420-FD83D1A7DD32}" description="Grinder" threadingModel="Apartment"></comClass>
<typelib tlbid="{4A97AB7A-66EA-47FC-A420-FD83D1A7DD32}" resourceid="2" version="1.8" helpdir=""></typelib>
</file>
<comInterfaceExternalProxyStub name="_GrinderView" iid="{E9C8BE74-3AE3-408C-8489-DE27B364DE85}" tlbid="{4A97AB7A-66EA-47FC-A420-FD83D1A7DD32}" proxyStubClsid32="{00030420-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
<comInterfaceExternalProxyStub name="_GrinderViewEvents" iid="{D0A38C7D-B0D9-4FB2-B30A-F26169E9828C}" tlbid="{4A97AB7A-66EA-47FC-A420-FD83D1A7DD32}" proxyStubClsid32="{00030420-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
<comInterfaceExternalProxyStub name="_GrinderViewg" iid="{E9C8BE74-3AE3-408C-8489-DE27B364DE86}" tlbid="{4A97AB7A-66EA-47FC-A420-FD83D1A7DD32}" proxyStubClsid32="{00030420-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
<comInterfaceExternalProxyStub name="_GrinderViewEventsg" iid="{D0A38C7D-B0D9-4FB2-B30A-F26169E9828D}" tlbid="{4A97AB7A-66EA-47FC-A420-FD83D1A7DD32}" proxyStubClsid32="{00030420-0000-0000-C000-000000000046}"></comInterfaceExternalProxyStub>
</assembly>
Note: The manifest main content of GrinderLib.sxs was generated by using mt.exe of the Windows SDK.
I've removed the OCX registration Regsvr32 /u Grinder.ocx from the registry, to try, if the manifests are working.
Currently this attempt isn't working. What am I missing?

Related

LGHT0001 : The process cannot access the file because it is being used by another process

I've googled the problem for hours but without finding any solution.
I'm using Wix 3.14 and every time I build on a build server I get this error. When I build locally on my computer, then it works every time, but never on the build server.
I build an msi-file and then bundle with another installation package to the setup executable.
2019-01-31T10:25:46.2328162Z Moving file 'D:\agent\_work\_temp\1jjhaplm\1jjhaplm\setup-bundle.exe' to 'D:\agent\_work\18\a\dist\setup-bundle.exe'.
2019-01-31T10:25:51.2172314Z light.exe : error LGHT0001 : The process cannot access the file because it is being used by another process.
This is how I build the package:
heat dir ./source -var var.SourceDir -cg MainComponentGroup -platform=x64 -dr INSTALLLOCATION -sreg -gg -o files.wxs
candle -arch x64 -dSourceDir=source -ext WixUtilExtension -ext WixUIExtension ambr.wxs files.wxs
light -ext WixUtilExtension -ext WixUIExtension ambr.wixobj files.wixobj -o setup.msi
candle -arch x64 -dSourceDir=source -ext WixUtilExtension -ext WixUIExtension -ext WixBalExtension Bundle.wxs
light -v -ext WixUtilExtension -ext WixUIExtension -ext WixBalExtension Bundle.wixobj -o setup-bundle.exe
The bundle.wxs file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:vi="http://schemas.visualinstaller.de/VisualInstallerWixExtension">
<?define UmRes="..\setup-utils\"?>
<?define UmVersionInfoMajor="1"?>
<?define UmVersionInfoMinor="0"?>
<?define UmVersionInfoRevision="0"?>
<?define PlatformGuidPart="BB64"?>
<?define GUID_BundleProduct="{206E1EC4-3377-$(var.UmVersionInfoMajor)$(var.UmVersionInfoMinor)$(var.UmVersionInfoRevision)0-$(var.PlatformGuidPart)-000F000F1337}" ?>
<?define Platform="x64"?>
<?define Configuration="release"?>
<?define UmCompilerVersion="vc140"?>
<?define OutDir="."?>
<?define UmProduct="The product"?>
<?include CommonIncludes.wxi ?>
<!-- Add minor version to some strings if the minor version is != 0. -->
<?if $(var.UmVersionInfoMinor) = "0" ?>
<!-- The format of the product name in GUI -->
<?define UmProd-display="$(var.UmProduct) $(var.UmVersionInfoMajor)" ?>
<!-- The format for the version number in the setup program. -->
<?define UmSetupVersion="$(var.UmVersionInfoMajor)"?>
<?else ?>
<?define UmProd-display="$(var.UmProduct) $(var.UmVersionInfoMajor).$(var.UmVersionInfoMinor)" ?>
<?if $(var.UmVersionInfoRevision) = "0" ?>
<?define UmSetupVersion="$(var.UmVersionInfoMajor)_$(var.UmVersionInfoMinor)"?>
<?else ?>
<?define UmSetupVersion="$(var.UmVersionInfoMajor)_$(var.UmVersionInfoMinor)_$(var.UmVersionInfoRevision)"?>
<?endif ?>
<?endif ?>
<?define UmSetupName="$(var.UmSuiteName) $(var.UmProduct)" ?>
<?define UmProductVersion="$(var.UmVersionInfoMajor).$(var.UmVersionInfoMinor).$(var.UmVersionInfoRevision).$(var.UmVersionInfoBuild)" ?>
<?define MongoDBMSI="mongodb-win32-x86_64-2008plus-ssl-3.6.9-signed.msi" ?>
<?define VCRedistSetup="VC_redist.x64.exe" ?>
<?define AMBRMSI="setup.msi" ?>
<Bundle Name="$(var.UmSetupName)" Version="$(var.UmVersionInfoMajor).$(var.UmVersionInfoMinor).$(var.UmVersionInfoRevision).$(var.UmVersionInfoBuild)"
Manufacturer="$(var.UmLegalName)"
UpgradeCode="$(var.GUID_BundleProduct)"
>
<!--<Update Location="http://test.laika42.com/UpdateInfo.xml"/>-->
<!-- Payload, that has to be added to run the boostrapper application -->
<!-- <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<PayloadGroupRef Id='VisualInstallerRuntimeFiles'/>
</BootstrapperApplicationRef> -->
<Variable Name="INSTALLDIR" bal:Overridable='no' Value='[$(var.UmProgramFilesFolder)]$(var.UmSuiteName)\$(var.UmProd-display)'/>
<Variable Name="MONGODBINSTALLDIR" bal:Overridable='yes' Value='[$(var.UmProgramFilesFolder)]\MongoDB\Server\3.6'/>
<Variable Name="PRODUCTVERSION" bal:Overridable='no' Value='$(var.UmProductVersion)'/>
<Variable Name="PRODUCTNAME" bal:Overridable='no' Value='$(var.UmProduct)'/>
<Variable Name="ADDLOCAL" Type="string" Value="all" Persisted="yes" bal:Overridable='yes'/>
<BootstrapperApplicationRef Id='WixStandardBootstrapperApplication.RtfLicense'>
<bal:WixStandardBootstrapperApplication
LicenseFile="General License Terms.rtf"
/>
</BootstrapperApplicationRef>
<Log/>
<Chain>
<PackageGroupRef Id="redist_vc140" />
<MsiPackage SourceFile='$(var.MongoDBMSI)' Compressed="yes" >
<MsiProperty Name='INSTALLLOCATION' Value='[MONGODBINSTALLDIR]'/>
<MsiProperty Name='SHOULD_INSTALL_COMPASS' Value='0'/>
</MsiPackage>
<MsiPackage SourceFile='$(var.AMBRMSI)'/>
</Chain>
</Bundle>
<!-- Microsoft Visual C++ Redistributable for Visual Studio 2017 -->
<!-- https://learn.microsoft.com/en-us/cpp/ide/redistributing-visual-cpp-files?view=vs-2017 -->
<Fragment>
<util:RegistrySearch Id="VCRedist"
Root="HKLM"
Key="SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\$(var.Platform)"
Value="Version"
Variable="VCRedistVersion"
/>
<!-- the result in VCRedistVersion looks like this: v14.16.27012.00 -->
<PackageGroup Id="redist_vc140">
<ExePackage Id="vc140" Cache="yes" PerMachine="yes" Permanent="yes" Vital="yes" Compressed="yes"
SourceFile="$(var.VCRedistSetup)"
Name="VC_redist.$(var.Platform).exe"
InstallCommand="/install /quiet /norestart"
InstallCondition="(NOT VCRedistVersion >= v14.16.27012.00) OR NOT VCRedistVersion"
/>
<!-- NOTE: When Visual Studio is updated with a new version of the bundled redist, the above path will no longer be correct, resulting in a build error.
That is a trigger for you, the developer, to update the version number both in SourceFile, and in InstallCondition -->
</PackageGroup>
</Fragment>
</Wix>
How to fix this or find out what the problem is?

Asp core wrong assembly redirect on publish

When publishing my asp core project using visual studio a .config file is created alongside my executable.
The .config includes a couple of bindingRedirect like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="6.0.0.0" newVersion="8.0.0.0" />
<bindingRedirect oldVersion="7.0.0.0" newVersion="8.0.0.0" />
<bindingRedirect oldVersion="6.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="8.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="7.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Serilog" publicKeyToken="24c2f752a8e58a10" culture="neutral" />
<bindingRedirect oldVersion="1.5.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="1.1.37.0" newVersion="1.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="1.2.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Here I want to change the bindingRedirect for Newtonsoft.Json to:
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
According to this blog post: http://blog.rytmis.net/2016/03/29/asp-net-core-and-assembly-binding-redirects/ I should be able to create an App.config and specify the binding there. However, I cannot get it to work. When I add one it still produces the same .config.
Any ideas?
NOTE: I could create a .config file in my project with the same name as my executable and with the correct bindingRedirect and then edit the publishOptions in my project.json file to include it. Then I would manually have to add all the other future bindingredirect.
You need to create a web.config transformation file.
This answer will come in handy in order to that as it is not easy to add it yourself - https://stackoverflow.com/a/16826106/1147920
You could also do it manually by creating a copy of the web.config file and renaming it to either web.release.config or web.{PublishProfile}.config (if you're using one).
To write the transform rule to edit the bindingRedirect refer to the official docs - https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/web-config-transformations

VB6 RegFree Com one click deployment

I made a vb6 reg free com one click deployment project
I added manifest file after publish and change content to use my vb name Green.exe instead of vb.net project name. also changed properties to content and copy if newer. When I install it on client, vb6 program cant start cause of not registered ocx. it means reg free com is not right.
we created lots of ocx which main vb6 program will using. Here is manifest file I created:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="Green.exe" version="1.0.0.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="x86" type="win32" />
<application />
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!--
UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="10" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
</dependentAssembly>
</dependency>
<file name="Green.exe" size="7184384">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>rqeYDzIVrIY9m/pVlyFdJ6tFpAc=</dsig:DigestValue>
</hash>
</file>
<file name="Green.ReportControl.v15.0.1.ocx" size="1370104">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>DR4oqg8TvRGA7901DvJ8kwQZt48=</dsig:DigestValue>
</hash>
</file>
<file name="GreenACITrans.ocx" size="937984">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>LbPTQBKEGlaE2nD02Lle+jPz1gU=</dsig:DigestValue>
</hash>
</file>
<file name="GreenBackUpRestore.ocx" size="217088">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft- com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>EALTeLxgFCOKv256oJyr7T0eRg8=</dsig:DigestValue>
</hash>
</file>
</asmv1:assembly>
Edited: I fixed it. there was a component which it cant be register and i didnt know. i placed it in setup package and now its working.
using this link steps:
https://msdn.microsoft.com/en-US/library/aa697429(v=vs.80).aspx
Thanks guys. it is not a hack. it is from microsoft link:
here . one of my ocx was from prev developer. i didnt know it makes a problem and shouldnt be in manifest. now it works as the link i placed said!

Wide Logo on start Screen in window store app?

In my app I want set set my default logo as wide logo.When user pin to start my app wide logo will be shown how to do that?
I tried to edit manifest file but every thing is fine there
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
<Identity Name="eaccc03b-ad21-4762-9c73-39835d6eb23b" Publisher="CN=Admin" Version="1.0.0.0" />
<Properties>
<DisplayName>App5</DisplayName>
<PublisherDisplayName>Admin</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.3.0</OSMinVersion>
<OSMaxVersionTested>6.3.0</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="App5.App">
<m2:VisualElements DisplayName="Kids" Square150x150Logo="Assets\Logo.png" Square30x30Logo="Assets\SmallLogo.png" Description="App5" ForegroundText="light" BackgroundColor="#464646">
<m2:DefaultTile Wide310x150Logo="Assets\WideLogo.png">
<m2:ShowNameOnTiles>
<m2:ShowOn Tile="wide310x150Logo" />
</m2:ShowNameOnTiles>
</m2:DefaultTile>
<m2:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#ffffff" />
<m2:InitialRotationPreference>
<m2:Rotation Preference="landscape" />
</m2:InitialRotationPreference>
</m2:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
Just add DefaultSize property:
<m2:DefaultTile Wide310x150Logo="Assets\WideLogo.png" DefaultSize="wide310x150Logo">
...
</m2:DefaultTile>
this will make the Wide Tile as Default tile. if you want the 150*150 logo as default,just change DefaultSize as DefaultSize="square150x150Logo"

WIX - how to resolve error LGHT0094: Unresolved reference to symbol

I'm using WIX 3.8 to create my setup file. This is my Product.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="{D16E42B5-3C6F-4EE5-B2F4-727BF8B74A92}" Name="My setup" Language="1033" Version="1.0.0.0" Manufacturer="Me" UpgradeCode="9279b740-8419-45c4-9538-6a45f8e949c7">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Media Id="1" Cabinet="WCF.cab" EmbedCab="yes" />
<Feature Id="ProductFeature" Title="Wcf.Setup" Level="1">
<ComponentGroupRef Id="WCFComponents" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INETPUB" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INETPUB" Name="Inetpub">
<Directory Id="INSTALLFOLDER" Name="WCF">
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
And here is the build file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebSiteSource>..\WCF\</WebSiteSource>
<SetupF>..\Setup\</SetupF>
<PublishF>publish\</PublishF>
<Publish>$(SetupF)$(PublishF)</Publish>
<WebSiteContentCode>WebSiteContent.wxs</WebSiteContentCode>
<WebSiteContentObject>WebSiteContent.wixobj</WebSiteContentObject>
<MsiOut>bin\Release\WCF.msi</MsiOut>
<WixPath>C:\PROGRA~2\WIXTOO~1.8\bin\</WixPath>
</PropertyGroup>
<ItemGroup>
<WebSiteContent Include="$(WebSiteContentCode)" />
</ItemGroup>
<ItemGroup>
<WixCode Include="Product.wxs" />
<WixCode Include="$(WebSiteContentCode)" />
</ItemGroup>
<ItemGroup>
<WixObject Include="Product.wixobj" />
<WixObject Include="$(WebSiteContentObject)" />
</ItemGroup>
<Target Name="Build">
<MSBuild
Projects="..\TMS.sln"
Targets="ReBuild"
Properties="Configuration=Release" />
</Target>
<Target Name="PublishWebsite">
<Message Text="Removing publish directory: $(SetupF)"/>
<RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
<Message Text="Start to publish website" Importance="high" />
<MSBuild
Projects="..\\WCF\WCF.csproj"
Targets="ResolveReferences;_CopyWebApplication"
Properties="OutDir=$(Publish)bin\;WebProjectOutputDir=
$(Publish);Configuration=Release" />
</Target>
<Target Name="Harvest">
<Exec
Command='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg WCFComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
ContinueOnError="false"
WorkingDirectory="." />
</Target>
<Target Name="WIX">
<Exec
Command='"$(WixPath)candle" -ext WixIISExtension -ext WixUtilExtension -ext WixSqlExtension -dpublishDir=$(Publish) -dMyWebResourceDir=. #(WixCode, &apos; &apos;)'
ContinueOnError="false"
WorkingDirectory="." />
<Exec
Command='"$(WixPath)light" -ext WixIISExtension -ext WixUIExtension -ext WixUtilExtension -ext WixSqlExtension -out $(MsiOut) #(WixObject, &apos; &apos;)'
ContinueOnError="false"
WorkingDirectory="." />
<Message Text="Install package has been created." />
</Target>
<Target Name="DeleteTmpFiles">
<RemoveDir Directories="$(Publish)" ContinueOnError="false" />
<RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
<Delete Files="#(WixObject);#(WebSiteContent)" />
</Target>
</Project>
I always receive the error message: Product.wxs(10): error LGHT0094: Unresolved reference to symbol 'WixComponentGroup:WCFComponents' in section 'Product:{D16E42B5-3C6F-4EE5-B2F4-727BF8B74A92}'.
I copied exactly the source code from this topic http://blog.bartdemeyer.be/2013/10/create-an-installer-for-website-with-wix-part-1/ to my project but the source code from here runs property but mine doesn't work.
Could you please help me to solve this problem? Thanks a lot.
I solved this problem by removing Build parameter from command line.
It should be:
msbuild setup.build /t:Build;PublishWebSite;Harvest;WIX;DeleteTmpFiles
The reason is you can’t build your solution because MyProject.Setup can’t be built.