Skip to content

Commit

Permalink
Merge pull request sass#48 from nschonni/fix-build
Browse files Browse the repository at this point in the history
Use MSBuild Copy and update Release targets
  • Loading branch information
darrenkopp authored Jan 12, 2017
2 parents 71cd692 + 2fd2886 commit 24931d9
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 34 deletions.
14 changes: 6 additions & 8 deletions LibSass.NET.Tests/LibSass.NET.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<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')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -112,22 +113,19 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<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>
</PropertyGroup>
<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'))" />
</Target>
<PropertyGroup>
<PostBuildEvent>copy "$(SolutionDir)bin\x86\libsass.dll" "$(OutputDir)libsass32.dll"
copy "$(SolutionDir)bin\x64\libsass.dll" "$(OutputDir)libsass64.dll"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
-->
<Target Name="AfterBuild">
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" />
</Target>
-->
</Project>
</Project>
14 changes: 7 additions & 7 deletions LibSass.NET/LibSass.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)bin\</OutputPath>
<IntermediateOutputPath>$(SolutionDir)bin\obj\</IntermediateOutputPath>
<OutputPath>$(SolutionDir)bin\Release\</OutputPath>
<IntermediateOutputPath>$(SolutionDir)bin\Release\obj\</IntermediateOutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -78,11 +78,11 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- Build LibSass -->
<Target Name="CopyLibSass" DependsOnTargets="BuildLibSass">
<Exec Command="copy &quot;$(OutDir)x86\libsass.dll&quot; &quot;$(OutDir)libsass32.dll&quot;" LogStandardErrorAsError="true" ConsoleToMSBuild="true" />
<Exec Command="copy &quot;$(OutDir)x64\libsass.dll&quot; &quot;$(OutDir)libsass64.dll&quot;" LogStandardErrorAsError="true" ConsoleToMSBuild="true" />
<Copy SourceFiles="$(OutDir)x86\libsass.dll" DestinationFiles="$(OutDir)libsass32.dll" />
<Copy SourceFiles="$(OutDir)x64\libsass.dll" DestinationFiles="$(OutDir)libsass64.dll" />
</Target>
<Target Name="BuildLibSass">
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win32;OutDir=$(OutDir)x86\" />
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win64;OutDir=$(OutDir)x64\" />
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win32;OutDir=$(OutDir)x86\;IntDir=$(OutDir)x86\" />
<MSBuild Targets="Build" Projects="..\LibSass\win\libsass.sln" BuildInParallel="true" Properties="Configuration=$(Configuration);Platform=Win64;OutDir=$(OutDir)x64\;IntDir=$(OutDir)x64\" />
</Target>
</Project>
</Project>
8 changes: 4 additions & 4 deletions LibSass.NET/LibSass.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<tags>SASS SCSS CSS LibSass</tags>
</metadata>
<files>
<file src="..\bin\x64\libsass.dll" target="build\libsass64.dll" />
<file src="..\bin\x86\libsass.dll" target="build\libsass32.dll" />
<file src="..\bin\$configuration$\libsass64.dll" target="build\libsass64.dll" />
<file src="..\bin\$configuration$\libsass32.dll" target="build\libsass32.dll" />
<file src="libsassnet.targets" target="build\libsassnet.targets" />
<file src="..\bin\LibSass.NET.dll" target="lib\net40\LibSass.NET.dll" />
<file src="..\bin\$configuration$\LibSass.NET.dll" target="lib\net40\LibSass.NET.dll" />
</files>
</package>
</package>
14 changes: 5 additions & 9 deletions contrib/LibSass.NET.Console/LibSass.NET.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<IntermediateOutputPath>$(SolutionDir)bin\Debug\obj\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -30,8 +29,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<IntermediateOutputPath>$(SolutionDir)bin\obj\</IntermediateOutputPath>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -54,15 +52,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition="$(Configuration) == 'Debug'">copy "$(SolutionDir)bin\Debug\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
<PostBuildEvent Condition="$(Configuration) == 'Release'">copy "$(SolutionDir)bin\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
-->
<Target Name="AfterBuild">
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" />
</Target>
-->
</Project>
10 changes: 4 additions & 6 deletions contrib/LibSass.NET.Web/LibSass.NET.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,13 @@
<None Include="web.config.transform" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent Condition="$(Configuration) == 'Debug'">copy "$(SolutionDir)bin\Debug\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
<PostBuildEvent Condition="$(Configuration) == 'Release'">copy "$(SolutionDir)bin\libsass.dll" "$(OutputDir)libsass.dll"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
-->
<Target Name="AfterBuild">
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass32.dll" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(SolutionDir)$(OutDir)\libsass64.dll" DestinationFolder="$(TargetDir)" />
</Target>
-->
</Project>

0 comments on commit 24931d9

Please sign in to comment.