2013-07-24 11 views
2

내 영어를 유감으로 생각합니다. Windows Store 앱을 개발하는 법을 배우기 시작했습니다. 그리고 튜토리얼 here을 발견했습니다. 나는 그것을 따르고, 새로운 Javascript Windows Store App을 만든다." 'WinJS'가 정의되지 않았습니다." "Windows '가 정의되지 않았습니다."

'WinJS' is not defined. 
'Windows' is not defined 

가 내 default.html을

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8" /> 
    <title>SimpleChanel9Reader</title> 

    <!-- WinJS references --> 
    <link href="//Microsoft.WinJS.1.0/css/ui-dark.css" rel="stylesheet" /> 
    <script src="//Microsoft.WinJS.1.0/js/base.js"></script> 
    <script src="//Microsoft.WinJS.1.0/js/ui.js"></script> 

    <!-- SimpleChanel9Reader references --> 
    <link href="/css/default.css" rel="stylesheet" /> 
    <script src="/js/default.js"></script> 
</head> 
<body> 
    <div id="main"> 
     <header id="banner"> 
      <button id="backbutton" class="win-backbutton"></button> 
      <h1 id="maintitle" class="win-title">Welcome to Chanel9</h1> 
     </header> 
     <section id="content"></section> 
    </div> 
</body> 
</html> 

되고

// For an introduction to the Blank template, see the following documentation: 
// http://go.microsoft.com/fwlink/?LinkId=232509 
(function() { 
    "use strict"; 
    WinJS.Binding.optimizeBindingReferences = true; 

    var app = WinJS.Application; 
    var activation = Windows.ApplicationModel.Activation; 

    app.onactivated = function (args) { 
     if (args.detail.kind === activation.ActivationKind.launch) { 
      if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) { 
       // TODO: This application has been newly launched. Initialize 
       // your application here. 
      } else { 
       // TODO: This application has been reactivated from suspension. 
       // Restore application state here. 
      } 
      args.setPromise(WinJS.UI.processAll()); 
     } 
    }; 

    app.oncheckpoint = function (args) { 
     // TODO: This application is about to be suspended. Save any state 
     // that needs to persist across suspensions here. You might use the 
     // WinJS.Application.sessionState object, which is automatically 
     // saved and restored across suspension. If you need to complete an 
     // asynchronous operation before your application is suspended, call 
     // args.setPromise(). 
    }; 

    app.start(); 
})(); 

를 default.js : 난 내 응용 프로그램을 빌드 할 때 어떤 코드가 추가되지 함께하지만, JSHint 그런 내 오류가 보여 내 Visual Studio에 대한 정보가 있습니다.

Microsoft Visual Studio Ultimate 2012 
Version 11.0.50727.1 RTMREL 
Microsoft .NET Framework 
Version 4.5.50709 

Installed Version: Ultimate 

Architecture and Modeling Tools 04940-004-0039002-02068 
Microsoft Architecture and Modeling Tools 

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries. 

LightSwitch for Visual Studio 2012 04940-004-0039002-02068 
Microsoft LightSwitch for Visual Studio 2012 

Office Developer Tools 04940-004-0039002-02068 
Microsoft Office Developer Tools 

Team Explorer for Visual Studio 2012 04940-004-0039002-02068 
Microsoft Team Explorer for Visual Studio 2012 

Visual Basic 2012 04940-004-0039002-02068 
Microsoft Visual Basic 2012 

Visual C# 2012 04940-004-0039002-02068 
Microsoft Visual C# 2012 

Visual C++ 2012 04940-004-0039002-02068 
Microsoft Visual C++ 2012 

Visual F# 2012 04940-004-0039002-02068 
Microsoft Visual F# 2012 

Visual Studio 2012 Code Analysis Spell Checker 04940-004-0039002-02068 
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker 

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved. 

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved. 

Visual Studio 2012 SharePoint Developer Tools 04940-004-0039002-02068 
Microsoft Visual Studio 2012 SharePoint Developer Tools 

BraceCompleter 1.0 
Automatically inserts closing braces after typing an open brace and pressing Enter. 

CodeMaid #114 
CodeMaid is an open source Visual Studio extension to cleanup, dig through and simplify our C#, C++, F#, VB, XAML, XML, ASP, HTML, CSS and JavaScript coding. 

Written by Steve Cadwallader, for more information visit http://www.codemaid.net/ 

jslint.VS2012 1.0 
Adds JSLlint support into Visual Studio 

NuGet Package Manager 2.0.30625.9003 
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/. 

PreEmptive Analytics Visualizer 1.0 
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product. 

SQL Server Data Tools 11.1.20627.00 
Microsoft SQL Server Data Tools 

Visual Studio 11 Editor Extension 1.0 
Information about my package 

VSCommands11 11.0 
VSCommands 11 

Web Developer Tools 1.0.30710.0 
Microsoft Web Developer Tools contains the following components: 
Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues. 
Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises. 
Web Form Templates: Includes the default templates for Web Form Applications. 
Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience. 

ZenCoding 0.7 
Danny Zen Coding is a visual studio plugin for high-speed HTML, XML, XSL (or any other structured code format) coding and editing. 

제발, 내가 모든 자바 스크립트 Windows 스토어 응용 프로그램을 만들 때이 오류가 발생했습니다. NuGet을 통해 추가

+0

VS와 같은 사운드는 WinJS SDK를 찾을 수 없습니다. 솔루션 탐색기의 "참조"부분에서 볼 수 있습니까? –

+0

네, 솔루션의 모든 파일과 디렉토리를 확인했습니다. –

+0

Tieu, 문제의 원인을 찾아 냈습니까? 내가 작업중인 Win8 프로젝트에서 같은 메시지가 나타났습니다. – ariestav

답변

0

시도 :

"WinJS - 패키지 설치"이이 솔루션에 설치되어 있는지 확인합니다.

관련 문제