Tag Archives: visual studio

asp.net mvc

at work i needed to create a new web frontend… and actually i am really disapointed with microsoft web framework asp.net… for me it is too random… ok i dont know how to do it correctly, but i am really confused with the 32452390918745 events, which will be called every postback (postback? never thought in java, that there might be different types of postback… and handlers…)… but yeah… did some application with asp.net and they all work… and are running… i think… 🙂

new project. new technology: asp.net mvc. i like it… the concept is as stated in the name: mvc… and actually i think it is really good implemented and totally included into visual studio… simple create a controller… based on it create views and of course use the model… the where is my model thing is for me not yet 100% clear… when using a external project/dll… is the dll the model? or is the dll only the functionality for the controller to fill the model? or is the model a wrapper around the dll? currently using a bit of all possibilities… works, but fareaway from perfect…

format in visual studio

simply

Crtl+K, Ctrl+D

c# unit testing: code coverage

ok unit testing in vs2010 was really easy… setting up code coverage analysis is simple too…

  1. edit the local.testsettings
  2. goto Data and Diagnostics
  3. enable Code Coverage
  4. configure it
  5. add the dll
  6. tada: done

just run the tests again and look at the code coverage…

c# unit testing

I thought, after using nant, it is time to use unittests in my c# code. The main idea was to try out test driven implementation methods for my next, small project.

Ok asked google about how to implement unit testing in my maschine… how was it called? NUnit? ok found something different and im really proud on microsoft… a unit testing framework is include to Visual Studio 2010… and its really easy…

Crossread the following link and understood it: http://www.dreamincode.net/forums/topic/108976-c%23-unit-testing-basics/

installing nant

first of all, i have no clue about visual studio and deployment… mainly i just compile it, then copy paste it. and yeah, that is really a bad way to do that… so i tought, why not simple use my old beloved ant? ok i know maven is the thing now to use, but i just need simple scripts to copy/deploy stuff… so nant will do, or have to…

  1. download: http://nant.sourceforge.net/ 
  2. install: Installation Manual

this is it 🙂 ok currently its only usable as a command line, but its working 🙂 if i am able to write scripts is something completly different…

on the other hand visual studio should be able to execute these kind of scripts… ok finding a tool was hard, but there is one: NAntAddIn

installing it on a Visual Studio 2010 is not really trivial, but with link its easy…

  1. copy the addin to the user addin folder: \My Document\Visual Studio 2010\Addins
  2. important: set the Visual Studio version to 10.0 in the NAntAddin.AddIn file
  3. now it can be added in the Visual Studio AddIn manager
  4. configure it to the nant.exe and its runable

i had to restart the visual studio, because the NAntAddIn did not print stuff in the output window. worked afterwards

so NAnt is now up and running… we will see, how it can be used by my mighty hands… 😛