public void Init()
		{
			doc = new WixDocument();
			string relativeFileNamePath = @"..\..\bin\Test.exe";
			fullPathBeforeWixDocumentLoaded = doc.GetFullPath(relativeFileNamePath);
			string fullFileName = @"C:\Projects\MySetup\Test\Test.exe";
			relativePathBeforeWixDocumentLoaded = doc.GetRelativePath(fullFileName);

			doc.LoadXml("<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'></Wix>");
			doc.FileName = @"C:\Projects\Test\Setup.wxs";
		}
Beispiel #2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            WixDocument document = GetWixDocument(context);

            // Convert relative path to full path for editing.
            string relativePath = (string)value;
            string fullPath     = document.GetFullPath(relativePath);
            string newFullPath  = (string)base.EditValue(context, provider, fullPath);

            // Convert full path back to relative path.
            return(document.GetRelativePath(newFullPath));
        }