Skip to content

Commit 24931d9

Browse files
authored
Merge pull request #48 from nschonni/fix-build
Use MSBuild Copy and update Release targets
2 parents 71cd692 + 2fd2886 commit 24931d9

File tree

5 files changed

+26
-34
lines changed

5 files changed

+26
-34
lines changed

LibSass.NET.Tests/LibSass.NET.Tests.csproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
34
<Import Project="..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" />
45
<PropertyGroup>
56
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -112,22 +113,19 @@
112113
</ItemGroup>
113114
<ItemGroup />
114115
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
115-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
116116
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
117117
<PropertyGroup>
118118
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
119119
</PropertyGroup>
120120
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.1.0\build\net20\xunit.runner.visualstudio.props'))" />
121121
</Target>
122-
<PropertyGroup>
123-
<PostBuildEvent>copy "$(SolutionDir)bin\x86\libsass.dll" "$(OutputDir)libsass32.dll"
124-
copy "$(SolutionDir)bin\x64\libsass.dll" "$(OutputDir)libsass64.dll"</PostBuildEvent>
125-
</PropertyGroup>
126-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
122+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
127123
Other similar extension points exist, see Microsoft.Common.targets.
128124
<Target Name="BeforeBuild">
129125
</Target>
126+
-->
130127
<Target Name="AfterBuild">
128+
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" />
129+
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" />
131130
</Target>
132-
-->
133-
</Project>
131+
</Project>

LibSass.NET/LibSass.NET.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2727
<DebugType>pdbonly</DebugType>
2828
<Optimize>true</Optimize>
29-
<OutputPath>$(SolutionDir)bin\</OutputPath>
30-
<IntermediateOutputPath>$(SolutionDir)bin\obj\</IntermediateOutputPath>
29+
<OutputPath>$(SolutionDir)bin\Release\</OutputPath>
30+
<IntermediateOutputPath>$(SolutionDir)bin\Release\obj\</IntermediateOutputPath>
3131
<DefineConstants>TRACE</DefineConstants>
3232
<ErrorReport>prompt</ErrorReport>
3333
<WarningLevel>4</WarningLevel>
@@ -78,11 +78,11 @@
7878
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
7979
<!-- Build LibSass -->
8080
<Target Name="CopyLibSass" DependsOnTargets="BuildLibSass">
81-
<Exec Command="copy &quot;$(OutDir)x86\libsass.dll&quot; &quot;$(OutDir)libsass32.dll&quot;" LogStandardErrorAsError="true" ConsoleToMSBuild="true" />
82-
<Exec Command="copy &quot;$(OutDir)x64\libsass.dll&quot; &quot;$(OutDir)libsass64.dll&quot;" LogStandardErrorAsError="true" ConsoleToMSBuild="true" />
81+
<Copy SourceFiles="$(OutDir)x86\libsass.dll" DestinationFiles="$(OutDir)libsass32.dll" />
82+
<Copy SourceFiles="$(OutDir)x64\libsass.dll" DestinationFiles="$(OutDir)libsass64.dll" />
8383
</Target>
8484
<Target Name="BuildLibSass">
85-
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win32;OutDir=$(OutDir)x86\" />
86-
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win64;OutDir=$(OutDir)x64\" />
85+
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win32;OutDir=$(OutDir)x86\;IntDir=$(OutDir)x86\" />
86+
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win64;OutDir=$(OutDir)x64\;IntDir=$(OutDir)x64\" />
8787
</Target>
88-
</Project>
88+
</Project>

LibSass.NET/LibSass.Net.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<tags>SASS SCSS CSS LibSass</tags>
1414
</metadata>
1515
<files>
16-
<file src="..\bin\x64\libsass.dll" target="build\libsass64.dll" />
17-
<file src="..\bin\x86\libsass.dll" target="build\libsass32.dll" />
16+
<file src="..\bin\$configuration$\libsass64.dll" target="build\libsass64.dll" />
17+
<file src="..\bin\$configuration$\libsass32.dll" target="build\libsass32.dll" />
1818
<file src="libsassnet.targets" target="build\libsassnet.targets" />
19-
<file src="..\bin\LibSass.NET.dll" target="lib\net40\LibSass.NET.dll" />
19+
<file src="..\bin\$configuration$\LibSass.NET.dll" target="lib\net40\LibSass.NET.dll" />
2020
</files>
21-
</package>
21+
</package>

contrib/LibSass.NET.Console/LibSass.NET.Console.csproj

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<DebugType>full</DebugType>
2121
<Optimize>false</Optimize>
2222
<OutputPath>bin\Debug\</OutputPath>
23-
<IntermediateOutputPath>$(SolutionDir)bin\Debug\obj\</IntermediateOutputPath>
2423
<DefineConstants>DEBUG;TRACE</DefineConstants>
2524
<ErrorReport>prompt</ErrorReport>
2625
<WarningLevel>4</WarningLevel>
@@ -30,8 +29,7 @@
3029
<PlatformTarget>AnyCPU</PlatformTarget>
3130
<DebugType>pdbonly</DebugType>
3231
<Optimize>true</Optimize>
33-
<OutputPath>bin\</OutputPath>
34-
<IntermediateOutputPath>$(SolutionDir)bin\obj\</IntermediateOutputPath>
32+
<OutputPath>bin\Release\</OutputPath>
3533
<DefineConstants>TRACE</DefineConstants>
3634
<ErrorReport>prompt</ErrorReport>
3735
<WarningLevel>4</WarningLevel>
@@ -54,15 +52,13 @@
5452
</ProjectReference>
5553
</ItemGroup>
5654
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
57-
<PropertyGroup>
58-
<PostBuildEvent Condition="$(Configuration) == 'Debug'">copy "$(SolutionDir)bin\Debug\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
59-
<PostBuildEvent Condition="$(Configuration) == 'Release'">copy "$(SolutionDir)bin\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
60-
</PropertyGroup>
61-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
55+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6256
Other similar extension points exist, see Microsoft.Common.targets.
6357
<Target Name="BeforeBuild">
6458
</Target>
59+
-->
6560
<Target Name="AfterBuild">
61+
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" />
62+
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" />
6663
</Target>
67-
-->
6864
</Project>

contrib/LibSass.NET.Web/LibSass.NET.Web.csproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,13 @@
5555
<None Include="web.config.transform" />
5656
</ItemGroup>
5757
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
58-
<PropertyGroup>
59-
<PostBuildEvent Condition="$(Configuration) == 'Debug'">copy "$(SolutionDir)bin\Debug\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
60-
<PostBuildEvent Condition="$(Configuration) == 'Release'">copy "$(SolutionDir)bin\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
61-
</PropertyGroup>
62-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
58+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6359
Other similar extension points exist, see Microsoft.Common.targets.
6460
<Target Name="BeforeBuild">
6561
</Target>
62+
-->
6663
<Target Name="AfterBuild">
64+
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" />
65+
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" />
6766
</Target>
68-
-->
6967
</Project>

0 commit comments

Comments
 (0)