Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for producing "Sources" package. #21

Closed
dazinator opened this issue Dec 1, 2015 · 22 comments
Closed

Support for producing "Sources" package. #21

dazinator opened this issue Dec 1, 2015 · 22 comments

Comments

@dazinator
Copy link
Owner

Currently, the install package produced does not contain source code files.

There should be the option to also produce a sources version of the install package.

This can work in exactly the same way as in it would include everything the regular install package includes, but it would also need to include source code files - which is currently any file in the project with one of the following extensions:

  1. cs
  2. vb
@dazinator dazinator changed the title Support producing "Sources" package. Support for producing "Sources" package. Dec 1, 2015
@david-poindexter
Copy link
Contributor

Agreed. Thanks for adding this issue. You beat us to the punch! ;-)

@david-poindexter
Copy link
Contributor

Oh, you'll also need to consider adding the following:

  • sln
  • csproj
  • vbproj
  • targets
  • xml
  • nupkg
  • xsd
  • proj
  • ps1
  • psm1

There may be others, but these were some off the top of my head.

@dazinator
Copy link
Owner Author

Ok - cheers. I'll look to include these by default, and allow this list to be overriden.
I guess I should also include any project item with a build action set to "compile".

@dazinator
Copy link
Owner Author

This is currently waiting on #15 to be finished and merged back to master, before I can start on this issue.

@david-poindexter
Copy link
Contributor

Awesome - thanks!

@david-poindexter
Copy link
Contributor

@dazinator how is this one coming along?

@dazinator
Copy link
Owner Author

Have been sidetracked by the project system work im doing for a while, but I'll try and pick this one up over the next couple of weeks!

@david-poindexter
Copy link
Contributor

Okay, I have a presentation for DNNCon Baltimore 2016 that is built around using DnnPackager and would love for this to be available before then. If not, no biggie. I just know it will be something I'm asked about and may be perceived by many as a barrier for using DnnPackager.

@dazinator
Copy link
Owner Author

Ok yeah good thinking. I'll try to get this out before then if possible.

@david-poindexter
Copy link
Contributor

Thanks!

@dazinator
Copy link
Owner Author

Just wondering.. if there is an example of a sources zip somewhere.I can't remember whether it's meant to also contain all the things an install zip contains such as assemblies and pdb's etc - or should it just contain source files only?

@dazinator
Copy link
Owner Author

And also, I'm wondering if the source files should be put in a seperate folder inside the zip, i.e like a "source" folder, or perhaps be an additional resource zip inside the zip? I guess I need some examples of these source packages

@dazinator
Copy link
Owner Author

This seems to mention that the source is included as a resources zip inside the zip: http://www.dnnsoftware.com/forums/threadid/16719/scope/posts/is-the-source-zip-correct

@dazinator
Copy link
Owner Author

Ok think I have got my head around this now.

@dazinator
Copy link
Owner Author

I'm not sure it makes sense to include the .csproj file in the sources zip package. You may have project items in your project that you do not wish to be distributed in the zip package. The project file may also be referencing build targets, or have project references, nuget package references etc for things that you don't include inside the zip package. Therefore if you just include the .csproj file as is inside the sources zip, theres a good chance that people won't be able to open this project file "as is" once extracted from the sources zip - as there may be missing files, missing project references, missing nuget packages, missing targets files etc etc.. Does anyone actually do this?

@david-poindexter
Copy link
Contributor

@dazinator
Copy link
Owner Author

Thanks @nvisionative. I need to understand more fully about the reasoning behind these sources packages, as I don't just want to blindly copy Chris Hammond. From what I can currently see, the sources packages are way to install a module into a dnn site, but also include the code behind files etc, so that for modules that use Dynamic Compilation in IIS, people can essentially go into the folder (on disk) modify some code directly in a website folder where the module is installed, and then the site will restart, the module will be dynamically compiled, and the changes will be reflected on the site. This is completely different from distributing a VS solution to VS developers that will build, compile, run etc. Therefore at the moment I can't see any benefit to including a csproj file or sln file in the "sources" package..

@david-poindexter
Copy link
Contributor

By the way, that 2006 forum post you referenced was related more to someone trying to find the source code for an old core module (DNN Store) - not how Source install packages should be built. Chris Hammond's module templates are the de facto standard.

@dazinator
Copy link
Owner Author

I hav epretty much completed this feature, but for now i'm not including csproj, or sln files as I believe that to be correct, even though Chris Hammonds stuff does include them, I don't think it's a good idea for the present!

@david-poindexter
Copy link
Contributor

That all depends on the compilation method chosen by the developer. I definitely believe you should follow Chris' lead on this.

@dazinator
Copy link
Owner Author

Thanks @nvisionative I do appreciate and value your advice on this, but I'll have to address including the csproj, sln files as a seperate issue. I personally think it's a mistake and I'd love to see any example of this working or being used successfully to distribute projects / solutions to developers. I personally think what would happen is someone would go to open the csproj file / sln file and hit multiple issues that they'd have to fix before they could use it in VS..

dazinator added a commit that referenced this issue Mar 19, 2016
@dazinator
Copy link
Owner Author

I have blogged about this stuff here if interested: http://darrelltunnell.net/blog/2016/03/19/dnn-extensions-sources-packages-what-are-they/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants