我是 Visual Studio 和 Visual Studio Team Services 的新手。
我正在尝试使用团队服务运行简单代码的构建。但是,我收到以下错误:使用搜索模式“C:\a\1\s***.sln”找不到解决方案。
我的步骤是:
- 在 Team Services 中,创建一个名为 Same New Project 的团队项目。
- 打开 Visual Studio,配置我的工作区。
- 在 VS 中,创建了一个新的解决方案(Windows 窗体)
- 已 checkin 代码。
- 在 Team Services 中,从菜单中选择“代码”并刷新屏幕以显示新项目。
- 从菜单中选择了构建。
- 单击 + 号以创建新的构建定义。
- 选择了 Visual Studio。单击“下一步”。
- 选中持续集成(每当更新此分支时都会构建)
- 在默认代理队列下选择托管。单击“创建”。
- 查看图片
- 单击“保存”。
- 单击“队列构建”。
- 单击“确定”。
- 构建完成后,出现错误。
这是控制台输出:
托管代理已成功分配。
配置托管代理的连接设置
启动托管代理
初始化与托管代理的连接
已成功连接到托管代理
开始:构建
执行以下命令行:
C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\agent\worker\vsoWorker.exe /name:Worker-1c2934a8-bfde-429a-945e-4bb6394a6d3b /id:1c2934a8-bfde-429a-945e-4bb6394a6d3b /rootFolder:"C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default" /logger:Forwarding,1.0.0;Verbosity=Verbose,Name=Agent1-1aadeebb9c4390e852d65e80b5fec753;JobId=1c2934a8-bfde-429a-945e-4bb6394a6d3b
开始:获取来源
同步存储库:Sam New Project (TFVC)
Workspace Name: ws_1_1;Build\f1fca027-0a60-48e6-a5aa-f55071ee636c Getting C:\a\1\s;C10 Getting C:\a\1\s\BuildProcessTemplates;C11 Getting C:\a\1\s\Sam New WIndows Form;C13 Getting C:\a\1\s\BuildProcessTemplates\AzureContinuousDeployment.11.xaml;C11 Getting C:\a\1\s\BuildProcessTemplates\DefaultTemplate.11.1.xaml;C11 Getting C:\a\1\s\BuildProcessTemplates\LabDefaultTemplate.11.xaml;C12 Getting C:\a\1\s\BuildProcessTemplates\UpgradeTemplate.xaml;C11 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\App.config;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Form1.cs;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Form1.Designer.cs;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Program.cs;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Properties;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Sam New WIndows Form.csproj;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Sam New WIndows Form.csproj.vspscc;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Properties\AssemblyInfo.cs;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Properties\Resources.Designer.cs;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Properties\Resources.resx;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Properties\Settings.Designer.cs;C13 Getting C:\a\1\s\Sam New WIndows Form\Sam New WIndows Form\Properties\Settings.settings;C13 Done syncing repository Sam New Project to version C13 (workspace version C13)
运行任务
启动任务:构建解决方案***.sln
执行powershell脚本:
C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\VSBuild\1.0.19\VSBuild.ps1 No solution was found using search pattern 'C:\a\1\s***.sln'.
完成任务:VSBuild
启动任务:将文件复制到:$(build.artifactstagingdirectory)
将工作文件夹设置为默认值:
C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.10 found 0 files
完成任务:复制文件
启动任务:发布工件:掉落
将工作文件夹设置为默认值:
C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\PublishBuildArtifacts\1.0.25 Max Concurrent Uploads 2, Max Creators 1 Found 0 files to upload. Created 0 files without uploading content. Total files processed 0 Uploaded artifact 'C:\a\1\a' to container folder 'drop' of build 7. Associated artifact 6 with build 7
完成任务:PublishBuildArtifacts
任务 VSBuild 失败。这导致工作失败。查看任务日志以了解更多详细信息。
完成构建
Worker Worker-1c2934a8-bfde-429a-945e-4bb6394a6d3b finished running job 1c2934a8-bfde-429a-945e-4bb6394a6d3b
最佳答案
根据“获取源”步骤中的日志,未下载解决方案文件 (.sln)。请检查以下事项:
1:转到“代码”选项卡并确保已 checkin 解决方案文件夹和文件。
关于tfs - Visual Studio Team Services 构建找不到 .sln 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35422299/