@echo off
cd /d %~dp0
::初始化项目变量
set vs="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE"
set sln=%cd%\5.code\xxxx.sln

::版本管理软件
set versionfile=%cd%\8.version\VersionInfo.cs
if not exist %versionfile% echo [assembly:System.Reflection.AssemblyFileVersion("1.0.0.0")]>%versionfile%

if exist %sln% (
 goto OpenSln
) else (
  goto Tip
)

:OpenSln
if exist %vs% (
  cd /d %vs%
  devenv %sln% && exit
   goto exit
) else (
   start %sln%
   goto exit
)


:Tip
ECHO 未找到项目,请联系管理员(panjia@ulee.work)
pause

:exit
exit

