Update instructions for building from source (#5072)
- Use new S.M.A.dll for build instructions - Include custom build target in `internals.md` - build.sh no longer exists
This commit is contained in:
parent
07d3b1806c
commit
a2dc405242
|
@ -70,11 +70,28 @@ The necessary steps can be run manually:
|
|||
```sh
|
||||
cd ../TypeCatalogGen
|
||||
dotnet restore
|
||||
dotnet run ../Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CorePsTypeCatalog.cs powershell.inc
|
||||
dotnet run ../System.Management.Automation/CoreCLR/CorePsTypeCatalog.cs powershell.inc
|
||||
```
|
||||
|
||||
The file `powershell.inc` is generated by running a custom MSBuild target,
|
||||
which can be found at [`build.sh`](../../build.sh#L15).
|
||||
which can be set-up by navigating to the `src` directory and running the following commands:
|
||||
|
||||
```sh
|
||||
targetFile="Microsoft.PowerShell.SDK/obj/Microsoft.PowerShell.SDK.csproj.TypeCatalog.targets"
|
||||
cat > $targetFile <<-"EOF"
|
||||
<Project>
|
||||
<Target Name="_GetDependencies"
|
||||
DependsOnTargets="ResolveAssemblyReferencesDesignTime">
|
||||
<ItemGroup>
|
||||
<_RefAssemblyPath Include="%(_ReferencesFromRAR.ResolvedPath)%3B" Condition=" '%(_ReferencesFromRAR.Type)' == 'assembly' And '%(_ReferencesFromRAR.PackageName)' != 'Microsoft.Management.Infrastructure' " />
|
||||
</ItemGroup>
|
||||
<WriteLinesToFile File="$(_DependencyFile)" Lines="@(_RefAssemblyPath)" Overwrite="true" />
|
||||
</Target>
|
||||
</Project>
|
||||
EOF
|
||||
dotnet msbuild Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj /t:_GetDependencies "/property:DesignTimeBuild=true;_DependencyFile=$(pwd)/src/TypeCatalogGen/powershell.inc" /nologo
|
||||
```
|
||||
|
||||
`powershell.inc` contains the resolved paths to the DLLs of each dependency of PowerShell,
|
||||
and is taken as input to the [`TypeCatalogGen`](../../src/TypeCatalogGen) tool,
|
||||
which generates a source file `CorePsTypeCatalog.cs` for the `Microsoft.PowerShell.CoreCLR.AssemblyLoadContext` project.
|
||||
|
|
Loading…
Reference in a new issue