Hi Sathish,
I have tested the below and it works fine for me. Modify according to your (Folders & Model name), save the code, open PowerShell prompt as admin and run...
param (
[switch]
$Incremental,
[switch]
$Ref,
[string]
$Metadata = "K:\AOSService\PackagesLocalDirectory",
[string]
$CompilerMetadata = "K:\AOSService\PackagesLocalDirectory",
[string]
$XRefSqlServer = "localhost",
[string]
$XRefDbName = "DYNAMICSXREFDB",
[string]
$ModelModule = "ExtensionModel",
[string]
$OutPut = "K:\AOSService\PackagesLocalDirectory\ExtensionModel\bin",
[string]
$XmlLog = "K:\AOSService\PackagesLocalDirectory\ExtensionModel\BuildProjectResult.xml",
[string]
$Log = "K:\AOSService\PackagesLocalDirectory\ExtensionModel\BuildProjectResult.log",
[string]
$AppBase = "K:\AOSService\PackagesLocalDirectory\bin",
[string]
$RefPath = "K:\AOSService\PackagesLocalDirectory\ExtensionModel\bin",
[string]
$ReferenceFolder = "K:\AOSService\PackagesLocalDirectory",
[string]
$ApplicationPath = "K:\AOSService\PackagesLocalDirectory\bin\xppc.exe"
)
$arguments = @(
" -metadata=`"$Metadata`""
" -compilermetadata=`"$CompilerMetadata`""
" -xrefSqlServer=`"$XRefSqlServer`""
" -xrefDbName=`"$XRefDbName`""
" -modelModule=`"$ModelModule`""
" -output=`"$OutPut`""
" -xmllog=`"$XmlLog`""
" -log=`"$Log`""
" -appBase=`"$AppBase`""
" -refPath=`"$RefPath`""
" -referenceFolder=`"$ReferenceFolder`""
)
if ($Incremental) { $arguments += '-incremental' }
if ($Ref) { $arguments += '-xref' }
Start-Process -FilePath $ApplicationPath -ArgumentList $arguments -Wait -NoNewWindow