Skip to content

Commit

Permalink
Cake build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancheung committed Mar 13, 2024
1 parent 372ed83 commit bc8e57a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions ImeSharp/ImeSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<RepositoryUrl>https://github.com/ryancheung/ImeSharp</RepositoryUrl>
<Authors>ryancheung</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -27,4 +28,8 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="../README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

</Project>
16 changes: 8 additions & 8 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#tool nuget:?package=vswhere&version=2.6.7
#tool nuget:?package=vswhere&version=3.1.7

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand All @@ -14,12 +14,12 @@ var apiKey = Argument("api-key", "");
//////////////////////////////////////////////////////////////////////

MSBuildSettings msPackSettings;
DotNetCoreMSBuildSettings dnBuildSettings;
DotNetCorePackSettings dnPackSettings;
DotNetMSBuildSettings dnBuildSettings;
DotNetPackSettings dnPackSettings;

private void PackDotnet(string filePath)
{
DotNetCorePack(filePath, dnPackSettings);
DotNetPack(filePath, dnPackSettings);
}

private void PackMSBuild(string filePath)
Expand Down Expand Up @@ -73,12 +73,12 @@ Task("Prep")
msPackSettings.WithProperty("Version", version);
msPackSettings.WithTarget("Pack");

dnBuildSettings = new DotNetCoreMSBuildSettings();
dnBuildSettings = new DotNetMSBuildSettings();
dnBuildSettings.WithProperty("Version", version);

dnPackSettings = new DotNetCorePackSettings();
dnPackSettings = new DotNetPackSettings();
dnPackSettings.MSBuildSettings = dnBuildSettings;
dnPackSettings.Verbosity = DotNetCoreVerbosity.Minimal;
dnPackSettings.Verbosity = DotNetVerbosity.Minimal;
dnPackSettings.Configuration = configuration;
});

Expand All @@ -87,7 +87,7 @@ Task("Build")
.WithCriteria(() => IsRunningOnWindows())
.Does(() =>
{
DotNetCoreRestore("ImeSharp/ImeSharp.csproj");
DotNetRestore("ImeSharp/ImeSharp.csproj");
PackDotnet("ImeSharp/ImeSharp.csproj");
});

Expand Down

0 comments on commit bc8e57a

Please sign in to comment.