Monday, March 30, 2015

Event 4656 - Map error TFS when adding new solution

I had created a new TFS Collection and was attempting to add my first solution to the new collection.
Each time I attempted to add the solution to the collection I kept getting errors.  I then tried to map the local drive for my workspace and go the Access to the path is denied.  I checked the logs on the TFS server and each time I got the error I logged a 4656. 

I started digging since VS output window gave me the location

C:\ProgramData\Microsoft Team Foundation Local Workspaces

I checked the permissions for this folder and discovered that my local sa account did not have access to the folder.  Each time I was attempting to add the code to TFS it goes to this local directory as the account you are logged in as.  Added my permissions and the problem was resolved.

Team Foundation Server - How to add a new root project (Team Project Collection)

Remote into the TFS server
 
Select Application Tier > Team Project Collections
 On the right hand side, select the Create Collection icon
 
This starts the team project collection wizard

Wednesday, March 25, 2015

Friday, March 13, 2015

MVVMCross iOS: How to trigger RowSelected Table View?

I was struggling with how to raise an MVVM event on a click within a tableview.
Fortunately, Stuart Lodge has come through with a great demo of how this all works.
His N+17 video about 47 minutes in gives the details for iOS.  He also has a demo
in his MVVM samples library.  I lifted the pertinent code out of the repo.  The key is to bind
your MVVM command to the SelectionChangeCommand which is a property of the TableView
row item.

Sample:

ModelView:

new Cirrious.MvvmCross.ViewModels.MvxCommand<DilbertItem>((dilbertItem) =>
{   
// note that we can only pass an id here - do *not* serialiase the whole dilbertItem ShowViewModel<DilbertDetailViewModel>(new { id = dilbertItem.Id });
});


View:

// binding
set.Bind(source) .For(s => s.SelectionChangedCommand) .To(s => s.ShowDetailCommand);



Source:
N=17 https://www.youtube.com/watch?v=h0Eww89c9DM&feature=youtu.be&t=47m30s

http://stackoverflow.com/questions/17712589/mvvmcross-ios-how-to-trigger-rowselected-on-a-custom-tableviewsource-using-crea

Unrecognized attribute 'targetFramework'.

We have just move to new servers and trying to get the website up and running.  I ran into this error when I tried to run an aspx page.  The static files and asp files ran without issue.  As soon as the Framework was invoked, I popped this error.  This an easy one to fix.  Just look at the version of the framework for your application pool.  It is most likely set to something below 4.  Set it to 4.0 and the issue should be resolved.


This is the issue.  You are trying to invoke a higher level version of the framework on an app pool which is running a lower version of the framework.

Wednesday, March 11, 2015

Linq where clause for SQL Lite

I was trying to get the syntax for a SQL Lite query. Passing in the id of an record for a standard CRUD operation. 

public Report GetReport(int itemId)
{
return _connection
.Table<Report>()
.Where(x => x.Id == itemId)  
.FirstOrDefault();
}

Source
http://stackoverflow.com/questions/6359980/proper-linq-where-clauses