소스 검색

First VS Attempt

sevan 8 년 전
부모
커밋
2bf21190e6
9개의 변경된 파일393개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 0
      .gitignore
  2. 28 0
      BabylonJS.sln
  3. 25 0
      Playground/Playground.xproj
  4. 74 0
      Playground/Program.cs
  5. 28 0
      Playground/Properties/launchSettings.json
  6. 48 0
      Playground/project.json
  7. 9 0
      Playground/web.config
  8. 173 0
      src/Src.xproj
  9. 7 5
      src/tsconfig.json

+ 1 - 0
.gitignore

@@ -128,3 +128,4 @@ node_modules
 
 # for VSCode
 .vscode
+/.vs

+ 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

+ 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>

+ 74 - 0
Playground/Program.cs

@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.StaticFiles;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.FileProviders;
+using Microsoft.Extensions.Logging;
+
+namespace TestTestTest
+{
+    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();
+            options.RequestPath = ""; 
+            options.FileProvider = provider;
+            options.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>

+ 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>

+ 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
+  }
 }