Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [void][System.Reflection.Assembly]::Load('Microsoft.Build.Engine, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
- [void][Microsoft.Build.BuildEngine.Engine]::GlobalEngine.BuildProjectFile("path/main.proj")
- [void][System.Reflection.Assembly]::Load('Microsoft.Build.Engine, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
- $engine = New-Object Microsoft.Build.BuildEngine.Engine
- $engine.RegisterLogger((New-Object Microsoft.Build.BuildEngine.ConsoleLogger))
- $engine.BuildProjectFile('fullPathsome.proj')
- 'MSBUILD : warning MSB4056: The MSBuild engine must be called on
- a single-threaded-apartment. Current threading model is "MTA".
- Proceeding, but some tasks may not function correctly.'
- [void][System.Reflection.Assembly]::Load('Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
- $msbuild = [Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToDotNetFrameworkFile("msbuild.exe", "VersionLatest")
- &$msbuild fullPathsome.proj
- Microsoft.Build.Framework
- Microsoft.Build.BuildEngine
Add Comment
Please, Sign In to add comment