SubSonic 3 Installation Doesn't Work? - asp.net

Ok I have following the tutorial here as best I can
http://subsonicproject.com/docs/Setting_up_SubSonic_3.0
As the files you get in the download are nothing like what is shown in the video?? So I am literally just guessing which files to use??
Then I drag the files / folders into Visual studio (As the video shows) and NOTHING happens?? It just adds the files to my solution?? Or adds the folders to my solution as normal files... Nothing gets executed as shown in the video??
I realise Rob has spent a lot of time on this off his own back, and I am trying not to be a whining old women BUT... How are we expected to use it, if the installation video is completely different to the actual files you get in the download AND when you drag the files into VS2008 nothing happens - Which is completely different to the video? My VS does not recognise TT files as being anything special...
I really want to use this new version, as I loved v2.1 but I'm loosing faith
RANT OVER

OK a few places to start:
Are you using Visual Studio Express, if so unfortunately it doesn't support t4 and so won't work with SubSonic 3
Try right clicking on the tt files and clicking 'Run Custom Tool'
If your project is a Website rather than a Web Application Project t4 won't work and you won't see 'Run Custom Tool' in the right click menu. In this case either convert the project or you can use a separate class library project in your solution and add the templates to it, then reference this in your website.
Choose whether you want to use Simple, Linq or ActiveRecord templates. Have a look here to help you choose (you can always change your mind later)
Watch the video for whichever template you've chosen, the setup video you linked to is unfortunately a little dated and I think the template specific ones are much more helpful.

Related

Save Opened Files Per Project

I've been using Aptana and it is a great tool for web development. I don't know if I can resort myself going back to Notepad++
Anyway, I have multiple project on Aptana ... I think it is stored in a single workspace. But I switch over to other projects depending on my mood. In each project, I have multiple files opened and it kind of destroys momentum that I have to close the windows of my previous projects and open the files on the projects I want to work on.
My question: Is there a way to save the opened files per project. Like when i switch to Project A, all of the files I opened in project A will open. When I switch to project B, all of the files I opened in Project B is opened?
I decided to play around with "workspaces", and although there isn't a very GUI oriented way of working with these collections yet, I came up with a workable solution!
Create a new folder in your home directory, and just call it "workspaces", then open up Aptana, and choose File -> Switch Workspace -> Other and then type in the path to the new "workspaces" folder, and then the name of the workspace. I have one workspace called "generic" where I pretty much have every project loaded up. Then I have a bunch of workspaces named after the project to which they are committed. No more reluctance to switch tasks in Aptana! No more opening up bits and pieces of projects in Notepad++ or Sublime! Everything is good again!
Now all Aptana really needs to do is make a menu where you can click to select which workspace to use when aptana loads instead of having to remember your-exact_project-name and being able to refresh your memory by looking at all the workspaces you have. Ideally they would impliment a kind of search/filter bar after you start typing your project name, and then a hoverup that say "hit enter to auto complete" since there's no standard practice as to whether tab or enter should be autocomplete, and sometimes making it enter can be anoying cause you just wanted to make a new project called 'ant' not load your engineering project named'antennas'.
Anyway, sorry for the formatting. Hope this helps.

Aptana Studio 3 What is a workspace

Could some one explain to me what a Workspace space is in Aptana and how to use them? My main problem is that I don't even understand the concept of the Workspace and I can find no documentation anywhere (and I've looked quite a lot) that explains this.
Sorry if sounds like a stupid question but I want to try using an IDE rather than Notepad++ to see if I like it and I'm really stuck on what the concept of a Workspace is.
The workspace is place you adding your projects. Aptana is built on eclipse, so you can read about workspace in eclipse. http://archive.darronschall.com/weblog/2006/01/getting-friendly-with-eclipse-workspaces.html
Workspace is the area where you load all your current active projects. It makes it easier for you to access them at one place rather than always have to navigate to your project directory. As an example, you may have a zend project in your zend framework directory but another HTML project sitting in your public directory. These two projects will be inside your workspace such that a single click in them brings the entire project to the side bar.

Is it possible to restore the source code (Models, Controllers) of an application, from the files on the website (when Publish has been used)

I have been working on a MVC 3 application on my laptop, which now has crashed. I have uploaded the newest edition of the site through the "Publish" method in VS2010. Is it possible to retrive the source code of the application? Because i cant see the Models or Controllers on the FTP.
Thanks
I have used a decompiler before to get back source code from a compiled website.
It doesnt give you the files all nicely ready to start developing again, it is a bit pain staking going through the decompiler and getting all the code you need out. But it can be done.
I cant remember which one i used, im sure a quick google will give you loads to choose from. I think there might even be one shipped with vs.

N2 CMS - where are the codebehind files?

I'm using the N2 CMS system for ASP.NET. Well I say 'using', I'm really just trying to develop a tiny understanding of it.
One of the things that's obstructing me is that it's set up in a way I've not seen before. Where are the codebehind files for the pages?
Can anyone tell me for example, where is the code for /Edit/default.aspx? How on earth do I debug what it is doing?
Thanks
David
It always used to be in N2.Edit.dll, but by the look of it they've rearranged this in more recent builds - I'm not 100% if it's now in N2.Management.dll or in N2.dll itself.
As usual the easist thing to do is to get hold of the source code (or an SVN checkout of the correct version), build it yourself and then replace the DLLs you were using with your built versions and their PDBs - you can then step into these correctly. You might want to go back to the regular releases for deployment, though.
If it's still Edit/default.aspx for you then I guess you're on the 1.5 code or thereabouts? In that case N2.Edit is built from src/wwwroot in the source code. You can just drop the entire src/wwwroot/Edit directory into place in your app and run it from the codebehind files there, not a compiled N2.Edit - that's easier to tweak, although I think it was easier to step through using a built DLL.
You may have to hunt around the build tree for all of the DLLs - I don't think they all get copied into one place. I used to take the DLLs from the N2.Edit.Tests project bin directory, and N2.Extensions and N2.Security from the N2.Extensions.Tests bin directory.

TortoiseSVN with ASP.net Web Projects - How to manage this?

We're a small team starting to use TortiseSVN to manage our web projects.
I was just wondering what is the best way to manage web projects into Subversion.
As you know a web solution consists of the .sln file as well as all the .aspx files.
Well we noticed when we right click the solution and we select "Add selected projects to subversion". It prompts me to tell it where to store the .sln file. So I give it some path like svn://serverName/CIS/MyWebSiteProject. Cool it just placed the .sln file...so I thought to myself how is it going to store the .aspx files as well.
Within a second I got a second prompt, I thought cool it is prompting me for the .aspx pages. So I tried giving it the path svn://serverName/CIS/MyWebSiteProject/ASPX_Files, but it comes back with an error stating I cannot place this folder within this path. I actually have to go outside of the folder MyWebSiteProject.
Not good cause now I have 2 folders one with the .sln folder and the other with all the .aspx pages and these folders are sitting on:
(sln file):
svn://serverName/CIS/MyWebSiteProject
(aspx files):
svn://serverName/cis/myWebSitePages
This really is not ideal cause I am sitting on the root of CIS with 2 folders for really one solution. Now when I try to check the project out I have to check both folders out.
What makes this even worse is when I do check them out I try to open the .sln file and I get an error that it cannot find the corresponding .aspx files. This seems like too much work, is there an easier way or a recommended way of using tortisesvn/subversion with asp.net web projects ?
While I am sure you have TortoiseSVN installed, it sounds like you are using Ahnk or some other VS SCC plugin to add from within VS.
I would suggest not using the plugin to initally add the solution to SVN, but to use TortoiseSVN in Windows Explorer for your initial check in. This will add your solution directory in its original state.
From that point on, you should be able to use the SCC plugin from within VS without trouble.
EDIT
Ok, after your commment I realize that I was not fully understanding the problem.
If you are dealing with a single project, after you create your solution and project, select the solution in Solution Explorer, go to 'file>save solution as' and save the solution inside the directory where your project file is.
Close the solution and go out to Explorer and use Tortoise to add the directory to SVN. If you have multiple projects/sites, just pick one to hold the solution.
Does that make sense? and from that point you should have no problems with ahnk
The key to successfully using Visual Studio with any source control is to put the solution file in the same path as the rest of the project files.
Usually, I will do something like the following:
\Project\Project.sln
\Project\MainWebSite\*.* <-- All web site files (including .??proj here).
\Project\Library\*.*
Then, I manually put \Project\*.* into source control.
Other options exist, as for my recent projects, I have been using:
\Project\SolutionFiles\Project.sln
\Project\MainWebSite\*.*
\Project\Library\*.*
Again, I manually put \Project\*.* into source control.
I generally find that it is better to set up the repositories for my solutions and projects from within Tortoise SVN. Then use whatever VS plugin that you care for to manage the commits of your pages etc. This gives you a little more control and allows you to get your setup correct from the start.

Resources