Explorar o código

Merge pull request #1529 from sebavan/Develpoment

Develpoment
David Catuhe %!s(int64=8) %!d(string=hai) anos
pai
achega
a00bd50460

+ 3 - 0
.gitignore

@@ -131,3 +131,6 @@ node_modules
 
 # for VSCode
 .vscode
+/.vs
+/Playground/project.lock.json
+.tempChromeProfileForDebug

+ 3 - 10
.vscode/launch.json

@@ -2,20 +2,13 @@
     "version": "0.1.0",
     "configurations": [
         {
-            "name": "Launch playground (Edge)",
-            "type": "edge",
-            "request": "launch",
-            "url": "http://localhost/playground/index-local.html",
-            "webRoot": "${workspaceRoot}/",
-            "sourceMaps": true
-        },
-        {
             "name": "Launch playground (Chrome)",
             "type": "chrome",
             "request": "launch",
-            "url": "http://localhost/playground/index-local.html",
+            "url": "http://localhost:1338/Playground/index-local.html",
             "webRoot": "${workspaceRoot}/",
-            "sourceMaps": true
+            "sourceMaps": true,
+            "userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug"
         }
     ]
 }

+ 28 - 0
BabylonJS.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Src", "src\Src.xproj", "{10EF6CF3-145D-41DD-8077-BB52A31894F7}"
+EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Playground", "Playground\Playground.xproj", "{DF0312CF-BCA0-47E4-9DA2-BEA0DAAFFBEB}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{10EF6CF3-145D-41DD-8077-BB52A31894F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{10EF6CF3-145D-41DD-8077-BB52A31894F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{10EF6CF3-145D-41DD-8077-BB52A31894F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{10EF6CF3-145D-41DD-8077-BB52A31894F7}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DF0312CF-BCA0-47E4-9DA2-BEA0DAAFFBEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DF0312CF-BCA0-47E4-9DA2-BEA0DAAFFBEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DF0312CF-BCA0-47E4-9DA2-BEA0DAAFFBEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DF0312CF-BCA0-47E4-9DA2-BEA0DAAFFBEB}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 28 - 0
BabylonJS2017.sln

@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.25920.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playground2017", "Playground\Playground2017.csproj", "{3ED6C83F-C85A-4A11-85D7-E1ED8778862A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Src2017", "src\Src2017.csproj", "{B01B4B8B-208B-4B33-B386-2C37F73DC32D}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3ED6C83F-C85A-4A11-85D7-E1ED8778862A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3ED6C83F-C85A-4A11-85D7-E1ED8778862A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3ED6C83F-C85A-4A11-85D7-E1ED8778862A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3ED6C83F-C85A-4A11-85D7-E1ED8778862A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B01B4B8B-208B-4B33-B386-2C37F73DC32D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B01B4B8B-208B-4B33-B386-2C37F73DC32D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B01B4B8B-208B-4B33-B386-2C37F73DC32D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B01B4B8B-208B-4B33-B386-2C37F73DC32D}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 25 - 0
Playground/Playground.xproj

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+  </PropertyGroup>
+
+  <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>df0312cf-bca0-47e4-9da2-bea0daaffbeb</ProjectGuid>
+    <RootNamespace>Playground</RootNamespace>
+    <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+    <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <SchemaVersion>2.0</SchemaVersion>
+  </PropertyGroup>
+  <ItemGroup>
+    <DnxInvisibleContent Include="bower.json" />
+    <DnxInvisibleContent Include=".bowerrc" />
+  </ItemGroup>
+  <Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project>

+ 36 - 0
Playground/Playground2017.csproj

@@ -0,0 +1,36 @@
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp1.0</TargetFramework>
+    <PreserveCompilationContext>true</PreserveCompilationContext>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="**\*.cs" Exclude="$(GlobalExclude)" />
+    <EmbeddedResource Include="**\*.resx" Exclude="$(GlobalExclude)" />
+  </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.AspNetCore.StaticFiles">
+      <Version>1.1.0</Version>
+    </PackageReference>
+    <PackageReference Include="Microsoft.NETCore.App">
+      <Version>1.0.1</Version>
+    </PackageReference>
+    <PackageReference Include="Microsoft.NET.Sdk.Web">
+      <Version>1.0.0-alpha-20161104-2-112</Version>
+    </PackageReference>
+    <PackageReference Include="Microsoft.AspNetCore.Diagnostics">
+      <Version>1.0.0</Version>
+    </PackageReference>
+    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration">
+      <Version>1.0.0</Version>
+    </PackageReference>
+    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel">
+      <Version>1.0.1</Version>
+    </PackageReference>
+    <PackageReference Include="Microsoft.Extensions.Logging.Console">
+      <Version>1.0.0</Version>
+    </PackageReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 70 - 0
Playground/Program.cs

@@ -0,0 +1,70 @@
+using System.IO;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.StaticFiles;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.FileProviders;
+using Microsoft.Extensions.Logging;
+
+namespace BabylonJS.Playground
+{
+    public class Startup
+    {
+        // This method gets called by the runtime. Use this method to add services to the container.
+        // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
+        public void ConfigureServices(IServiceCollection services)
+        {
+        }
+
+        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+        {
+            loggerFactory.AddConsole();
+
+            if (env.IsDevelopment())
+            {
+                app.UseDeveloperExceptionPage();
+            }
+
+            var path = Path.Combine(env.ContentRootPath); 
+            var provider = new PhysicalFileProvider(path);
+            provider.Watch("*.*");
+
+            // Set up custom content types -associating file extension to MIME type
+            var contentTypeProvider = new FileExtensionContentTypeProvider();
+            // Add new mappings
+            contentTypeProvider.Mappings[".hdr"] = "application/octet-stream";
+            contentTypeProvider.Mappings[".babylon"] = "application/json";
+            contentTypeProvider.Mappings[".fx"] = "text/plain";
+            contentTypeProvider.Mappings[".map"] = "text/plain";
+
+            var options = new StaticFileOptions()
+            {
+                RequestPath = "",
+                FileProvider = provider,
+                ContentTypeProvider = contentTypeProvider
+            };
+            app.UseStaticFiles(options);
+        }
+    }
+
+    public class Program
+    {
+        public static void Main(string[] args)
+        {
+            // PG
+            var currentDirectory = Directory.GetCurrentDirectory();
+            // BJS
+            var babylonjsDirectory = new DirectoryInfo(currentDirectory).Parent.FullName;
+
+            var host = new WebHostBuilder()
+                .UseKestrel()
+                .UseContentRoot(babylonjsDirectory)
+                .UseIISIntegration()
+                .UseStartup<Startup>()
+                .Build();
+
+            host.Run();
+        }
+    }
+}

+ 28 - 0
Playground/Properties/launchSettings.json

@@ -0,0 +1,28 @@
+{
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:33611/",
+      "sslPort": 0
+    }
+  },
+  "profiles": {
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "launchUrl": "http://localhost:33611/Playground/index-local.html",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    },
+    "Kestrel": {
+      "commandName": "Project",
+      "launchBrowser": true,
+      "launchUrl": "http://localhost:5000/Playground/index-local.html",
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    }
+  }
+}

+ 48 - 0
Playground/project.json

@@ -0,0 +1,48 @@
+{
+  "dependencies": {
+    "Microsoft.NETCore.App": {
+      "version": "1.0.1",
+      "type": "platform"
+    },
+    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
+    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
+    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
+    "Microsoft.Extensions.Logging.Console": "1.0.0",
+    "Microsoft.AspNetCore.StaticFiles": "1.0.0"
+  },
+
+  "tools": {
+    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
+  },
+
+  "frameworks": {
+    "netcoreapp1.0": {
+      "imports": [
+        "dotnet5.6",
+        "portable-net45+win8"
+      ]
+    }
+  },
+
+  "buildOptions": {
+    "emitEntryPoint": true,
+    "preserveCompilationContext": true
+  },
+
+  "runtimeOptions": {
+    "configProperties": {
+      "System.GC.Server": true
+    }
+  },
+
+  "publishOptions": {
+    "include": [
+      "wwwroot",
+      "web.config"
+    ]
+  },
+
+  "scripts": {
+    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
+  }
+}

+ 9 - 0
Playground/web.config

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <system.webServer>
+    <handlers>
+      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
+    </handlers>
+    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" />
+  </system.webServer>
+</configuration>

+ 57 - 1
Tools/Gulp/gulpfile.js

@@ -9,15 +9,18 @@ var merge2 = require("merge2");
 var concat = require("gulp-concat");
 var rename = require("gulp-rename");
 var cleants = require('gulp-clean-ts-extends');
-var changed = require('gulp-changed');
+var changedInPlace = require('gulp-changed-in-place');
 var runSequence = require('run-sequence');
 var replace = require("gulp-replace");
 var uncommentShader = require("./gulp-removeShaderComments");
 var expect = require('gulp-expect-file');
 var optimisejs = require('gulp-optimize-js');
+var webserver = require('gulp-webserver');
+const path = require('path');
 
 var config = require("./config.json");
 
+var debug = require('gulp-debug');
 var includeShadersStream;
 var shadersStream;
 var workersStream;
@@ -203,3 +206,56 @@ gulp.task('watch', function () {
 gulp.task('watch-typescript', function () {
     gulp.watch(config.core.typescript, ["typescript-compile", "build"]);
 });
+
+
+/**
+ * Watch typescript task, will call the default typescript task if a typescript file is updated.
+ */
+var tsProject = typescript.createProject({
+            noExternalResolve: true,
+            target: 'ES5',
+            declarationFiles: true,
+            typescript: require('typescript'),
+            experimentalDecorators: true,
+            isolatedModules: false,
+
+        });
+
+gulp.task('run-watch-compile', function () {
+    var tsResult = gulp.src(config.core.typescript)
+        //.pipe(changedInPlace())
+        .pipe(sourcemaps.init())
+        .pipe(typescript(tsProject));
+
+    return merge2([
+        tsResult.dts
+            .pipe(concat(config.build.declarationFilename))
+            .pipe(gulp.dest(config.build.outputDirectory)),
+        tsResult.js
+            .pipe(replace('"use strict";', ''))
+            //.pipe(debug())
+            .pipe(sourcemaps.write("./", 
+            {
+                includeContent:false, 
+                sourceRoot: (filePath) => {
+                    var repeatCount = filePath.relative.split(path.sep).length - 1;
+                    return '../'.repeat(repeatCount); 
+                }
+            }))
+            .pipe(gulp.dest(config.build.srcOutputDirectory))
+    ])
+});
+
+gulp.task('run-watch', ['run-watch-compile'], function () {
+    return gulp.watch(config.core.typescript, ['run-watch-compile']);
+});
+
+gulp.task('run-webserver', function () {
+    gulp.src('../../.').pipe(webserver({
+      port: 1338,
+      livereload: false
+    }));
+});
+
+gulp.task('run', ['run-watch', 'run-webserver'], function () {
+});

+ 4 - 2
Tools/Gulp/package.json

@@ -18,11 +18,13 @@
     "merge2": "~0.3.5",
     "gulp-rename": "~1.2.2",
     "gulp-clean-ts-extends": "~0.1.1",
-    "gulp-changed": "~1.2.1",
+    "gulp-changed-in-place": "2.0.3",
     "run-sequence": "~1.1.0",
     "gulp-replace": "~0.5.3",
     "gulp-content-to-variable": "^0.1.0",
     "gulp-expect-file": "^0.0.7",
-    "gulp-optimize-js": "^1.0.2"
+    "gulp-optimize-js": "^1.0.2",
+    "gulp-webserver": "^0.9.1",
+    "gulp-debug": "^3.0.0"
   }
 }

+ 173 - 0
src/Src.xproj

@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+  </PropertyGroup>
+
+  <Import Project="$(VSToolsPath)\DotNet\\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+  
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>10ef6cf3-145d-41dd-8077-bb52a31894f7</ProjectGuid>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <!-- Disable common capabilities that come from Microsoft.Common.Targets. Must be done prior to the Import -->
+    <DefineCommonCapabilities>false</DefineCommonCapabilities>
+
+    <!-- The project file should have paths set for these, but if not we default to the standard paths under the project -->
+    <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+    <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+
+    <!-- DNX only produces assemblies -->
+    <OutputType>Library</OutputType>
+
+    <!-- The output assembly is the name of the directory the project is in -->
+    <AssemblyName>$([System.IO.Path]::GetFileName('$(MSBuildProjectDirectory)'))</AssemblyName>
+
+  </PropertyGroup>
+
+  <Import Project="$(MSBuildToolsPath)\Microsoft.Common.Targets" />
+
+  <PropertyGroup>
+    <!-- This property returns "the" project output for this project, as is seen in traditional MSBuild projects like csproj or vbproj.
+         Since DotNet projects have multiple target outputs, there is nothing meaningful we can return. Microsoft.Common.Targets defaults
+         this property to a meaningless value, which gets picked up by ResolveProjectReferences if you have a csproj/vbproj -> xproj reference.
+         We don't want that to happen, so this ensures ResolveProjectReferences will no-op in such a scenario. -->
+    <TargetPath></TargetPath>
+
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectCapability Include="AllTargetOutputGroups" />
+    <ProjectCapability Include="VisualStudioWellKnownOutputGroups" />
+    <ProjectCapability Include="OutputGroups" />
+    <ProjectCapability Include="ProjectJsonConfigurations" />
+    <ProjectCapability Include="TypeScript"/>
+    <ProjectCapability Include="FileSystemBasedDotnetProject" />
+  </ItemGroup>
+
+<ItemGroup>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\general.xaml;" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\general.xaml')">
+      <Context>Project</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\general.xaml;" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\general.xaml')">
+      <Context>Project</Context>
+    </PropertyPageSchema>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\ProjectItemsSchema.xaml;" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\ProjectItemsSchema.xaml')"/>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\ProjectItemsSchema.xaml;" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\ProjectItemsSchema.xaml')"/>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\debugger_general.xaml;" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\debugger_general.xaml')">
+      <Context>Project</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\debugger_general.xaml;" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\debugger_general.xaml')">
+      <Context>Project</Context>
+    </PropertyPageSchema>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\ProjectDebugger.xaml" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\ProjectDebugger.xaml')">
+      <Context>Project</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\ProjectDebugger.xaml" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\ProjectDebugger.xaml')">
+      <Context>Project</Context>
+    </PropertyPageSchema>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\general_file.xaml" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\general_file.xaml')">
+      <Context>File</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\general_file.xaml" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\general_file.xaml')">
+      <Context>File</Context>
+    </PropertyPageSchema>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\scc.xaml" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\scc.xaml')">
+      <Context>Invisible</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\scc.xaml" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\scc.xaml')">
+      <Context>Invisible</Context>
+    </PropertyPageSchema>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\csharp.xaml;" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\csharp.xaml')">
+      <Context>File</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\csharp.xaml;" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\csharp.xaml')">
+      <Context>File</Context>
+    </PropertyPageSchema>
+
+    <!--
+       Note: Keep in mind that different Contexts associated with a xaml rule file, have different expectations
+          in terms of how many files can be specified:
+            - For BrowseObject context a unique file should be specified for each data source type:
+                * <DataSource Persistence="ProjectFile" Label="Configuration" HasConfigurationCondition="false" />
+                  is a project level datasource associated with the project itself
+                * <DataSource Persistence="ProjectFile" HasConfigurationCondition="False" ItemType="Content" />
+                  is a project level data source associated only with Content item types
+
+                so if you specify another xaml rule that duplicate ItemType or has no item type specified (i.e.
+                rule for project itself) there will be runtime error and no browse object properties at all.
+
+            - For Project context as many xaml rules can be defined as needed.
+
+      BrowseObject properties are used in properties pane (F4) and via DTE.Project.Properties.Item("prop name").
+
+      If in other project system based on DotNet you would need to override some xaml rules
+      that should have Context=BrowseObject, make sure you move it out of this file to Microsoft.DotNet.Targets.
+      Browse files should be unique per Persistence + ItemType in DataSource, thus to override, each project system
+      targets should define their own BrowseObject files.
+
+      Keep in mind, all overriden xaml files should be kept in sync with core dotnet xaml files to enable properties
+      that were added to core xaml rules, otherwise some core functionality might be broken.
+
+      !!!Note!!! Never call directly members of generated cs file for BrowseObject xaml files, since if they are overriden
+      in other project system, there will be type mismatch. Overriden files should have their own names for xaml Rule,
+      which would end up into different generated class.
+    -->
+    <PropertyPageSchema Include="
+                        $(VSToolsPath)\DotNet\$(LangName)\Content.xaml;
+                        $(VSToolsPath)\DotNet\$(LangName)\folder.xaml;
+                        $(VSToolsPath)\DotNet\$(LangName)\none.xaml;
+                        $(VSToolsPath)\DotNet\$(LangName)\EmbeddedResource.xaml;
+                        $(VSToolsPath)\DotNet\$(LangName)\typescript.xaml;" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\Content.xaml')">
+      <Context>File;BrowseObject</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="
+                        $(VSToolsPath)\DotNet\en-us\Content.xaml;
+                        $(VSToolsPath)\DotNet\en-us\folder.xaml;
+                        $(VSToolsPath)\DotNet\en-us\none.xaml;
+                        $(VSToolsPath)\DotNet\en-us\EmbeddedResource.xaml;
+                        $(VSToolsPath)\DotNet\en-us\typescript.xaml;" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\Content.xaml')">
+      <Context>File;BrowseObject</Context>
+    </PropertyPageSchema>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\ResolvedDesignTimeHostReferences.xaml;" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\ResolvedDesignTimeHostReferences.xaml')">
+      <Context>ProjectSubscriptionService;BrowseObject</Context>
+    </PropertyPageSchema>
+   <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\ResolvedDesignTimeHostReferences.xaml;" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\ResolvedDesignTimeHostReferences.xaml')">
+      <Context>ProjectSubscriptionService;BrowseObject</Context>
+    </PropertyPageSchema>
+
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\$(LangName)\csharp.browseobject.xaml;" Condition="Exists('$(VSToolsPath)\DotNet\$(LangName)\csharp.browseobject.xaml')">
+      <Context>BrowseObject</Context>
+    </PropertyPageSchema>
+    <PropertyPageSchema Include="$(VSToolsPath)\DotNet\en-us\csharp.browseobject.xaml;" Condition="!Exists('$(VSToolsPath)\DotNet\$(LangName)\csharp.browseobject.xaml')">
+      <Context>BrowseObject</Context>
+    </PropertyPageSchema>
+  </ItemGroup>
+
+  <!-- Dynamic items support. This file will never exist on disk -->
+  <Import Project="$(MSBuildProjectDirectory)\_internalAspNetSourceItems.Targets" Condition="'$(_InternalTargetsFileReady)' == 'true' and Exists('$(MSBuildProjectDirectory)\_internalAspNetSourceItems.Targets')"/>
+
+  <!-- Typescript support 
+        Note that the typcscript targets have a dependency on the $(_WebPublishTargetsPath) property and this property should not be changed.
+   -->
+  <Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets')"/>
+
+  <!-- Capabilities for web project. Conditions should be based on platform|configuration only. -->
+  <ItemGroup>
+    <ProjectCapability Include="DotNetCoreWeb" />
+  </ItemGroup>
+
+  <Target Name="Build" />
+  <Target Name="Clean" />
+  <Target Name="Compile" />
+
+</Project>

+ 27 - 0
src/Src2017.csproj

@@ -0,0 +1,27 @@
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
+  <PropertyGroup>
+    <TargetFramework>netstandard1.4</TargetFramework>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="**\*.cs" />
+    <EmbeddedResource Include="**\*.resx" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="**\*.ts" />
+  </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NET.Sdk">
+      <Version>1.0.0-alpha-20161104-2</Version>
+      <PrivateAssets>All</PrivateAssets>
+    </PackageReference>
+    <PackageReference Include="Microsoft.NET.Sdk.Web.ProjectSystem">
+      <Version>1.0.0-alpha-20161104-2-112</Version>
+    </PackageReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <Content Remove="**\*.js" />
+    <Content Remove="**\*.js.map" />
+  </ItemGroup>
+</Project>

+ 7 - 5
src/tsconfig.json

@@ -1,7 +1,9 @@
 {
-    "compilerOptions": {
-        "experimentalDecorators": true,
-        "module": "commonjs", 
-        "target": "es5"
-    }
+  "compileOnSave": true,
+  "compilerOptions": {
+    "experimentalDecorators": true,
+    "module": "commonjs",
+    "target": "es5",
+    "sourceMap": true
+  }
 }