filoe / cscore

An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.14k stars 450 forks source link

When building .NET Standard version of CSCore an MSBUILD PostBuildEvent command exits with error code -1. #454

Open tysongibby opened 3 years ago

tysongibby commented 3 years ago

When compiling the .NET Standard branch, MSBUILD runs a PostBuildEvent command in the Microsoft.Common.CurrentVersion.targets file on line 5574 that causes the build to exit with code -1.

Code from Microsoft.Common.CurrentVersion.targets file:

  <Target
      Name="PostBuildEvent"
      Condition="'$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')"
      DependsOnTargets="$(PostBuildEventDependsOn)">

    <Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" />

  </Target>

Note: to compile code it was necessary to unload all .NET Framework projects still present in the solution. i.e. all of the projects in the "Samples" folder, the CSCore.Linux project, and the CSCore.Test project.

ADD-eNavarro commented 2 years ago

Hello Mr. Gibby, did you manage to make CSCore work on .NET Standard then?