Closed vicancy closed 6 years ago
Thanks @heaths, could you share where to get the formatted error log
? Is it ISetupInstance2.GetErrors()
? It only contains GetFailedPackages
however no error messages in there.
QI on ISetupErrorState
returned from GetErrors
for for ISetupErrorState2 and you can call GetErrorLogFilePath
.
Thanks @heaths It looks working although the log does not exist in my local machine, probably got cleaned up.. Is there any additional error code to indicate if the failure is a fatal one or not?
Hi @rainersigwald , what's your opinion? Looks like I ran into this state because some packages failed to install, It CAN be packages with minor features that does not affect VS running, it can also be packages that affects the core feature of VS. In my case, it is some minor feature that fails. Do you think it is more accurate to return the instance if it is Registered
and meanwhile return the error message?
If the failure if vital failure (failure in a vital package, for which there are few) the Registered
state should not be present.
The path - apart from having the version number in it despite now being part of Visual Studio - is fixed. It hasn't changed structure in many years. Did you take a look at my sample on the vswhere wiki? You could codify that.
@heaths I meant that this assembly/repo exists to make it easier to use this than to keep manually constructing environment variables hard-coded to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin
that screw up all your hard work on the setup side. Since that is extremely permissive with respect to VS install state, I think we should be too--it's still strictly better this way.
I wasn't arguing against this repo. I'm saying that I don't think constructing the path based on a fixed directory structure is naïve. I was referencing this example as an approach to constructing paths, though I realize (now that I'm typing from my phone) it wasn't the sample I was thinking of. I wrote one once (maybe it was in an email) that basically took the major version component of the InstallationVersion
of the found instance and used it in the path, e.g. "MSBuild\
Fix #17