-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ConfigurationRemotingServer selfcontained (#3097)
This PR removes the dependency on the .net6 runtime for ConfigurationRemotingServer by making it selfcontained. The downside is that now we carry it in the package, but oh well... I had a long fight with PowerShell's contentFiles to pick the right modules, so what I ended up doing is to exclude contentFiles and add them manually as an AfterBuild task. We need the ref directory and the win modules in the same location as System.Management.Automation.dll
- Loading branch information
1 parent
ea86a01
commit cda7a08
Showing
7 changed files
with
107 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 30 additions & 6 deletions
36
src/ConfigurationRemotingServer/ConfigurationRemotingServer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,48 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion> | ||
<Platforms>x64;x86;arm64</Platforms> | ||
<RuntimeIdentifiers>win-x64;win-x86;win-arm64</RuntimeIdentifiers> | ||
<Platforms>x64;x86;arm;arm64</Platforms> | ||
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutputPath> | ||
<SelfContained>true</SelfContained> | ||
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm;win10-arm64</RuntimeIdentifiers> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Platform)' == 'x64' "> | ||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Platform)' == 'x86' "> | ||
<RuntimeIdentifier>win10-x86</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Platform)' == 'arm' "> | ||
<RuntimeIdentifier>win10-arm</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Platform)' == 'arm64' "> | ||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.csproj"> | ||
<PrivateAssets>build</PrivateAssets> | ||
</ProjectReference> | ||
<ProjectReference Include="..\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.csproj" /> | ||
</ItemGroup> | ||
|
||
<Target Name="PwshFiles" AfterTargets="AfterBuild" > | ||
<ItemGroup> | ||
<RefFiles Include="$(OutputPath)..\..\..\..\..\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\ref\**\*.*" /> | ||
<WinModuleFiles Include="$(OutputPath)..\..\..\..\..\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\$(TargetFramework)\win\Modules\**\*.*" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(RefFiles)" DestinationFolder="$(OutputPath)\ref\" /> | ||
<Copy SourceFiles="@(WinModuleFiles)" DestinationFolder="$(OutputPath)\Modules\%(RecursiveDir)\" /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters