Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Move binaries in to the build folder #145

Closed
wants to merge 4 commits into from
Closed

Move binaries in to the build folder #145

wants to merge 4 commits into from

Conversation

pranavkm
Copy link
Contributor

Maybe fixes #143

</Target>

<Target
Name="_AddDesktopReferences"
Copy link
Contributor Author

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.

<None Include="$(X86ProjectDirectory)\bin\$(Configuration)\net461\win7-x86\$(AssemblyName)-x86.exe" Pack="true" PackagePath="runtimes\win7-x86\lib\net461\$(AssemblyName)-x86.exe" />
<None Include="build\**\*.*" Pack="true" PackagePath="%(Identity)" />
<None Include="$(OutputPath)netcoreapp2.0\$(AssemblyName).dll" Pack="true" PackagePath="build\netstandard2.0\$(AssemblyName).dll" />
<None Include="$(OutputPath)net461\win7-x64\$(AssemblyName).exe" Pack="true" PackagePath="build\netstandard2.0\$(AssemblyName)-x64.exe" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will you handle binding redirects? This wont get them auto-generated for you anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the binary as a reference as part of _AddDesktopReferences. See my earlier comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oooo that's what you meant there. I see. Ya would be super curious if that works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So when packaging this guy and installing on a local app does it work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what that means?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You made it seem like you weren't sure if this worked. After testing, does it work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, seems to work. I built Mvc 2.1.0.

 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.AspNetCore.Mvc.Core" publicKeyToken="adb9793829ddae60" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
      </dependentAssembly>
    </assemblyBinding>

I might be able to hack a fake Microsoft.AspNetCore.Mvc package to test this out on an ongoing basis.

@@ -12,6 +12,4 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
</ItemGroup>

<Target Name="PrecompileRazorViews" AfterTargets="Build" DependsOnTargets="MvcRazorPrecompile" Condition="'$(TargetFramework)'!=''" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes #117. We explicitly call precompilation on the project from the consuming project.

@pranavkm
Copy link
Contributor Author

New directory structure with this change:

│   Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.nuspec
├───build
│   └───netstandard2.0
│           Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x64.exe
│           Microsoft.AspNetCore.Mvc.Razor.ViewCompilation-x86.exe
│           Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll
│           Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets

@NTaylorMullen
Copy link
Contributor

Ya this is awesome 👍

@NTaylorMullen
Copy link
Contributor

Travis looks to be exploding however.

@pranavkm
Copy link
Contributor Author

Travis is sorted - I thought I could remove this - https://github.com/aspnet/MvcPrecompilation/pull/145/files#diff-4d5e7369a237e37020f01b3b255505e0L35 but seemingly not.

@pranavkm pranavkm closed this Jun 19, 2017
@pranavkm pranavkm deleted the prkrishn/143 branch June 19, 2017 21:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants