Windows Phone Toolkit: Do I really need to install it using NuGet? - silverlight

My situation is the following. I'm developing a simple app for my Windows Phone 8 using Silverlight. At some point, I need to add an extra functionality like context menu to my app. It seems, it is enough to add a "normal" reference to the Microsoft.Phone.Controls.Toolkit.dll assembly instead of adding the corresponding NuGet reference that installs a lot of stuff in its package I really do not need at all.
So the question is: do I really need to add it as a NuGet package if the functionality provided by the DLL is enough?
I'm asking because I like to keep my projects as clean as it is possible, and I do not like to add unused stuff that eventually makes my projects very big and complex.

Using Nuget instead of referencing a dll in some folder in your project is the more clean way.
If you add all your references through Nuget, it will provide many benefits, like automatic depedencies resolution and download, upgrades to newer versions, restoring on build and no need to check them into version control system ...

Related

How to set up DotNetNuke for development

I am part of a team of .NET developers and we're trying to use the DNN platform as a way to have a website template so that we will not have to spend weeks or months building core functionality, such as authentication, permissions, navigation, etc. However, I'm very confused as to how the platform works as well as how it's installed. I'v spent many hours researching online at http://www.dnnsoftware.com/ as well as other sites, which only added to my confusion. Here are some specific questions which are still unanswered:
Do we install the source code or not? http://www.dnnsoftware.com/wiki/how-to-install-the-source-package-of-dotnetnuke says that it's not recommended to install source code. On the other hand, http://www.dnnsoftware.com/wiki/packages says that we should use the source code if we are developers (which we are).
If we don't use source code, how do we write code which will be used to add functionality, style, or business logic to our site? Where exactly do we put this code?
I keep on seeing the term "module" being thrown around. What in the world is a module?? Is it a separate .csproj file? Is it a .cs file saved as part of the website? If so, how would we incorporate it without the source code?
Like any other application, we need to be able to maintain full control of builds and deployments. With this, we can see history of what we did, roll back changes if necessary, etc. Currently, for our other projects, we build with TeamCity and deploy with OctopusDeploy. Where does that fit into working with DNN without source? I also know that DNN is set up as a web site project not a web application project (see here http://www.dnnsoftware.com/forums/threadid/338902/scope/posts/threadpage/1) and web site projects is a technology not really being maintained by the newer versions of Visual Studio, and may be harder to deploy as well. Assuming I DON'T want to convert (http://blogs.msdn.com/b/webdev/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx), how would I build/deploy the web site project?
http://blogs.msdn.com/b/webdev/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx seems to state that it's not recommended to remove dependencies from DNN and replace them with other ones. If that's really true, it makes the whole platform seem very fragile and makes me wonder if I'm using the wrong tool altogether. Was DNN really meant for developers or not? (And if not, what was then intended use?)
Start here->
http://www.christoc.com/Tutorials/All-Tutorials/aid/1
1) Don't touch the DNN source, trust me, it isn't worth the headache
2) You add functionality, override style, etc, through the use of Extension (modules and skins)
3) A separate CSProj (check out my templates http://www.christoc.com/Tutorials/All-Tutorials/aid/2
4) You will deploy by taking the ZIP file from each extension and either uploading through the host/extension page, or taking the ZIp file and putting it into /install/module/ in the root of your deployment target, then have a process call /install/install.aspx?mode=installresources
5) DNN is for sure meant for developers, but it is a framework, build on the framework, don't go in and start jacking the framework itself.
I would start by getting a DNN site running on your local. This is fairly straight forward for any .NET developer.
A module is an extension for the DNN framework that you can essentially (once correctly installed) drop on a DNN page (referred to as tab). All your business logic will go in your own modules and the code for these modules will be the only things that you will have to source control. Do not make core changes to DNN as they will be blown away if you ever upgrade.
You do not need to use Christoc's module template if your module will only need to be deployed once. I find that it brings in a lot of unnecessary components and references that you probably will not need. Create your module's using webUserControls that inherit from DotNetNuke.Entities.Modules.PortalModuleBase. Drop the .ascx file in its own folder under DNN's DesktopModules folder and all required .dll's in DNN's bin folder. In DNN, go to Host>Extensions and create a new extention. To the extension add a module control and add your ascx files as controls (leave your default view's key blank). Other views should have unique keys and you can navigate to them in DNN using EditUrl("KeyName").
Drop your module on a DNN page and go from there.
This is of course an over simplification but it should get you going. There are many tutorials online that I advise you watch to learn the basics like Globals.NavigateUrl() to navigate between tabs and how DNN is put together. This forum topic might assist you http://www.dnnsoftware.com/answers/dnn-7-module-development-step-by-step-tutorial

MVVMCross how to use with WPF (Windows)?

How can I use it on WinRT (Windows 8) - I can't compile it. Can I use it also with "normal" Windows (WPF)?
There isn't currently an mvvmcross port specifically for wpf - a couple of people have suggested building one, but the majority of users have so far requested more work on mobile platforms instead. There is a current console (win32) port and extending that towards WPF should be quite straight-forward.
Future development is now based around the Portable Library branch - see some info on http://slodge.blogspot.co.uk/2012/09/mvvmcross-vnext-portable-class.html and the code on https://github.com/slodge/MvvmCross/tree/vnext
For WinRT, the TwitterSearch example within the vNext branch is a good place to start - it should compile and work across all of MonoTouch, MonoDroid, WP7, WinRT and Console:
If you find you can't compile then please log specific compiler error messages either here or to github issues.
MvvmCrossLibs\MvvmCrossLibs.sln consists of many projects, requiring different runtimes to be installed to open properly (Mono Touch, Mono Droid, WP7). If you only need the library in WinRT, your best bet is to open Cirrious\Cirrious.MvvmCross\Cirrious.MvvmCross.WinRT.csproj directly and add the missing Newtonsoft.JSON package with NuGet (you'll need to save the automatically created .sln file before that). It should compile just fine after that, at keast it did for me. Now just reference the assembly in your Windows Store app project and start using it.
I don't have any previous experience with MVVMCross, but it doesn't look like it currently supports despktop WPF apps. I don't know how difficult it would be to create/compile such a version, though.

WPF deployment strategy dilemma.clickonce(limited customization)+autoupdate vs installer(unlimited costomization) no autoupdate

I've been facing a deployment problem.I've built a WPF application with visual studio 2008 and created an installer(msi) which works fine.But then it's pain to add automatic update to it. i've seen this article at windowsclient.net but it seems to be pretty old but could have been the perfect thing for me.Then i looked at the .Net Application updater block v2.0 which uses enterprise library june 2005 and for some reason it's not installing on my machine.
I thought i will need to use a more recent Enterprise library so i installed and compiled Enterprise 4.1(october 2008) but nothing better happened.To i decided to give a try to CLickonce deployment.After struggling with it, it was almost perfect.I realized that when i was testing the updates provided by the clickonce on my machine which is XP i didn't notice the need of having sqlite dll in the GAC. surely it was already there.I noticed it when i moved to vista that there is a problem.After checking the net i know it's impossible to add a dll to the Global Assembly Cache.
Now i'm stuck, i think i've hit a wall.Can any one share some of his experience? I'm willing to try the updater block if i can get help.
Thanks for reading this!!
(Won't fit in a comment)
Here's something helpful -- you can deploy the SQLCE dll's locally, instead of installing as a prerequisite, which makes it easier to deploy. Check out this article.
This is another useful article: how to keep your data safe from ClickOnce updates.
This will make more sense if you check out this thread. I have a post in this thread that has two links in it. One points to the ClickOnce way of handling database deployment, the other to a thread that is essentially the same as the blog article above.
First, you can't use that updater block. It was for .NET 1.1. It was marked obsolete when ClickOnce deployment was added in .NET 2.0.
You probably don't need to install that dll in the GAC. In many cases, you can just include it in the deployment, and it will find the local reference and use it. It just depends on the dll. So here's what I recommend you try:
Add the dll to your project. Set the 'build action' to 'none'. Set 'copy to local directory' as 'do not copy'.
Delete the reference in your project to that dll, and re-add it. But instead of picking it from the GAC, browse to the one you just added to your project and select it. On the reference properties, set 'copy local' to 'true'.
Now when you run it, it will access the local copy instead of looking for one in the GAC.
Like I said, this works great in some cases. It works for SQLCE and DirectX, but not for something like Infragistics. Some assemblies really do have to be installed in the GAC. The only way you will know is if you try it.
If you DO end up having to put it in the GAC, you can create an MSI to do that and deploy it as a prerequisite to the ClickOnce application. So you can still use ClickOnce for your main app.

dotnetnuke doubts

i want to build a website in dnn 5. i have studied dnn5, its installation, starter-kit installation, built-in modules (both of Host and Admin), installing a custom module (from module extension), creating packages.
I had rather still some doubts left in my mind.
1.How should i progress if i need to built my custom module in some new website (& not in dotnetnuke.com website)
2.How is deployment done at client side? Is it done by creating packages or what, i dont know.please suggest some possible solution
3.I want to create a document module to satisfy my client requirements. This module is already built by dotnetnuke.com as an extra module. What should be done to include this module in my new website so that only my requirements could be reflected instead of creating the module entirely from scratch?
thanks
I'm not entirely sure about what you're looking to do, but I'll answer as much as I can.
I would suggest setting up a DotNetNuke website on your local machine, using the Source package. You can then create a new module (starting it either through the website itself, or by using a Visual Studio template). I strongly suggest using a Web Application Project for the module, keeping it in the website's DesktopModules folder (so that you're only dealing with the module's code, and don't have the entire website open in your project). Also, make sure you use the module and any other extension points to implement your functionality, rather than making changes to the actual DNN core code (since any changes to the core will make it that much more difficult to upgrade to newer versions of DNN).
I strongly suggest getting some automated packaging in place (the template that I linked to has a NAnt build script with it that you can use to package your module). It is so much easier to deploy modules as installable packages than trying to migrate individual files.
You can get the source version of the Documents module from its Codeplex project. It's licensed under the MIT license (like DNN itself), so you're free to use it as a starting point for your own module. Just download the source package and install it into your development site. The install will include all of the source and also includes a Visual Studio project that you can use. After installing, I would suggest that your first step be to rename the namespace (so that you're differentiated from the core module).
UPDATE
To deploy the website, I would suggest installing DNN on the server using the main DNN Install package. Then, once that is installed, you can install the module into the website using the package that you have created. A default installation of DNN will only have the Text/HTML module, in addition to administrative modules, so you shouldn't have very many extra, unused functionality present in the site.
Leave me a comment & update your question (or start a new question) if there's anything else you need to know.
It sounds like you are looking to use DotNetNuke as a development environment to write code that won't be deployed in a DotNetNuke site. While I love DNN, there's absolutely no reason to do this. Only use DNN for developing DNN stuff.
To address point #1, if the functionality you want is somewhere else you could use an IFRAME module. Check out: http://www.dotnetnuke.com/Community/Extensions-Forge/view/ProjectDetail/project/dnniframe.aspx

How to run executable at end of Setup Project?

I have a Visual Studio Setup Project that I use to install a fairly simple WinForms application. At the end of the install I have a custom user interface page that shows a single check box which asks the user if they want to run the application. I've seen other installers do this quite often. But I cannot find a way to get the Setup Project to run an executable after the install finishes. An ideas?
NOTE: You cannot use Custom Actions because these are used as part of the install process, I want to run my installed application once the user presses the 'Close' button at the end of the install.
I believe this is one of the real limitations of the Visual Studio installation project. You need to be able to modify the last page of the installation UI but VS.NET does not give you a way to do this. You could modify the tables in the .MSI after it has been built but VS.NET would probably overwrite these changes each time it is built. You may be able to override the last page using a merge module that you include in the installation project. Either way you will need to become familiar with how the UI dialogs are authored in an .MSI and this is not trivial.
You may want to consider switching to a free script based installer or buy a commercial setup authoring application (just don't buy InstallShield for the love of Pete). Take a look at InstallAware (although I have not used it).
I've just found a very easy way which does not require external tools. You only have to add a class file to the main project and a custom action to the setup project.
http://www.codeproject.com/KB/install/Installation.aspx
You also can use custom actions
I've done this for internal apps by creating a VB Script harness that launches the setup executable, waits for it to close, and then launches the second program.
You could also accomplish this with a little more polish using a few Win API calls in a C executable.
You can use MSILAUNCH (though I've only got it to work with MSICREATE).
http://www.cornerhouse.ca/en/msi.html
I managed it by doing invoking the Main method the assembly using the following line:
(typeof(ClassWithinAssemblyToExecute)).Assembly.EntryPoint.Invoke(null, new Object[] {} )
you can do it by custom installer. just add installer class and there u will see many event like after install, before install. just hook up after install and from there run ur exe by process class. i would suggest u google to find more about custom installer.
here is one good link that might help u http://www.codeproject.com/Articles/19560/Launching-Your-Application-After-Install-using-Vis
thanks

Resources