question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migration for BundlerMinifier.Core

See original GitHub issue

The scripts section in project json looks like this:

"scripts": {
 "prepublish": [ "bower install", "dotnet bundle" ]
}

and should be added to .csproj and look something like this:

   # after this import element 
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 
  <Target Name="findAGoodName" BeforeTargets="BeforePublish">
    <Exec Command="bower install" />
    <Exec Command="dotnet bundle" />
  </Target>

The tools should be added similar to this:

<ItemGroup>
  <DotNetCliToolReference Include="BundlerMinifier.Core">
    <Version>2.2.301</Version>
  </DotNetCliToolReference>
</ItemGroup>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
gulbananacommented, Dec 20, 2016

does this work? after restore and build of a project with the DotNetCliToolReference I get “No executable found matching command dotnet-bundle”.

0reactions
barrytangcommented, Nov 4, 2016

@madskristensen, I opened a Dev14 xproj web project in Dev15 and after the migration, here is the output. I confirmed with Vijay this should work. We will update our web template accordingly as well.

  <Target Name="PrepublishScript" BeforeTargets="Publish" Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
    <Exec Command="bower install" />
    <Exec Command="dotnet bundle" />
  </Target>

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Step-by-Step Guide to Migrating a Project from ASP.NET ...
Here is a practical guide on migrating a project from ASP.NET MVC framework to ASP.NET Core. Step-by-step instruction written by the team of ......
Read more >
How we do bundling and minification in ASP.NET Core
When migrating our websites to ASP.NET Core, we had to find a new way to bundle and minify JavaScript and CSS files. We...
Read more >
Has something replaced bundleconfig.json in ASP.NET ...
bundleconfig.json was removed from the 2.1 templates because it relied on a tool not created or supported by Microsoft.
Read more >
Support .NET Core 3.1 · Issue #460
Have make migration from 3.1 to net 5 and I can't minify anymore. I have the 3.1.12 framework, but yet I cannot minify....
Read more >
Migrating Old ASP.NET Applications to .NET Core
I personally use a Visual Studio addon called “Bundler & Minifier”, you can get it here https://github.com/madskristensen/BundlerMinifier. This ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found