Skip to content

Commit

Permalink
Test to generate before building
Browse files Browse the repository at this point in the history
  • Loading branch information
awschristou committed Aug 21, 2024
1 parent 6ff8f3a commit 485708d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<!--<TargetFrameworks>net8.0;net472</TargetFrameworks>-->
<RootNamespace>Amazon.AwsToolkit.Telemetry.Events.Generator</RootNamespace>
<AssemblyName>Amazon.AwsToolkit.Telemetry.Events.Generator</AssemblyName>
<Authors>Amazon Web Services</Authors>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<RootNamespace>Amazon.AwsToolkit.Telemetry.Events.Tests</RootNamespace>
Expand Down Expand Up @@ -31,6 +31,6 @@
</None>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="rem BUILD THE GENERATOR, THEN USE IT TO GENERATE CODE INTO THE TEST PROJECT&#xD;&#xA;dotnet build &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot;&#xD;&#xA;dotnet run --project &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot; -o $(ProjectDir)\Generated --namespace Amazon.AwsToolkit.Telemetry.Events.Tests.Generated --s supplementDefinitions.json --f SupplementalCode.cs&#xD;&#xA;" />
<Exec Command="rem BUILD THE GENERATOR, THEN USE IT TO GENERATE CODE INTO THE TEST PROJECT&#xD;&#xA;rem dotnet build &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot;&#xD;&#xA;rem dotnet run --no-build --project &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot; -o $(ProjectDir)\Generated --namespace Amazon.AwsToolkit.Telemetry.Events.Tests.Generated --s supplementDefinitions.json --f SupplementalCode.cs&#xD;&#xA;&quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\bin\$(Configuration)\net8.0\Amazon.AwsToolkit.Telemetry.Events.Generator.exe&quot; -o $(ProjectDir)\Generated --namespace Amazon.AwsToolkit.Telemetry.Events.Tests.Generated --s supplementDefinitions.json --f SupplementalCode.cs" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.16" />
</ItemGroup>
<!-- <ItemGroup>
<ProjectReference Include="..\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj" ReferenceOutputAssembly="False" />
</ItemGroup>-->
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -31,6 +34,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="rem BUILD THE GENERATOR, THEN USE IT TO GENERATE CODE INTO THE TEST PROJECT&#xD;&#xA;dotnet build &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot;&#xD;&#xA;dotnet run --project &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot; -o $(ProjectDir)\Generated&#xD;&#xA;" />
<Exec Command="rem BUILD THE GENERATOR, THEN USE IT TO GENERATE CODE INTO THE TEST PROJECT&#xD;&#xA;rem dotnet build &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot;&#xD;&#xA;rem dotnet run --project &quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj&quot; -o $(ProjectDir)\Generated&#xD;&#xA;&quot;$(SolutionDir)\AwsToolkit.Telemetry.Events.Generator\bin\$(Configuration)\net8.0\Amazon.AwsToolkit.Telemetry.Events.Generator.exe&quot; -o $(ProjectDir)\Generated" />
</Target>
</Project>

0 comments on commit 485708d

Please sign in to comment.