Giter Site home page Giter Site logo

Comments (5)

erichexter avatar erichexter commented on July 19, 2024

I pushed a nuget to address the compile error. The first two.errors are
from the .tt files, The nuget installer changes the build properties of the
file and those errors go away when you manually recompile. I will look
into scripting the clearing of the error output to eliminate the confusion
around those templates.
On Nov 8, 2012 11:28 AM, "Fernando Correia" [email protected]
wrote:

Several build errors with Visual Studio 2012 such as:

  • Error 1 Compiling transformation: The type or namespace name 'Web'
    does not exist in the namespace 'Microsoft.VisualStudio' (are you missing
    an assembly reference?)
    c:\Users\fernando.correia\AppData\Local\Temp\txqr0h41.0.cs 10 34
    • Error 2 Compiling transformation: The type or namespace name
      'MvcTextTemplateHost' could not be found (are you missing a using directive
      or an assembly reference?)
      c:\Temp\MvcApplication4\MvcApplication4\CodeTemplates\AddView\CSHTML\BootstrapForm.tt
      149 1 MvcApplication4
  • Error 3 Extension method must be defined in a top level static
    class; HtmlHelperExtensions is a nested class
    c:\Temp\MvcApplication4\MvcApplication4\BootstrapSupport\ViewHelperExtensions.cs
    135 41 MvcApplication4

Steps to reproduce:

  • Open Visual Studio 2012 (tested with Microsoft Visual Studio
    Ultimate 2012 Version 11.0.50727.1 RTMREL)

  • Create a new project with ASP.NET MVC 4 Web Application

  • Select the Internet Application template

  • After project creation, select the command Build | Rebuild Solution

  • Verify that the build is successful

  • In the Package Manager Console, enter the command "Install-Package
    twitter.bootstrap.mvc4" (tested with Twitter Bootstrap for ASP.Net MVC 4
    1.0.36)

  • If prompted by Security Warning, authorize the execution of the text
    template by clicking OK

  • Verify that there are 2 build errors

  • Select the command Build | Rebuild Solution

  • Verify that now there are 3 build errors (error in
    ViewHelperExtensions.cs)


    Reply to this email directly or view it on GitHubhttps://github.com//issues/2.

from twitter.bootstrap.mvc.

fernandoacorreia avatar fernandoacorreia commented on July 19, 2024

Experience with Twitter Bootstrap for ASP.Net MVC 4 1.0.37 released Friday, November 09, 2012:

After creating the new ASP.NET MVC 4 project, installing twitter.bootstrap.mvc4 and rebuilding there are 3 errors:

Error 1 Compiling transformation: The type or namespace name 'Web' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?) c:\Users\fernando.correia\AppData\Local\Temp\zjdlh4v5.0.cs 10 34

Error 2 Compiling transformation: The type or namespace name 'MvcTextTemplateHost' could not be found (are you missing a using directive or an assembly reference?) c:\Temp\MvcApplication1123\MvcApplication1123\CodeTemplates\AddView\CSHTML\BootstrapForm.tt 149 1 MvcApplication1123

Error 3 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Partial' and no extension method 'Partial' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) C:\Temp\MvcApplication1123\MvcApplication1123\BootstrapSupport\ViewHelperExtensions.cs 139 31 MvcApplication1123

After closing and reopening the solution and doing a rebuild there is 1 error:

Error 1 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Partial' and no extension method 'Partial' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) C:\Temp\MvcApplication1123\MvcApplication1123\BootstrapSupport\ViewHelperExtensions.cs 139 31 MvcApplication1123

Adding a reference to System.Web.Mvc.Html.PartialExtensions.Partial in ViewHelperExtensions.cs (using System.Web.Mvc.Html) solves this error.

from twitter.bootstrap.mvc.

devlife avatar devlife commented on July 19, 2024

The ViewHelperExtensions.cs error has been fixed.

from twitter.bootstrap.mvc.

erichexter avatar erichexter commented on July 19, 2024

I merged in the latest pull requests.

Eric Hexter

blog | http://Hex.LosTechies.com
info | http://www.linkedin.com/in/erichexter

On Thu, Nov 15, 2012 at 11:15 AM, Mike Paterson [email protected]:

The ViewHelperExtensions.cs error has been fixed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-10416654.

from twitter.bootstrap.mvc.

fernandoacorreia avatar fernandoacorreia commented on July 19, 2024

As of v.1.0.41 the error in ViewHelperExtensions.cs has been corrected by pull request #3.

To prevent confusion from having 2 different issues in a single report, I opened #6 for the build errors after installing the package. These errors are not specific to Visual Studio 2012, they also happen in 2010, so I'll close this issue as resolved.

from twitter.bootstrap.mvc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.