Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/QuantumSdk/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<Target Name="QsharpCompile"
Condition="'$(DesignTimeBuild)' != 'true'"
DependsOnTargets="ResolveAssemblyReferences;ResolveQscReferences;BeforeQsharpCompile;_CopyFilesMarkedCopyLocal"
BeforeTargets="BeforeCsharpCompile;BeforeBuild">
BeforeTargets="PrepareCsharpCompileAfterCsharpGeneration">
<MakeDir Directories="$(GeneratedFilesOutputPath)" />
<MakeDir Directories="$(QscBuildConfigOutputPath)" />
<MakeDir Condition="$(QsharpDocsGeneration)" Directories="$(QsharpDocsOutputPath)" />
Expand Down Expand Up @@ -80,7 +80,10 @@
</PropertyGroup>
<WriteLinesToFile File="$(_QscCommandArgsFile)" Lines="$(_QscCommandArgs)" Overwrite="true"/> <!-- we use a response file to avoid issues when the command gets long -->
<Exec Command="$(QscCommand)" IgnoreExitCode="false" />
<!-- configure the dll built by the C# compiler -->
</Target>

<!-- Configures the dll built by the C# compiler. This target needs to execute during the C# design time build to get accurate intellisense information for (non-generate) C# source files. -->
<Target Name="PrepareCsharpCompileAfterCsharpGeneration" DependsOnTargets="QsharpCompile" AfterTargets="QsharpCompile" BeforeTargets="BeforeCsharpCompile;BeforeBuild">
<ItemGroup>
<EmbeddedResource Include="$(GeneratedFilesOutputPath)$(PathCompatibleAssemblyName).bson" LogicalName="__qsharp_data__.bson" Visible="false" />
<Compile Condition="$(CsharpGeneration)" Include="$(GeneratedFilesOutputPath)**/*.g.cs" Exclude="@(Compile)" AutoGen="true" />
Expand Down