Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6988601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:06:10+00:00 2026-05-27T19:06:10+00:00

I’m trying to follow the Contoso University tutorial , only with SQL Server 2008

  • 0

I’m trying to follow the Contoso University tutorial, only with SQL Server 2008 instead of CE. I can connect to the database engine in SQL Server Management Studio using my PC’s name and windows authentication. I haven’t created a database with it because I’m trying to use EF Code First.

This is my connection string:

<add 
      name="SchoolContext" 
      connectionString="Data Source=CARSON-PC\CARSON;Integrated Security=true" 
      providerName="System.Data.SqlClient"/>

I try to add a controller by right-clicking the controllers folder and selecting Add->Controller... and setting up the resulting dialog according to the tutorial. I wind up with a dialog telling me a FileNotFoundException was thrown, and the file is a temporary dll:

FileNotFoundException while compiling transformation code

This dialog is thrown up five times (once for each of the generated template files, I assume) and I wind up with a controller but no generated templates.

I suspect it’s to do with either my connection string or my SQL server installation, since I’ve been stuck on this a while, getting various errors at this stage as I try and get the connection string right.

For completeness, here’s the model I’m trying to generate a controller for:

public class Student {
    public int StudentID { get; set; }
    public string LastName { get; set; }
    public string FirstMidName { get; set; }
    public DateTime EnrollmentDate { get; set; }
    public virtual ICollection<Enrollment> Enrollments { get; set; }
}

And the context:

public class SchoolContext : DbContext {
    public DbSet<Student> Students { get; set; }
    public DbSet<Enrollment> Enrollments { get; set; }
    public DbSet<Course> Courses { get; set; }

    protected override void OnModelCreating(modelBuilder As DbModelBuilder) {
        modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
    }
}

Is my connection string wrong? Is this a symptom of something not configured right with the server? What am I screwing up here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:06:10+00:00Added an answer on May 27, 2026 at 7:06 pm

    This turned out to be a simple bug in the MVC template files List.tt, Edit.tt, Details.tt, etc. There was an ambiguous reference to ColumnAttribute.

    I opened C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 4\CodeTemplates\AddView\CSHTML, and going through each of the .tt files and searching for ” ColumnAttribute” (with the space at the beginning):

    //...
    var column = attribute as ColumnAttribute;
    if (column != null && column.IsPrimaryKey) {  // LINQ to SQL
        return true;
    }
    //...
    

    I changed that first line to:

    var column = attribute as System.Data.Linq.Mapping.ColumnAttribute;

    I think only Empty.tt didn’t have it. I did the same for the VB templates. Now the controllers are created fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.