Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-maestro-bot <dotnet-maestro-bot@microsoft.com>2018-12-12 03:13:20 +0300
committerJohn Luo <jt.luo@mail.utoronto.ca>2018-12-12 03:13:20 +0300
commit38785d0be9a32e30e0f7ed3a1474aa95353ff84d (patch)
tree72042d8d83c18b5a51ae03c85fc1159c038b6aa8 /startvs.cmd
parent21488b2b0443e6635af0f6efcfdf0aae6a03e804 (diff)
[automated] Merge branch 'release/2.1' => 'release/2.2' (#4577)
* Workaround problems when opening solution files in Visual Studio (#4569) Changes: * Condense Routing.sln into HttpAbstractions.sln * Workaround NU1105 by adding all ProjectReferences to the .sln * Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group * Add a 'startvs.cmd' script for launching VS with the right env variables * Remove RangeHelper test project * Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore * Convert Session to use Reference and move to Middleware folder (#4576) * Add RoutingSample.Web to HttpAbstractions.sln
Diffstat (limited to 'startvs.cmd')
-rw-r--r--startvs.cmd32
1 files changed, 32 insertions, 0 deletions
diff --git a/startvs.cmd b/startvs.cmd
new file mode 100644
index 0000000000..05cd3ebfda
--- /dev/null
+++ b/startvs.cmd
@@ -0,0 +1,32 @@
+@ECHO OFF
+
+:: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET Core SDK.
+
+IF "%DOTNET_HOME%"=="" (
+ set DOTNET_HOME=%USERPROFILE%\.dotnet\x64
+)
+
+:: This tells .NET Core to use the same dotnet.exe that build scripts use
+SET DOTNET_ROOT=%DOTNET_HOME%
+
+:: This tells .NET Core not to go looking for .NET Core in other places
+SET DOTNET_MULTILEVEL_LOOKUP=0
+
+:: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use
+SET PATH=%DOTNET_ROOT%;%PATH%
+
+SET sln=%1
+
+IF NOT EXIST %DOTNET_ROOT%\dotnet.exe (
+ echo .NET Core has not yet been installed. Run `build.cmd -restore` to install tools
+ exit /b 1
+)
+
+IF "%sln%"=="" (
+ echo Error^: Expected argument ^<SLN_FILE^>
+ echo Usage^: startvs.cmd ^<SLN_FILE^>
+
+ exit /b 1
+)
+
+start %sln%