Skip to content

Commit

Permalink
Enable generating NuGet packages via the MSBuild Pack target.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky committed Oct 28, 2018
1 parent 56019e8 commit acb3d46
Show file tree
Hide file tree
Showing 23 changed files with 42 additions and 72 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(MSBuildThisFileDirectory)artifacts/nuget</PackageOutputPath>
</PropertyGroup>
</Project>
3 changes: 3 additions & 0 deletions build/LegacyProject.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>
<Target Name="Pack" />
</Project>
4 changes: 2 additions & 2 deletions build/ReferenceCoreLibraries.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<Import Condition="'$(TargetFramework)' == 'netcoreapp2.0'" Project="CoreLibraries.props" />
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.0'">
<ProjectReference Include="$(MSBuildThisFileDirectory)/Avalonia.csproj" />
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)../packages/Avalonia/Avalonia.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/SampleApp.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<OutputType>WinExe</OutputType>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\packages\Avalonia.Desktop\Avalonia.Desktop.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\packages\Avalonia.Desktop\Avalonia.Desktop.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/System.Drawing.Common.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="4.5.0-preview1-25914-04" />
<PackageReference Include="System.Drawing.Common" Version="4.5.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion dirs.proj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<ProjectReference Include="build/**/*.*proj" />
<ProjectReference Include="src/**/*.*proj" />
<ProjectReference Include="samples/**/*.*proj" />
<ProjectReference Include="tests/**/*.*proj" />
<ProjectReference Include="packages/**/*.*proj" />
<ProjectReference Remove="**/*.shproj" />
<ProjectReference Remove="src/Markup/Avalonia.Markup.Xaml/PortableXaml/**/*.*proj" />
<ProjectReference Remove="**/*.pbxproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,5 @@
<Import Project="..\..\build\Rx.props" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\..\build\AndroidWorkarounds.props" />
<Import Project="..\..\build\LegacyProject.targets" />
</Project>
5 changes: 4 additions & 1 deletion samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<Project>
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
<Import Project="..\build\SharedVersion.props" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,5 @@
<Import Project="..\..\..\build\Rx.props" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\build\SkiaSharp.props" />
<Import Project="..\..\..\build\LegacyProject.targets" />
</Project>
9 changes: 1 addition & 8 deletions src/Android/Avalonia.Android/Avalonia.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Avalonia.Animation\Avalonia.Animation.csproj" />
<ProjectReference Include="..\..\Avalonia.Base\Avalonia.Base.csproj" />
<ProjectReference Include="..\..\Avalonia.Controls\Avalonia.Controls.csproj" />
<ProjectReference Include="..\..\Avalonia.Input\Avalonia.Input.csproj" />
<ProjectReference Include="..\..\Avalonia.Interactivity\Avalonia.Interactivity.csproj" />
<ProjectReference Include="..\..\Avalonia.Layout\Avalonia.Layout.csproj" />
<ProjectReference Include="..\..\Avalonia.Styling\Avalonia.Styling.csproj" />
<ProjectReference Include="..\..\Avalonia.Visuals\Avalonia.Visuals.csproj" />
<ProjectReference Include="..\..\..\packages\Avalonia\Avalonia.csproj" />
<ProjectReference Include="..\..\Skia\Avalonia.Skia\Avalonia.Skia.csproj" />
</ItemGroup>
<Import Project="..\..\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,5 @@
<Import Project="..\..\..\build\Rx.props" />
<Import Project="..\..\..\build\System.Memory.props" />
<Import Project="..\..\..\build\AndroidWorkarounds.props" />
<Import Project="..\..\..\build\LegacyProject.targets" />
</Project>
21 changes: 0 additions & 21 deletions src/Avalonia.DesignerSupport/Avalonia.DesignerSupport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,6 @@
need change when there are breaking changes to designer support api.
-->
<Version>0.7.0</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Avalonia.DesignerSupport.xml</DocumentationFile>
<NoWarn>CS1591;CS0067</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\Avalonia.DesignerSupport.xml</DocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
Expand All @@ -43,6 +23,5 @@
<ProjectReference Include="..\Avalonia.Styling\Avalonia.Styling.csproj" />
<ProjectReference Include="..\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
</ItemGroup>
<Import Project="..\..\build\Microsoft.CSharp.props" />
<Import Project="..\..\build\Rx.props" />
</Project>
4 changes: 4 additions & 0 deletions src/Avalonia.DesktopRuntime/Avalonia.DesktopRuntime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<ProjectReference Include="../Avalonia.Controls/Avalonia.Controls.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" Condition="'$(TargetFramework)' == 'net461'" />
</ItemGroup>

<Import Project="..\..\build\NetCore.props" />
<Import Project="..\Shared\PlatformSupport\PlatformSupport.projitems" />
</Project>
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Project>
<Import Project="..\Directory.Build.props" />
<Import Project="..\build\SharedVersion.props" />
<Import Project="..\build\SourceLink.props" Condition="'$(DisableSourceLink)' == ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ExtrasEnableWpfProjectSetup>true</ExtrasEnableWpfProjectSetup>
<ExtrasEnableImplicitWinFormsReferences>true</ExtrasEnableImplicitWinFormsReferences>
<UseDirect3D9>true</UseDirect3D9>
<PackageId>Avalonia.Win32.Interoperability</PackageId>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\packages\Avalonia\Avalonia.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,5 @@
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\..\build\Rx.props" />
<Import Project="..\..\..\build\iOSWorkarounds.props" />
<Import Project="..\..\..\build\LegacyProject.targets" />
</Project>
6 changes: 6 additions & 0 deletions src/tools/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions tests/Avalonia.Benchmarks/Avalonia.Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFramework>netcoreapp2.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Avalonia.Animation\Avalonia.Animation.csproj" />
Expand All @@ -23,4 +23,4 @@
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Update="**\*.xaml.cs">
Expand Down
15 changes: 0 additions & 15 deletions tests/Avalonia.Direct2D1.UnitTests/app.config

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<ProjectReference Include="..\..\src\Avalonia.Input\Avalonia.Input.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Interactivity\Avalonia.Interactivity.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Layout\Avalonia.Layout.csproj" />
<ProjectReference Include="..\..\src\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Visuals\Avalonia.Visuals.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj" />
<ProjectReference Include="..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
Expand All @@ -26,4 +25,4 @@
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>
</Project>
15 changes: 0 additions & 15 deletions tests/Avalonia.Layout.UnitTests/app.config

This file was deleted.

3 changes: 2 additions & 1 deletion tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputType>Library</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj" />
Expand All @@ -20,4 +21,4 @@
<Import Project="..\..\build\Moq.props" />
<Import Project="..\..\build\Rx.props" />
<Import Project="..\..\src\Shared\PlatformSupport\PlatformSupport.projitems" Label="Shared" />
</Project>
</Project>

0 comments on commit acb3d46

Please sign in to comment.