Use MSBuild to copy output instead of bash in external tool template

This commit is contained in:
YoshiRulz 2020-02-06 23:51:46 +10:00
parent d9243fe15d
commit 02dc42d453
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
7 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,2 @@
#!/bin/sh
name="$(basename "$PWD").dll"
CscToolExe="$(which csc)" dotnet build -c Debug -m && cp -f "bin/Debug/net48/$name" "../../output/ExternalTools/$name"
CscToolExe="$(which csc)" dotnet build -c Debug -m

View File

@ -1,3 +1,2 @@
#!/bin/sh
name="$(basename "$PWD").dll"
CscToolExe="$(which csc)" dotnet build -c Release -m && cp -f "bin/Release/net48/$name" "../../output/ExternalTools/$name"
CscToolExe="$(which csc)" dotnet build -c Release -m

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(ProjectDir)../Common.props" />
<Import Project="$(ProjectDir)../NET48ExternalToolForm.props" />
<Import Project="$(ProjectDir)../NET48ExternalToolForm.targets" />
<ItemGroup>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Compile Update="AutoGenConfigForm.cs" SubType="Form" />

View File

@ -5,7 +5,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<OutputPath>$(ProjectDir)bin/$(Configuration)</OutputPath>
<OutputPath>$(ProjectDir)bin/$(Configuration)/</OutputPath>
<PlatformTarget>AnyCPU</PlatformTarget>
<RunAnalyzersDuringBuild Condition=" '$(MachineRunAnalyzersDuringBuild)' == '' ">false</RunAnalyzersDuringBuild>
<RunCodeAnalysis>false</RunCodeAnalysis>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(ProjectDir)../Common.props" />
<Import Project="$(ProjectDir)../NET48ExternalToolForm.props" />
<Import Project="$(ProjectDir)../NET48ExternalToolForm.targets" />
<PropertyGroup>
<GenerateResourceMSBuildArchitecture Condition=" '$(GenerateResourceMSBuildArchitecture)' == '' ">CurrentArchitecture</GenerateResourceMSBuildArchitecture>
<GenerateResourceMSBuildRuntime Condition=" '$(GenerateResourceMSBuildRuntime)' == '' ">CurrentRuntime</GenerateResourceMSBuildRuntime>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(ProjectDir)../Common.props" />
<Import Project="$(ProjectDir)../NET48ExternalToolForm.props" />
<Import Project="$(ProjectDir)../NET48ExternalToolForm.targets" />
<ItemGroup>
<EmbeddedResource Include="icon_Hello.ico" />
</ItemGroup>

View File

@ -24,4 +24,7 @@
HintPath="$(ProjectDir)../../output/BizHawk.Emulation.DiscSystem.dll"
Private="true" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(OutputPath)$(MSBuildProjectName).dll" DestinationFolder="$(ProjectDir)../../output/ExternalTools" />
</Target>
</Project>