Add solution and project files

This commit is contained in:
TSR Berry 2022-12-15 16:06:27 +01:00
parent a0d88f9533
commit 64525347b8
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
3 changed files with 75 additions and 0 deletions

9
Directory.Packages.props Normal file
View file

@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.4.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
</ItemGroup>
</Project>

16
Ryujinx.CustomTasks.sln Normal file
View file

@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ryujinx.CustomTasks", "Ryujinx.CustomTasks\Ryujinx.CustomTasks.csproj", "{3CE98524-3E6A-469D-AEAB-C54594F571F7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3CE98524-3E6A-469D-AEAB-C54594F571F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CE98524-3E6A-469D-AEAB-C54594F571F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CE98524-3E6A-469D-AEAB-C54594F571F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CE98524-3E6A-469D-AEAB-C54594F571F7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,50 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
<PackageId>Ryujinx.CustomTasks</PackageId>
<Title>Ryujinx.CustomTasks</Title>
<Description>A collection of custom MSBuild tasks.</Description>
<Version>1.0.0</Version>
<RepositoryUrl>https://github.com/Ryujinx/Ryujinx.CustomTasks</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- This target will run when MSBuild is collecting the files to be packaged, and we'll implement it below. This property controls the dependency list for this packaging process, so by adding our custom property we hook ourselves into the process in a supported way. -->
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
<!-- This property tells MSBuild where the root folder of the package's build assets should be. Because we are not a library package, we should not pack to 'lib'. Instead, we choose 'tasks' by convention. -->
<BuildOutputTargetFolder>tasks</BuildOutputTargetFolder>
<!-- NuGet does validation that libraries in a package are exposed as dependencies, but we _explicitly_ do not want that behavior for MSBuild tasks. They are isolated by design. Therefore we ignore this specific warning. -->
<NoWarn>NU5100</NoWarn>
<!-- Tell the SDK to generate a deps.json file -->
<GenerateDependencyFile>true</GenerateDependencyFile>
<LangVersion>8</LangVersion>
</PropertyGroup>
<ItemGroup>
<Content Include="build/Ryujinx.CustomTasks.props" PackagePath="build\" />
<Content Include="build/Ryujinx.CustomTasks.targets" PackagePath="build\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" PrivateAssets="all" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" GeneratePathProperty="true" />
</ItemGroup>
<!-- This is the target we defined above. It's purpose is to add all of our PackageReference and ProjectReference's runtime assets to our package output. -->
<!-- Currently we have to manually specify the runtime assets, because for some reason ReferenceCopyLocalPaths is always empty. -->
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="bin\$(Configuration)\*\Microsoft.*.dll" />
</ItemGroup>
</Target>
<!-- This target adds the generated deps.json file to our package output -->
<Target Name="AddBuildDependencyFileToBuiltProjectOutputGroupOutput" BeforeTargets="BuiltProjectOutputGroup" Condition=" '$(GenerateDependencyFile)' == 'true'">
<ItemGroup>
<BuiltProjectOutputGroupOutput Include="$(ProjectDepsFilePath)" TargetPath="$(ProjectDepsFileName)" FinalOutputPath="$(ProjectDepsFilePath)" />
</ItemGroup>
</Target>
</Project>