diff --git a/build/common-testapps.props b/build/common-testapps.props index 2eb7ed1..6bb8ba9 100644 --- a/build/common-testapps.props +++ b/build/common-testapps.props @@ -4,11 +4,8 @@ $(MvcRazorCompileOnPublish) - - - + diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj index 87b2c5c..6859f39 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.csproj @@ -11,31 +11,14 @@ true exe ..\..\tools\Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86\ - - false - - - - - - - - - - - - - + + + + diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net461/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net461/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets deleted file mode 100644 index 0d3599e..0000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/net461/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets +++ /dev/null @@ -1,50 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - $(OutputPath)$(MSBuildThisFileName).exe - $(OutputPath)$(MSBuildThisFileName)-x86.exe - - - - - - <_PreCompilationFilesToCopy Include="$(OutputPath)$(AssemblyName).exe.config"> - $(OutputPath)$(MSBuildThisFileName)-x86.exe.config - - - - - <_PreCompilationFilesToCopy Include="$(OutputPath)$(AssemblyName).exe.config" Condition=""> - $(OutputPath)$(MSBuildThisFileName).exe.config - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets deleted file mode 100644 index 4f3da09..0000000 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netcoreapp2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets +++ /dev/null @@ -1,35 +0,0 @@ - - - - dotnet - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - <_MvcViewCompilationBinaryPath Condition="'$(_MvcViewCompilationBinaryPath)'==''">$(MSBuildThisFileDirectory)../../lib/netcoreapp2.0/$(MSBuildThisFileName).dll - - - - - - - --runtimeconfig "$(ProjectRuntimeConfigFilePath)" - $(ExecArgs) --depsfile "$(ProjectDepsFilePath)" - $(ExecArgs) "$(_MvcViewCompilationBinaryPath)" - $(ExecArgs) @"$(_MvcRazorResponseFilePath)" - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/common.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets similarity index 50% rename from src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/common.targets rename to src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets index 53f3503..1e6d254 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/common.targets +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets @@ -16,34 +16,111 @@ + + + + + + + + + + + + + <_MvcViewCompilationBinaryPath Condition="'$(_MvcViewCompilationBinaryPath)'==''">$(MSBuildThisFileDirectory)$(MSBuildThisFileName).dll + + dotnet exec --runtimeconfig "$(ProjectRuntimeConfigFilePath)" + $(ExecArgs) --depsfile "$(ProjectDepsFilePath)" + $(ExecArgs) "$(_MvcViewCompilationBinaryPath)" + $(ExecArgs) @"$(_MvcRazorResponseFilePath)" + + + + + + + + + <_MvcViewCompilationBinaryPath Condition="'$(PlatformTarget)'=='x64'">$(MSBuildThisFileDirectory)$(MSBuildThisFileName)-x64.exe + <_MvcViewCompilationBinaryPath Condition="'$(PlatformTarget)'=='x86'">$(MSBuildThisFileDirectory)$(MSBuildThisFileName)-x86.exe + + + + + + + + + + + <_PreCompilationFilesToCopy + Include="$(OutputPath)$(AssemblyName).exe.config" + Destination="$(OutputPath)$(MSBuildThisFileName)-$(PlatformTarget).exe.config" /> + + <_PreCompilationFilesToCopy + Include="$(_MvcViewCompilationBinaryPath)" + Destination="$(OutputPath)$(MSBuildThisFileName)-$(PlatformTarget).exe" /> + + + + $(_MvcViewCompilationBinaryPath) + + + + + + + + + - - - + <_ResponseFileLines Include="--file=%(MvcRazorFilesToCompile.FullPath)" /> - - - + <_ResponseFileLines Include="--key-file=$(AssemblyOriginatorKeyFile)" />