Comments (4)
You managed to solve it because you switched to an absolute path. Your process's current directory has no impact on absolute paths. Life is good. :)
However when you were using relative paths then they are always relative to the process current dir.
absolute_path = curr_dir + relative_path
When you set SourceBaseDir
you are saying to to WixSharp compiler "during the build, do not use currentdir but SourceBaseDir for all MSI input files relative paths"
absolute_path = SourceBaseDir + relative_path
This will be happening during the execution of WiX compilers (project.BuildMsi()
call) but not when you are calling your Path.GetFullPath(...)
from wixsharp.
I think the problem is caused by the SourceBaseDir being set to some location.
All relative paths are resolved against project.SourceBasedDir
, which by default is a currentdir of the current process.
Thus you will need to find a way to adjust your relative path against your Constants.SOURCEDIR
from wixsharp.
I think the problem is caused by the SourceBaseDir being set to some location. All relative paths are resolved against
project.SourceBasedDir
, which by default is a currentdir of the current process.Thus you will need to find a way to adjust your relative path against your
Constants.SOURCEDIR
Hi @oleg-shilo
But Path.GetFullPath resolves to absolute path already (which is also proved working if I give whole absolute path in pfxPath.
So it is confusing me.
- Do you mean to say Path.GetFullPath gets resolved relative to SourceDir when MSI is being run?
- If yes to 1, is there a way I can use a public property for certificate path & set property at some event so that MSI can resolve digital signature?
from wixsharp.
I think the problem is caused by the SourceBaseDir being set to some location. All relative paths are resolved against
project.SourceBasedDir
, which by default is a currentdir of the current process.
Thus you will need to find a way to adjust your relative path against yourConstants.SOURCEDIR
Hi @oleg-shilo But Path.GetFullPath resolves to absolute path already (which is also proved working if I give whole absolute path in pfxPath. So it is confusing me.
- Do you mean to say Path.GetFullPath gets resolved relative to SourceDir when MSI is being run?
- If yes to 1, is there a way I can use a public property for certificate path & set property at some event so that MSI can resolve digital signature?
Hi @oleg-shilo
I somehow resolved it by doing below steps, but I am still unclear about concept of relative path being used in WixSharp.
- I pasted licence.rtf & certificate file on the path where MSI gets generated.
- In the script, I took Path.GetFullPath of those files, like, Path.GetFullPath("licence.rtf") & Path.GetFullPath("certificate.p12") in respective variables licencePath & certificatePath.
- I used these variables in project.LicenceFile & DigitalSigntaure respectively.
- MSI got compiled and it got signed as well.
Please refer below screen shot for code changes.
Please refer below screen shot where I pasted files
Question : Can you please explain this concept of relative path as I am still confused why and how it worked?
from wixsharp.
Related Issues (20)
- set Wix Toolset version for WixSharp HOT 5
- Duplicate component IDs are added when shortcuts are added HOT 4
- Fonts are not installed for all users HOT 4
- Custom Behavior for "X" button in the title bar HOT 3
- Cannot build .net 8 example project HOT 8
- Tags are wrong in git HOT 2
- "Complete" feature gets added automatically & after installation of MSI, an empty feature folder installed even if it is not selected HOT 14
- installDir variable erased depending on ManagedProject structure HOT 5
- Shortcut "Target" produces unexpected results for many supported WiX environment constants HOT 4
- (Race condition?) Issue with form load order (difficult to reproduce) HOT 5
- > since I know now root cause of my issue, how can I include sub folders in my new Files constructor or somewhere in Files HOT 3
- Dotnet tool should not be relied on for wixsharp. HOT 1
- Info: SFXCA: Failed to create temp directory. Error code 5 HOT 1
- How to execute rollback imeediately If i click on cancel after install execute sequence has started ? HOT 3
- Overview of which SetupEventHandler is fired on which type of project HOT 2
- Wix Woolkit 3.14.1 not working "SFXCA: Failed to create temp directory. Error code 5" HOT 1
- MSI build is failing with failed to add file - Even path is available HOT 7
- How to see in WixSharp project which Wix toolkit version is being used AFTER it has been created? HOT 3
- Restart Office apps after installation HOT 23
- Build issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wixsharp.