Help with one step create all projects + installer (.NET + WiX)

I have preliminary events in the installer to rebuild projects with the appropriate configuration, etc.

If I right-click on the build / rebuild in the WiX (3.0) project in visual studio, all this will be fine, but if I try to run MSBuild in the wixproj file, the pre-build events will cause errors.

I can instead call a candle and light on wixproj, but it will not fire pre-build events.

Pre-build events rely on macros provided by VS, and I'm not sure how to get around this other than creating another project, and basically just use the project's pre-build event, which just screams to crack.

Another problem is that I need to transfer the self-updating version number in WiX from the command line.

I planned to use only csproj to process the version number and update it and just shell MSBuild and Candle and Light, but the problem is that I do not know how to access the solution catalog from code other than hard coding in

+2
source share
2 answers

It was easier for us to use the utility program for editing the project itself and reset all the events of the preliminary assembly and publication after we build it using our autobuider (in our case, VisualBuild ).

, - IDE , .

+2

, , .

  • ,
  • , , ( , %VersionNumber%), MSBuild
  • MSBuild , .exe .csproj, , ( MSBuild AssemblyInfo )
    , .exe 0.0 Visual Studio, Im , .
  • relase WiX, , , WiX candle light .
  • candle .wxs , : $(env.VersionNumber)
  • .msi, light, , ( ) : -out release\msi\bitbucket-backup-%VersionNumber%.msi

, , .

0

Source: https://habr.com/ru/post/1702263/


All Articles