Skip to content

Commit 485708d

Browse files
committed
Test to generate before building
1 parent 6ff8f3a commit 485708d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

telemetry/csharp/AwsToolkit.Telemetry.Events.Generator/AwsToolkit.Telemetry.Events.Generator.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
6+
<!--<TargetFrameworks>net8.0;net472</TargetFrameworks>-->
67
<RootNamespace>Amazon.AwsToolkit.Telemetry.Events.Generator</RootNamespace>
78
<AssemblyName>Amazon.AwsToolkit.Telemetry.Events.Generator</AssemblyName>
89
<Authors>Amazon Web Services</Authors>

telemetry/csharp/AwsToolkit.Telemetry.Events.Tests/AwsToolkit.Telemetry.Events.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>net472</TargetFramework>
44
<RootNamespace>Amazon.AwsToolkit.Telemetry.Events.Tests</RootNamespace>
@@ -31,6 +31,6 @@
3131
</None>
3232
</ItemGroup>
3333
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
34-
<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;" />
34+
<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" />
3535
</Target>
3636
</Project>

telemetry/csharp/AwsToolkit.Telemetry.Events/AwsToolkit.Telemetry.Events.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
<ItemGroup>
2424
<PackageReference Include="log4net" Version="2.0.16" />
2525
</ItemGroup>
26+
<!-- <ItemGroup>
27+
<ProjectReference Include="..\AwsToolkit.Telemetry.Events.Generator\AwsToolkit.Telemetry.Events.Generator.csproj" ReferenceOutputAssembly="False" />
28+
</ItemGroup>-->
2629
<ItemGroup>
2730
<Reference Include="System" />
2831
<Reference Include="System.Core" />
@@ -31,6 +34,6 @@
3134
<Reference Include="System.Xml" />
3235
</ItemGroup>
3336
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
34-
<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;" />
37+
<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" />
3538
</Target>
3639
</Project>

0 commit comments

Comments
 (0)