winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

Microsoft.WinGet.Configuration.Cmdlets.csproj (4558B)


      1 <Project Sdk="Microsoft.NET.Sdk">
      2 
      3   <PropertyGroup>
      4     <!-- Keep in sync with attributes in AssemblyInfo.cs -->
      5     <TargetFramework>net8.0-windows10.0.26100</TargetFramework>
      6     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
      7     <OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutputPath>
      8     <GenerateDocumentationFile>true</GenerateDocumentationFile>
      9     <DocumentationFile>$(OutputPath)\$(MSBuildProjectName).xml</DocumentationFile>
     10     <RuntimeIdentifier>win</RuntimeIdentifier>
     11     <BuildOutputDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</BuildOutputDirectory>
     12     <RootNamespace>Microsoft.WinGet.Configuration</RootNamespace>
     13     <Configurations>Debug;Release;ReleaseStatic</Configurations>
     14   </PropertyGroup>
     15 
     16   <PropertyGroup Condition="'$(Configuration)'=='Release'">
     17     <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
     18   </PropertyGroup>
     19 
     20   <PropertyGroup Condition="'$(Configuration)'=='ReleaseStatic'">
     21     <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
     22   </PropertyGroup>
     23 
     24   <ItemGroup>
     25     <AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
     26   </ItemGroup>
     27 
     28   <ItemGroup>
     29     <Compile Include="..\CommonFiles\WinGetAssemblyLoadContext.cs" Link="WinGetAssemblyLoadContext.cs" />
     30   </ItemGroup>
     31 
     32   <ItemGroup>
     33     <PackageReference Include="Newtonsoft.Json" />
     34     <PackageReference Include="PowerShellStandard.Library" PrivateAssets="all" />
     35     <PackageReference Include="StyleCop.Analyzers">
     36       <PrivateAssets>all</PrivateAssets>
     37       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     38     </PackageReference>
     39   </ItemGroup>
     40 
     41   <Import Project="..\..\targets\ReferenceEmbeddedCsWinRTProject.targets" />
     42 
     43   <ItemGroup>
     44     <ProjectReference Include="..\Microsoft.WinGet.Configuration.Engine\Microsoft.WinGet.Configuration.Engine.csproj" />
     45   </ItemGroup>
     46 
     47   <!-- Build PowerShell Module -->
     48   <PropertyGroup>
     49     <PowerShellModuleOutputDirectory>$(BuildOutputDirectory)PowerShell\Microsoft.WinGet.Configuration</PowerShellModuleOutputDirectory>
     50     <PowerShellModuleSharedDependencies>$(PowerShellModuleOutputDirectory)\SharedDependencies</PowerShellModuleSharedDependencies>
     51     <PowerShellModuleDirectDependencies>$(PowerShellModuleOutputDirectory)\DirectDependencies</PowerShellModuleDirectDependencies>
     52   </PropertyGroup>
     53 
     54   <!-- PowerShell Files-->
     55   <Target Name="CopyModuleFiles" AfterTargets="AfterBuild">
     56     <ItemGroup>
     57       <ModuleFiles Include="$(ProjectDir)\..\Microsoft.WinGet.Configuration\ModuleFiles\**\*.*" />
     58     </ItemGroup>
     59     <Message Importance="high" Text="Copying PowerShell module files to '$(PowerShellModuleOutputDirectory)'" />
     60     <Copy SourceFiles="@(ModuleFiles)" DestinationFiles="$(PowerShellModuleOutputDirectory)\%(RecursiveDir)%(Filename)%(Extension)" />
     61   </Target>
     62 
     63   <!-- Main binaries -->
     64   <Target Name="CopyCmdletBinaries" AfterTargets="AfterBuild">
     65     <ItemGroup>
     66       <ModuleCmdletFile Include="$(OutputPath)Microsoft.WinGet.Configuration.Cmdlets.dll" />
     67       <ModuleCmdletFile Include="$(OutputPath)Microsoft.WinGet.Configuration.Cmdlets.pdb" />
     68     </ItemGroup>
     69     <Message Importance="high" Text="Copying CopyCmdletBinaries: '@(ModuleCmdletFile)'" />
     70     <Copy SourceFiles="@(ModuleCmdletFile)" DestinationFolder="$(PowerShellModuleOutputDirectory)" />
     71   </Target>
     72 
     73   <!-- Direct dependencies -->
     74   <Target Name="CopyDirectDependencies" AfterTargets="AfterBuild">
     75     <ItemGroup>
     76       <ModuleDirectDependency Include="$(OutputPath)Microsoft.WinGet.Configuration.Engine.dll" />
     77       <ModuleDirectDependency Include="$(OutputPath)Microsoft.WinGet.Configuration.Engine.pdb" />
     78     </ItemGroup>
     79     <Message Importance="high" Text="Copying direct dependencies: '@(ModuleDirectDependency)'" />
     80     <Copy SourceFiles="@(ModuleDirectDependency)" DestinationFolder="$(PowerShellModuleDirectDependencies)" />
     81   </Target>
     82 
     83   <!-- Shared dependencies -->
     84   <Target Name="CopySharedDependencies" AfterTargets="AfterBuild">
     85     <ItemGroup>
     86       <ModuleSharedDependency Include="$(OutputPath)Microsoft.Management.Configuration.Processor.dll" />
     87       <ModuleSharedDependency Include="$(OutputPath)Microsoft.WinGet.SharedLib.dll" />
     88     </ItemGroup>
     89     <Message Importance="high" Text="Copying shared dependencies: '@(ModuleSharedDependency)'" />
     90     <Copy SourceFiles="@(ModuleSharedDependency)" DestinationFolder="$(PowerShellModuleSharedDependencies)" />
     91   </Target>
     92 
     93 </Project>