Quantcast
Channel: MSBuild Extension Pack
Viewing all articles
Browse latest Browse all 1211

New Post: NuGet Package MSBuild.Extension.Pack Design Issue

$
0
0

I'm trying to use the NuGet package MSBuild.Extension.Pack 1.0.0, and I'm not sure what the design goals of the package where, but I assumed (yeah, I know), that it was for adding the MSBuild Extension Pack to a solution so you can use in MSBuild scripts for the solution.  But I found a few issues, not all related to MSBuild Extension Pack.  

The first was that you can't use NuGet to add a package to a solution.  So, you have to add it to a project.  The second NuGet issue was that most project types are not supported.  The only projects you can add a NuGet package to are the typical code projects (C# and VB).  Which, in the case of MSBuild tasks doesn't really make sense, since you probably want to add it to a build project.  Since there isn't really a build project type, I tried the Setup Project (next logical choice), and that is how I found NuGet doesn't work with most project types.

So, I decided that since I had to use a code project type, I'd just add the MSBuild Extension pack to my NUnit test project.  But instead of installing a package that I can use within my solution, it added references to all the task libraries to the NUnit project.  So that is where I was sure if what I was trying to do (use the NuGet package to add the custom tasks to my project) aligned with the goals of the package.  It almost seems as though the package was built so someone can extend the custom tasks.  Was that the goal?

 

So, instead what I did is started to build a NuGet Pacakge with the goal of using the custom tasks within the solution, and no requiring the custom tasks to be installed on the machine.  I then made all the ref paths relative to the Solution and the pacakage folder.  Also, I was thinking of making it dependent on a StyleCop package, so this way the solution is totally independent and doesn't require things to be installed on the machine.

I can donate the code/NuGet package to the project, if it something you would like to add.


Viewing all articles
Browse latest Browse all 1211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>