Skip to content

Commit

Permalink
Remove external binaries from publish. External packages are restored…
Browse files Browse the repository at this point in the history
… with a separate csproj. (#273)
  • Loading branch information
codito authored Dec 13, 2016
1 parent 216fa75 commit 7394dfb
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 20 deletions.
2 changes: 2 additions & 0 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ function Restore-Package

Write-Log ".. .. Restore-Package: Source: $TPB_Solution"
& $dotnetExe restore $TPB_Solution --packages $env:TP_PACKAGES_DIR -v:minimal
Write-Log ".. .. Restore-Package: Source: $env:TP_ROOT_DIR\src\package\external\external.csproj"
& $dotnetExe restore $env:TP_ROOT_DIR\src\package\external\external.csproj --packages $env:TP_PACKAGES_DIR -v:minimal
Write-Log ".. .. Restore-Package: Complete."

if ($lastExitCode -ne 0) {
Expand Down
46 changes: 46 additions & 0 deletions src/package/external/external.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../../</TestPlatformRoot>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
<TargetFrameworks>net46</TargetFrameworks>
<AssemblyName>restore</AssemblyName>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>

<!-- This proj file shouldn't create outputs during build or publish -->
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
</PropertyGroup>
<ItemGroup>
<!-- This csproj restore external tools required for build process -->
<PackageReference Include="NuGet.CommandLine">
<Version>3.4.3</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="fmdev.xlftool">
<Version>0.1.2</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="MicroBuild.Core">
<Version>0.2.0</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />

<Target Name="CoreCompile" /> <!-- Prevent Csc from being called -->
</Project>
29 changes: 9 additions & 20 deletions src/package/package.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--<Target Name="WorkAroundToSkipPreprocessingBinaries" BeforeTargets="RunProduceContentAssets">
<ItemGroup>
<FileDependencies>
<codeLanguage Condition="'%(FileDependencies.codeLanguage)' == 'any' and '%(FileDependencies.Extension)' == '.dll'">binary</codeLanguage>
</FileDependencies>
</ItemGroup>
</Target>-->
<PropertyGroup>
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">../../</TestPlatformRoot>
</PropertyGroup>
Expand All @@ -23,6 +16,12 @@
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>

<!-- This proj file shouldn't create outputs during build or publish -->
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp1.0'">
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
Expand All @@ -47,18 +46,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<PackageReference Include="NuGet.CommandLine">
<Version>3.4.3</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="fmdev.xlftool">
<Version>0.1.2</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="MicroBuild.Core">
<Version>0.2.0</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
Expand All @@ -71,4 +58,6 @@
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>

<Target Name="CoreCompile" /> <!-- Prevent Csc from being called -->
</Project>

0 comments on commit 7394dfb

Please sign in to comment.