Visual Studio 2012热毛巾模板无法正常工作

时间:2022-04-01 04:22:14

I am following this tutorial for getting started with Hot towel, I have installed the ASP.NET Web Tools 2012.2 update and have also downloaded and installed the VSIX for the Hot towel template, but when I try create a new project with this template it is not working correctly. If I open a new project in Visual Studio 2012 and select ASP.NET MVC 4 Web Application I see the HotTowel Single Page Application template listed there, but I select the project gets created with a lot of files missing.

我正在按照本教程开始使用Hot towel,我已经安装了ASP.NET Web Tools 2012.2更新,并且还为热毛巾模板下载并安装了VSIX,但是当我尝试使用此模板创建一个新项目时,它是工作不正常。如果我在Visual Studio 2012中打开一个新项目并选择ASP.NET MVC 4 Web应用程序,我会看到其中列出的HotTowel单页面应用程序模板,但是我选择创建的项目中缺少大量文件。

What I would expect to see in my Scripts folder is the following:

我希望在我的Scripts文件夹中看到的内容如下:

Visual Studio 2012热毛巾模板无法正常工作

But instead my project looks like this:

但我的项目看起来像这样:

Visual Studio 2012热毛巾模板无法正常工作

The project created also does not compile, it throws the following exception:

创建的项目也不编译,它抛出以下异常:

Error 1 The name 'BundleConfig' does not exist in the current context

This exception is being thrown here:

此处抛出此异常:

public class MvcApplication : System.Web.HttpApplication
{
    protected void Application_Start()
    {
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        BundleConfig.RegisterBundles(BundleTable.Bundles);
    }
}

Does anyone know why the Hot towel template is not working correctly in Visual Studio 2012 and what I could do to get it working?

有谁知道为什么热毛巾模板在Visual Studio 2012中无法正常工作以及我能做些什么来让它工作?

UPDATE:

更新:

I tried installing Hot Towel with Nuget instead of the template, but that also did not work correctly. Install-Package got as far as installing Q and then gave an exception. Here is the Nuget output:

我尝试使用Nuget而不是模板安装Hot Towel,但这也无法正常工作。 Install-Package得到了安装Q然后给了一个例外。这是Nuget输出:

PM> Install-Package HotTowel
Attempting to resolve dependency 'Breeze.WebApi (≥ 1.4.1)'.
Attempting to resolve dependency 'Breeze.Client (≥ 1.4.2)'.
Attempting to resolve dependency 'Q'.
Install-Package : External packages cannot depend on packages that target projects.
At line:1 char:1
+ Install-Package HotTowel
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException

1 个解决方案

#1


1  

I solved this problem by updating NuGet Package Manager. I updated it from here:

我通过更新NuGet包管理器解决了这个问题。我从这里更新了它:

http://docs.nuget.org/docs/start-here/installing-nuget

#1


1  

I solved this problem by updating NuGet Package Manager. I updated it from here:

我通过更新NuGet包管理器解决了这个问题。我从这里更新了它:

http://docs.nuget.org/docs/start-here/installing-nuget