This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Move binaries in to the build folder #145
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 0 additions & 77 deletions
77
src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/common.targets
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
...Razor.ViewCompilation/build/net461/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
...iewCompilation/build/netcoreapp2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets
This file was deleted.
Oops, something went wrong.
154 changes: 154 additions & 0 deletions
154
...ewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Target Name="_ResolveInputArguments"> | ||
<PropertyGroup> | ||
<_MvcRazorOutputPath Condition="'$(MvcRazorOutputPath)'!=''">$([MSBuild]::EnsureTrailingSlash('$(MvcRazorOutputPath)'))</_MvcRazorOutputPath> | ||
<_MvcRazorOutputPath Condition="'$(_MvcRazorOutputPath)'==''">$(IntermediateOutputPath)</_MvcRazorOutputPath> | ||
<_MvcRazorOutputFullPath>$(_MvcRazorOutputPath)$(AssemblyName).PrecompiledViews.dll</_MvcRazorOutputFullPath> | ||
<_MvcRazorResponseFilePath>$(IntermediateOutputPath)microsoft.aspnetcore.mvc.razor.viewcompilation.rsp</_MvcRazorResponseFilePath> | ||
|
||
<MvcRazorContentRoot Condition="'$(MvcRazorContentRoot)'==''">$(MSBuildProjectDirectory)</MvcRazorContentRoot> | ||
<MvcRazorExcludeViewFilesFromPublish Condition="'$(MvcRazorExcludeViewFilesFromPublish)'==''">true</MvcRazorExcludeViewFilesFromPublish> | ||
<MvcRazorExcludeRefAssembliesFromPublish Condition="'$(MvcRazorExcludeRefAssembliesFromPublish)'==''">true</MvcRazorExcludeRefAssembliesFromPublish> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'@(MvcRazorFilesToCompile)' == ''"> | ||
<MvcRazorFilesToCompile Include="@(Content)" Condition="'%(Extension)'=='.cshtml'" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target | ||
Name="MvcRazorPrecompile" | ||
DependsOnTargets="_ResolveInputArguments" | ||
Inputs="@(MvcRazorFilesToCompile);@(IntermediateAssembly);@(DocFileItem);@(_DebugSymbolsIntermediatePath);@(ReferencePath);$(MSBuildAllProjects)" | ||
Outputs="$(_MvcRazorOutputFullPath)"> | ||
|
||
<CallTarget Targets="_MvcRazorPrecompile" /> | ||
</Target> | ||
|
||
<Target | ||
Name="_MvcRazorPrecompile" | ||
DependsOnTargets="_RunForCore;_RunForDesktop"> | ||
|
||
</Target> | ||
|
||
<Target | ||
Name="_RunForCore" | ||
DependsOnTargets="_CreateResponseFileForMvcRazorPrecompile" | ||
Condition="'$(TargetFrameworkIdentifier)'=='.NETCoreApp'"> | ||
|
||
<PropertyGroup> | ||
<_MvcViewCompilationBinaryPath Condition="'$(_MvcViewCompilationBinaryPath)'==''">$(MSBuildThisFileDirectory)$(MSBuildThisFileName).dll</_MvcViewCompilationBinaryPath> | ||
|
||
<ExecArgs>dotnet exec --runtimeconfig "$(ProjectRuntimeConfigFilePath)"</ExecArgs> | ||
<ExecArgs>$(ExecArgs) --depsfile "$(ProjectDepsFilePath)"</ExecArgs> | ||
<ExecArgs>$(ExecArgs) "$(_MvcViewCompilationBinaryPath)"</ExecArgs> | ||
<ExecArgs>$(ExecArgs) @"$(_MvcRazorResponseFilePath)"</ExecArgs> | ||
</PropertyGroup> | ||
|
||
<Exec Command="$(ExecArgs)" WorkingDirectory="$(MSBuildProjectDirectory)" /> | ||
</Target> | ||
|
||
<Target | ||
Name="_AddDesktopReferences" | ||
AfterTargets="ResolveLockFileReferences" | ||
Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'"> | ||
|
||
<PropertyGroup Condition="'$(_MvcViewCompilationBinaryPath)'==''"> | ||
<_MvcViewCompilationBinaryPath Condition="'$(PlatformTarget)'=='x64'">$(MSBuildThisFileDirectory)$(MSBuildThisFileName)-x64.exe</_MvcViewCompilationBinaryPath> | ||
<_MvcViewCompilationBinaryPath Condition="'$(PlatformTarget)'=='x86'">$(MSBuildThisFileDirectory)$(MSBuildThisFileName)-x86.exe</_MvcViewCompilationBinaryPath> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(_MvcViewCompilationBinaryPath)'!=''"> | ||
<Reference Include="$(_MvcViewCompilationBinaryPath)" Private="true" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target | ||
Name="_RunForDesktop" | ||
DependsOnTargets="_AddDesktopReferences;_CreateResponseFileForMvcRazorPrecompile" | ||
Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'"> | ||
|
||
<ItemGroup> | ||
<_PreCompilationFilesToCopy | ||
Include="$(OutputPath)$(AssemblyName).exe.config" | ||
Destination="$(OutputPath)$(MSBuildThisFileName)-$(PlatformTarget).exe.config" /> | ||
|
||
<_PreCompilationFilesToCopy | ||
Include="$(_MvcViewCompilationBinaryPath)" | ||
Destination="$(OutputPath)$(MSBuildThisFileName)-$(PlatformTarget).exe" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup Condition="'$(MvcRazorRunCommand)'==''"> | ||
<MvcRazorRunCommand>$(OutputPath)$(MSBuildThisFileName)-$(PlatformTarget).exe</MvcRazorRunCommand> | ||
</PropertyGroup> | ||
|
||
<Copy | ||
SourceFiles="@(_PreCompilationFilesToCopy)" | ||
DestinationFiles="%(Destination)" /> | ||
|
||
<Exec | ||
Command=""$(MvcRazorRunCommand)" @"$(_MvcRazorResponseFilePath)"" | ||
WorkingDirectory="$(MSBuildProjectDirectory)"/> | ||
|
||
<Delete Files="%(_PreCompilationFilesToCopy.Destination)" /> | ||
</Target> | ||
|
||
<Target Name="_CreateResponseFileForMvcRazorPrecompile"> | ||
<ItemGroup> | ||
<_ResponseFileLines Include=" | ||
$(MSBuildProjectDirectory); | ||
--output-path=$(_MvcRazorOutputPath); | ||
--application-name=$(AssemblyName); | ||
--content-root=$(MvcRazorContentRoot);" /> | ||
|
||
<_ResponseFileLines | ||
Condition="'$(MvcRazorEmbedViewSources)'=='true'" | ||
Include="--embed-view-sources" /> | ||
|
||
<_ResponseFileLines Include="--file=%(MvcRazorFilesToCompile.FullPath)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(SignAssembly)'=='true'"> | ||
<_ResponseFileLines | ||
Condition="'$(DelaySign)'=='true'" | ||
Include="--delay-sign" /> | ||
<_ResponseFileLines | ||
Condition="'$(PublicSign)'=='true'" | ||
Include="--public-sign" /> | ||
<_ResponseFileLines Include="--key-file=$(AssemblyOriginatorKeyFile)" /> | ||
</ItemGroup> | ||
|
||
<WriteLinesToFile | ||
File="$(_MvcRazorResponseFilePath)" | ||
Lines="@(_ResponseFileLines)" | ||
Overwrite="true" /> | ||
</Target> | ||
|
||
<Target | ||
Name="_MvcRazorPrecompileOnPublish" | ||
DependsOnTargets="MvcRazorPrecompile" | ||
AfterTargets="PrepareForPublish" | ||
Condition="'$(MvcRazorCompileOnPublish)'=='true'" /> | ||
|
||
<Target Name="_MvcRazorResolveFilesToCompute" | ||
AfterTargets="ComputeRefAssembliesToPublish" | ||
Condition="'$(MvcRazorCompileOnPublish)'=='true'"> | ||
|
||
<ItemGroup> | ||
<ResolvedFileToPublish | ||
Remove="%(MvcRazorFilesToCompile.FullPath)" | ||
Condition="'$(MvcRazorExcludeViewFilesFromPublish)'=='true'" /> | ||
|
||
<ResolvedFileToPublish Include="$(_MvcRazorOutputFullPath)" CopyToPublishDirectory="Always"> | ||
<RelativePath>$([System.IO.Path]::GetFileName('$(_MvcRazorOutputFullPath)'))</RelativePath> | ||
</ResolvedFileToPublish> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(MvcRazorExcludeRefAssembliesFromPublish)'=='true'"> | ||
<ResolvedFileToPublish | ||
Remove="%(ResolvedFileToPublish.Identity)" | ||
Condition="'%(ResolvedFileToPublish.RelativePath)'=='$(RefAssembliesFolderName)\%(Filename)%(Extension)'" /> | ||
</ItemGroup> | ||
</Target> | ||
</Project> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not super sure if this works - I have to try creating a mismatch in Mvc versions between the project and the tool which I haven't gotten around to as yet.