CS0103: Имя "Пакеты" не существует в текущем контексте. - PullRequest
0 голосов
/ 06 августа 2020

Я пытаюсь опубликовать sh наш сайт. Он отлично работает при отладке и выпуске, но publi sh дает мне эту ошибку. Мы используем ASP. NET 4.0. Для этого проекта я использую Visual Study 2013.

Ошибка:

CS0103: The name 'Bundles' does not exist in the current context
Line 28:     <meta name="viewport" content="width=device-width, initial-scale=1" />
Line 29:     <%--<meta name="google-translate-customization" content="78033ccfddd8ecc6-eef53fe980f2236d-g873f5a559b682a69-a" />--%>
Line 30:     <%=Bundles.RenderStylesheets()%>
Line 31:     
Line 32:     <script>

Веб-конфигурация:

<!-- Web.Config Configuration File -->
<configuration>
  <system.web>
    <customErrors mode="Off"/>
  </system.web>
</configuration>

Вот моя конфигурация:

using Cassette;
using Cassette.Scripts;
using Cassette.Stylesheets;
using Cassette.BundleProcessing;
//using System.Web.Optimization;

namespace StudyXWebsite
{
    /// <summary>
    /// Configures the Cassette asset bundles for the web application.
    /// </summary>
    public class CassetteBundleConfiguration : IConfiguration<BundleCollection>
    {
        public void Configure(BundleCollection bundles)
        {
            // TODO: Configure your bundles here...
            // Please read http://getcassette.net/documentation/configuration

            // This default configuration treats each file as a separate 'bundle'.
            // In production the content will be minified, but the files are not combined.
            // So you probably want to tweak these defaults!

            //bundles.AddPerIndividualFile<StylesheetBundle>("Content");
            //bundles.AddPerIndividualFile<ScriptBundle>("Scripts");

            bundles.Add<StylesheetBundle>("~/Styles/AllStyles.css");
            bundles.Add<ScriptBundle>("~/Scripts/GGS.js");
            bundles.Add<ScriptBundle>("~/Scripts/track.js"); 
 

            // To combine files, try something like this instead:
            //   bundles.Add<StylesheetBundle>("Content");
            // In production mode, all of ~/Content will be combined into a single bundle.
            
            // If you want a bundle per folder, try this:
            //   bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
            // Each immediate sub-directory of ~/Scripts will be combined into its own bundle.
            // This is useful when there are lots of scripts for different areas of the website.
        }
    }
}

Бункерная папка папка bin

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...