Skip to content

Commit e6ea283

Browse files
committed
Nuget package for 0.3 published
1 parent 7a0b9af commit e6ea283

File tree

5 files changed

+33
-13
lines changed

5 files changed

+33
-13
lines changed

CGbR.GeneratorTests/CGbR.GeneratorTests.csproj

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<AssemblyName>CGbR.GeneratorTests</AssemblyName>
1212
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<NuGetPackageImportStamp>
15+
</NuGetPackageImportStamp>
1416
</PropertyGroup>
1517
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1618
<DebugSymbols>true</DebugSymbols>
@@ -32,12 +34,17 @@
3234
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
3335
</PropertyGroup>
3436
<ItemGroup>
37+
<Reference Include="CGbR.Lib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
38+
<HintPath>..\packages\CGbR.0.3\lib\CGbR.Lib.dll</HintPath>
39+
<Private>True</Private>
40+
</Reference>
41+
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
42+
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
3545
<Reference Include="System" />
3646
<Reference Include="System.Core" />
3747
<Reference Include="System.Runtime.Serialization" />
38-
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
39-
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
40-
</Reference>
4148
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb">
4249
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
4350
</Reference>
@@ -59,16 +66,17 @@
5966
<None Include="cgbr.json" />
6067
<None Include="packages.config" />
6168
</ItemGroup>
62-
<ItemGroup>
63-
<ProjectReference Include="..\CGbR.Lib\CGbR.Lib.csproj">
64-
<Project>{2e0e6ad3-7336-4ed0-ba8a-2c6d0cc99fed}</Project>
65-
<Name>CGbR.Lib</Name>
66-
</ProjectReference>
67-
</ItemGroup>
6869
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6970
<PropertyGroup>
7071
<PreBuildEvent>$(SolutionDir)bin\cgbr.exe $(ProjectDir)</PreBuildEvent>
7172
</PropertyGroup>
73+
<Import Project="..\packages\CGbR.0.3\build\cgbr.targets" Condition="Exists('..\packages\CGbR.0.3\build\cgbr.targets')" />
74+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
75+
<PropertyGroup>
76+
<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>
77+
</PropertyGroup>
78+
<Error Condition="!Exists('..\packages\CGbR.0.3\build\cgbr.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CGbR.0.3\build\cgbr.targets'))" />
79+
</Target>
7280
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7381
Other similar extension points exist, see Microsoft.Common.targets.
7482
<Target Name="BeforeBuild">
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
3+
<package id="CGbR" version="0.3" targetFramework="net451" />
4+
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net451" />
45
<package id="NUnit" version="3.2.0" targetFramework="net452" />
56
</packages>

CGbR.Lib/CGbR.Lib.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<DebugSymbols>true</DebugSymbols>
1818
<DebugType>full</DebugType>
1919
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
20+
<OutputPath>..\bin\</OutputPath>
2121
<DefineConstants>DEBUG;TRACE</DefineConstants>
2222
<ErrorReport>prompt</ErrorReport>
2323
<WarningLevel>4</WarningLevel>
@@ -26,7 +26,7 @@
2626
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2727
<DebugType>pdbonly</DebugType>
2828
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
29+
<OutputPath>..\bin\</OutputPath>
3030
<DefineConstants>TRACE</DefineConstants>
3131
<ErrorReport>prompt</ErrorReport>
3232
<WarningLevel>4</WarningLevel>

nuget/CGbR.0.3.nuspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@
1313
<language>en-US</language>
1414
<tags>generator json binary serializer</tags>
1515
</metadata>
16-
<files />
16+
<files>
17+
<file src="cgbr.targets" target="build\cgbr.targets" />
18+
<file src="cgbr.json" target="content\cgbr.json" />
19+
<file src="..\bin\CGbR.Lib.dll" target="lib\CGbR.Lib.dll" />
20+
<file src="..\bin\cgbr.exe" target="tools\cgbr.exe" />
21+
</files>
1722
</package>

nuget/cgbr.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Target Name="BeforeBuild">
4+
<Exec Command="$(SolutionDir)packages\CGbR.0.3\tools\cgbr.exe $(ProjectDir)"/>
5+
</Target>
6+
</Project>

0 commit comments

Comments
 (0)