Skip to content

Commit

Permalink
Revert to msbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point committed Dec 21, 2021
1 parent 7d890c5 commit dd681b7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
11 changes: 7 additions & 4 deletions Build/Build.Compile.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Nuke.Common;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.MSBuild;
using Nuke.Common.Tools.VSWhere;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;

partial class Build
{
Expand Down Expand Up @@ -30,8 +30,11 @@ static string GetMsBuildPath()
}

void CompileProject(string configuration, string toolPath) =>
DotNetBuild(settings => settings
MSBuild(s => s
.SetTargets("Rebuild")
.SetProcessToolPath(toolPath)
.SetConfiguration(configuration)
.SetVerbosity(DotNetVerbosity.Minimal));
.SetVerbosity(MSBuildVerbosity.Minimal)
.DisableNodeReuse()
.EnableRestore());
}
19 changes: 9 additions & 10 deletions RevitLookup/RevitLookup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<ImplicitUsings>true</ImplicitUsings>
<UseWindowsForms>true</UseWindowsForms>
<TargetFramework>net48</TargetFramework>
<Configuration>Debug;Release</Configuration>
<RevitVersion>2022</RevitVersion>
<Version>$(RevitVersion).0.3.1</Version>
</PropertyGroup>
Expand All @@ -26,18 +25,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Revit_API_x64" Version="$(RevitVersion).*"/>
<PackageReference Include="Revit_API_x64" Version="$(RevitVersion).*" />
</ItemGroup>

<ItemGroup>
<Resource Include="Resources\Images\RibbonIcon16.png"/>
<Resource Include="Resources\Images\RibbonIcon32.png"/>
<Resource Include="Resources\Images\RibbonIcon16.png" />
<Resource Include="Resources\Images\RibbonIcon32.png" />
</ItemGroup>

<Target Name="CopyFiles" AfterTargets="CoreBuild">
<ItemGroup>
<RootItem Include="$(ProjectDir)*.addin"/>
<AddinItem Include="$(TargetDir)$(AssemblyName).*"/>
<RootItem Include="$(ProjectDir)*.addin" />
<AddinItem Include="$(TargetDir)$(AssemblyName).*" />
<!--Files to copy to Revit add-ins folder-->
<!--<AddinItem Include="$(TargetDir)Simple.dll" />-->
</ItemGroup>
Expand All @@ -47,13 +46,13 @@
<AddinDir>$(RootDir)$(AssemblyName)\</AddinDir>
</PropertyGroup>

<Copy SourceFiles="@(RootItem)" DestinationFolder="$(RootDir)"/>
<Copy SourceFiles="@(AddinItem)" DestinationFolder="$(AddinDir)"/>
<Copy SourceFiles="@(RootItem)" DestinationFolder="$(RootDir)" />
<Copy SourceFiles="@(AddinItem)" DestinationFolder="$(AddinDir)" />

<ItemGroup>
<AddinFiles Include="$(RootDir)**\*.*"/>
<AddinFiles Include="$(RootDir)**\*.*" />
</ItemGroup>

<Copy SourceFiles="@(AddinFiles)" DestinationFolder="$(AppData)\Autodesk\Revit\Addins\$(RevitVersion)\%(RecursiveDir)" Condition="$(Configuration.Contains('Debug'))"/>
<Copy SourceFiles="@(AddinFiles)" DestinationFolder="$(AppData)\Autodesk\Revit\Addins\$(RevitVersion)\%(RecursiveDir)" Condition="$(Configuration.Contains('Debug'))" />
</Target>
</Project>

0 comments on commit dd681b7

Please sign in to comment.